cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gir...@apache.org
Subject [17/50] git commit: updated refs/heads/marvin to df58f51
Date Wed, 29 Jan 2014 08:53:52 GMT
CLOUDSTACK-5965. VM displayname is not returned by API.
If user doesn't supply a display name during VM launch, default it to VM name(uuid) in listVM
response.


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

Branch: refs/heads/marvin
Commit: 95bd04e449c346aec0d9bdc30061ad27ea70d75b
Parents: 997c0f8
Author: Likitha Shetty <likitha.shetty@citrix.com>
Authored: Tue Jan 28 16:01:19 2014 +0530
Committer: Likitha Shetty <likitha.shetty@citrix.com>
Committed: Tue Jan 28 16:43:12 2014 +0530

----------------------------------------------------------------------
 server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/95bd04e4/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 07449a2..08478e2 100644
--- a/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
@@ -99,7 +99,11 @@ public class UserVmJoinDaoImpl extends GenericDaoBase<UserVmJoinVO,
Long> implem
         userVmResponse.setId(userVm.getUuid());
         userVmResponse.setName(userVm.getName());
 
-        userVmResponse.setDisplayName(userVm.getDisplayName());
+        if (userVm.getDisplayName() != null) {
+            userVmResponse.setDisplayName(userVm.getDisplayName());
+        } else {
+            userVmResponse.setDisplayName(userVm.getName());
+        }
 
         if (userVm.getAccountType() == Account.ACCOUNT_TYPE_PROJECT) {
             userVmResponse.setProjectId(userVm.getProjectUuid());


Mime
View raw message