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 1316010F8B for ; Mon, 30 Dec 2013 14:56:02 +0000 (UTC) Received: (qmail 54933 invoked by uid 500); 30 Dec 2013 14:55:52 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 54912 invoked by uid 500); 30 Dec 2013 14:55:49 -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 54894 invoked by uid 99); 30 Dec 2013 14:55:44 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Dec 2013 14:55:44 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id DFDE288CA0A; Mon, 30 Dec 2013 14:55:43 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sanjaytripathi@apache.org To: commits@cloudstack.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/4.3 to 4c95217 Date: Mon, 30 Dec 2013 14:55:43 +0000 (UTC) Updated Branches: refs/heads/4.3 ce38c7195 -> 4c9521726 CLOUDSTACK-5422: Changing XenServer Tools Version 6.1 + doesnt work. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4c952172 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4c952172 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4c952172 Branch: refs/heads/4.3 Commit: 4c9521726bb151428413278a823fde076f8a8a18 Parents: ce38c71 Author: Sanjay Tripathi Authored: Mon Dec 30 19:59:46 2013 +0530 Committer: Sanjay Tripathi Committed: Mon Dec 30 20:11:12 2013 +0530 ---------------------------------------------------------------------- .../src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4c952172/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java index 799690e..5fac449 100644 --- a/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java +++ b/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java @@ -47,9 +47,11 @@ import com.cloud.uservm.UserVm; import com.cloud.utils.db.GenericDaoBase; import com.cloud.utils.db.SearchBuilder; import com.cloud.utils.db.SearchCriteria; +import com.cloud.vm.UserVmDetailVO; import com.cloud.vm.VirtualMachine.State; import com.cloud.vm.VmDetailConstants; import com.cloud.vm.VmStats; +import com.cloud.vm.dao.UserVmDetailsDao; @Component @@ -59,6 +61,8 @@ public class UserVmJoinDaoImpl extends GenericDaoBase implem @Inject private ConfigurationDao _configDao; + @Inject + private UserVmDetailsDao _userVmDetailsDao; private final SearchBuilder VmDetailSearch; private final SearchBuilder activeVmByIsoSearch; @@ -265,10 +269,11 @@ public class UserVmJoinDaoImpl extends GenericDaoBase implem } // set resource details map - // only hypervisortoolsversion can be returned to the end user } - if (userVm.getDetailName() != null && userVm.getDetailName().equalsIgnoreCase(VmDetailConstants.HYPERVISOR_TOOLS_VERSION)){ + // only hypervisortoolsversion can be returned to the end user + UserVmDetailVO hypervisorToolsVersion = _userVmDetailsDao.findDetail(userVm.getId(), VmDetailConstants.HYPERVISOR_TOOLS_VERSION); + if (hypervisorToolsVersion != null) { Map resourceDetails = new HashMap(); - resourceDetails.put(userVm.getDetailName(), userVm.getDetailValue()); + resourceDetails.put(hypervisorToolsVersion.getName(), hypervisorToolsVersion.getValue()); userVmResponse.setDetails(resourceDetails); }