Fix CLOUDSTACK-936: fix nonoss build due to CloudException IdentityProxy

removal.
This commit is contained in:
Min Chen 2013-01-09 13:46:54 -08:00
parent 3dfd81fd6b
commit dcbb0ecef5
2 changed files with 48 additions and 54 deletions

View File

@ -56,14 +56,6 @@ public class CloudException extends Exception {
return;
}
public void addProxyObject(Object voObj, Long id, String idFieldName) {
// Get the VO object's table name.
String tablename = AnnotationHelper.getTableName(voObj);
if (tablename != null) {
addProxyObject(tablename, id, idFieldName);
}
return;
}
public ArrayList<String> getIdProxyList() {
return idList;

View File

@ -342,7 +342,9 @@ public abstract class CiscoNexusVSMDeviceManagerImpl extends AdapterBase {
s_logger.error("Failed to add cluster: specified Nexus VSM is already associated with another cluster");
_clusterDao.remove(clusterId);
ResourceInUseException ex = new ResourceInUseException("Failed to add cluster: specified Nexus VSM is already associated with another cluster with specified Id");
ex.addProxyObject("cluster", clusterList.get(0).getClusterId(), "clusterId");
// get clusterUuid to report error
ClusterVO cluster = _clusterDao.findById(clusterList.get(0).getClusterId());
ex.addProxyObject(cluster.getUuid());
throw ex;
}
}