Skip to content

Commit 7c5c3c5

Browse files
committed
api: Re-add deleted addProxyObject method on CloudException
- This was removed part of the response work - Re-adding as this kind of method definition is available in several other exception classes and is used in a lot of cmd classes and in service layer - TODO: We need to find a way to replace old code and refactor method with the new definition that gets only uuid. - FIXME: Some tables don't have uuid for ex. ClusterVSMMapVO, in this case we should keep the method until we find a way to fix this issue Partially reverting a88ce6b Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
1 parent 2eee2cd commit 7c5c3c5

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

api/src/com/cloud/exception/CloudException.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,15 @@ public void addProxyObject(String uuid) {
5656
return;
5757
}
5858

59+
public void addProxyObject(Object voObj, Long id, String idFieldName) {
60+
// Get the VO object's table name.
61+
String tablename = AnnotationHelper.getTableName(voObj);
62+
if (tablename != null) {
63+
addProxyObject(tablename, id, idFieldName);
64+
}
65+
return;
66+
}
67+
5968
public ArrayList<String> getIdProxyList() {
6069
return idList;
6170
}

0 commit comments

Comments
 (0)