cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kis...@apache.org
Subject [24/50] [abbrv] git commit: updated refs/heads/baremetal-systemvm to 23482b1
Date Tue, 21 Oct 2014 14:57:02 GMT
CLOUDSTACK-7729: listVMSnapshot API not returning parent id in response


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7fe3c451
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7fe3c451
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7fe3c451

Branch: refs/heads/baremetal-systemvm
Commit: 7fe3c45142172e003fda340f779567f73525ffd8
Parents: 55e11cd
Author: Damodar <damoder.reddy@citrix.com>
Authored: Wed Oct 15 16:53:26 2014 +0530
Committer: Kishan Kavala <kishan@apache.org>
Committed: Thu Oct 16 09:43:04 2014 +0530

----------------------------------------------------------------------
 .../cloudstack/api/response/VMSnapshotResponse.java       | 10 +++++++++-
 server/src/com/cloud/api/ApiResponseHelper.java           |  4 +++-
 2 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7fe3c451/api/src/org/apache/cloudstack/api/response/VMSnapshotResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/VMSnapshotResponse.java b/api/src/org/apache/cloudstack/api/response/VMSnapshotResponse.java
index 168c548..29d06b9 100644
--- a/api/src/org/apache/cloudstack/api/response/VMSnapshotResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/VMSnapshotResponse.java
@@ -184,7 +184,15 @@ public class VMSnapshotResponse extends BaseResponse implements ControlledEntity
         return parentName;
     }
 
-    public String getType() {
+    public String getParent() {
+      return parent;
+    }
+
+    public void setParent(String parent) {
+      this.parent = parent;
+    }
+
+  public String getType() {
         return type;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7fe3c451/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index 50376d2..38784ae 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -529,7 +529,9 @@ public class ApiResponseHelper implements ResponseGenerator {
             vmSnapshotResponse.setVirtualMachineid(vm.getUuid());
         }
         if (vmSnapshot.getParent() != null) {
-            vmSnapshotResponse.setParentName(ApiDBUtils.getVMSnapshotById(vmSnapshot.getParent()).getDisplayName());
+            VMSnapshot vmSnapshotParent = ApiDBUtils.getVMSnapshotById(vmSnapshot.getParent());
+            vmSnapshotResponse.setParent(vmSnapshotParent.getUuid());
+            vmSnapshotResponse.setParentName(vmSnapshotParent.getDisplayName());
         }
         vmSnapshotResponse.setCurrent(vmSnapshot.getCurrent());
         vmSnapshotResponse.setType(vmSnapshot.getType().toString());


Mime
View raw message