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 A64B81096C for ; Wed, 11 Mar 2015 11:09:42 +0000 (UTC) Received: (qmail 33397 invoked by uid 500); 11 Mar 2015 11:09:26 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 33362 invoked by uid 500); 11 Mar 2015 11:09:26 -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 33353 invoked by uid 99); 11 Mar 2015 11:09:26 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Mar 2015 11:09:26 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 5DEC7E0AB7; Wed, 11 Mar 2015 11:09:26 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: bhaisaab@apache.org To: commits@cloudstack.apache.org Message-Id: <0b3922c22ab242339a0480608de7265e@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/4.5 to eca7f9c Date: Wed, 11 Mar 2015 11:09:26 +0000 (UTC) Repository: cloudstack Updated Branches: refs/heads/4.5 02cadc3fb -> eca7f9cac CLOUDSTACK-8315: CS API listVMSnapshot doesn't have tags ‘project’ and ‘projectid’. (cherry picked from commit 182d770f9f5fef26e5136b20ee71c34e5327ca43) Signed-off-by: Rohit Yadav Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/eca7f9ca Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/eca7f9ca Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/eca7f9ca Branch: refs/heads/4.5 Commit: eca7f9cacc23d4347852386b4f358f3ab0884adc Parents: 02cadc3 Author: Sanjay Tripathi Authored: Wed Mar 11 13:26:08 2015 +0530 Committer: Rohit Yadav Committed: Wed Mar 11 16:39:18 2015 +0530 ---------------------------------------------------------------------- server/src/com/cloud/api/ApiResponseHelper.java | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/eca7f9ca/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 abd2be9..9f066fb 100755 --- a/server/src/com/cloud/api/ApiResponseHelper.java +++ b/server/src/com/cloud/api/ApiResponseHelper.java @@ -510,6 +510,11 @@ public class ApiResponseHelper implements ResponseGenerator { vmSnapshotResponse.setParentName(vmSnapshotParent.getDisplayName()); } } + Project project = ApiDBUtils.findProjectByProjectAccountId(vmSnapshot.getAccountId()); + if (project != null) { + vmSnapshotResponse.setProjectId(project.getUuid()); + vmSnapshotResponse.setProjectName(project.getName()); + } vmSnapshotResponse.setCurrent(vmSnapshot.getCurrent()); vmSnapshotResponse.setType(vmSnapshot.getType().toString()); vmSnapshotResponse.setObjectName("vmsnapshot");