cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sanjaytripa...@apache.org
Subject git commit: updated refs/heads/4.3 to 4c95217
Date Mon, 30 Dec 2013 14:55:43 GMT
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 <sanjay.tripathi@citrix.com>
Authored: Mon Dec 30 19:59:46 2013 +0530
Committer: Sanjay Tripathi <sanjay.tripathi@citrix.com>
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<UserVmJoinVO, Long>
implem
 
     @Inject
     private ConfigurationDao  _configDao;
+    @Inject
+    private UserVmDetailsDao _userVmDetailsDao;
 
     private final SearchBuilder<UserVmJoinVO> VmDetailSearch;
     private final SearchBuilder<UserVmJoinVO> activeVmByIsoSearch;
@@ -265,10 +269,11 @@ public class UserVmJoinDaoImpl extends GenericDaoBase<UserVmJoinVO,
Long> 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<String, String> resourceDetails = new HashMap<String, String>();
-            resourceDetails.put(userVm.getDetailName(), userVm.getDetailValue());
+            resourceDetails.put(hypervisorToolsVersion.getName(), hypervisorToolsVersion.getValue());
             userVmResponse.setDetails(resourceDetails);
         }
 


Mime
View raw message