Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A8CEB178E3 for ; Tue, 21 Oct 2014 14:57:01 +0000 (UTC) Received: (qmail 61774 invoked by uid 500); 21 Oct 2014 14:56:41 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 61444 invoked by uid 500); 21 Oct 2014 14:56:40 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 60357 invoked by uid 99); 21 Oct 2014 14:56:39 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Oct 2014 14:56:39 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 991CF8B753B; Tue, 21 Oct 2014 14:56:39 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: kishan@apache.org To: commits@cloudstack.apache.org Date: Tue, 21 Oct 2014 14:57:02 -0000 Message-Id: <4912a612d0124192a054ca370e2a856d@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [24/50] [abbrv] git commit: updated refs/heads/baremetal-systemvm to 23482b1 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 Authored: Wed Oct 15 16:53:26 2014 +0530 Committer: Kishan Kavala 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());