You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mc...@apache.org on 2013/02/14 21:02:36 UTC

git commit: refs/heads/4.1 - CLOUDSTACK-1277: populating transit password field to UserVmJoinVO in converting from UserVm to UserVmJoinVO.

Updated Branches:
  refs/heads/4.1 86bb0055c -> 07ce770e9


CLOUDSTACK-1277: populating transit password field to UserVmJoinVO in
converting from UserVm to UserVmJoinVO.

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

Branch: refs/heads/4.1
Commit: 07ce770e9711ab5ddfc9382129b35c96aadc7846
Parents: 86bb005
Author: Min Chen <mi...@citrix.com>
Authored: Thu Feb 14 12:01:40 2013 -0800
Committer: Min Chen <mi...@citrix.com>
Committed: Thu Feb 14 12:01:40 2013 -0800

----------------------------------------------------------------------
 .../com/cloud/api/query/dao/UserVmJoinDaoImpl.java |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/07ce770e/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 6f5587f..4a5ac33 100644
--- a/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
@@ -327,7 +327,15 @@ public class UserVmJoinDaoImpl extends GenericDaoBase<UserVmJoinVO, Long> implem
         }
 
         Set<Long> vmIdSet = userVmDataHash.keySet();
-        return searchByIds(vmIdSet.toArray(new Long[vmIdSet.size()]));
+        List<UserVmJoinVO> uvms = searchByIds(vmIdSet.toArray(new Long[vmIdSet.size()]));
+        // populate transit password field from UserVm
+        if ( uvms != null ){
+            for (UserVmJoinVO uvm : uvms){
+                UserVm v = userVmDataHash.get(uvm.getId());
+                uvm.setPassword(v.getPassword());
+            }
+        }
+        return uvms;
     }
 
 }