You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by li...@apache.org on 2014/01/28 12:20:51 UTC
git commit: updated refs/heads/master to 95bd04e
Updated Branches:
refs/heads/master 997c0f8d1 -> 95bd04e44
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/master
Commit: 95bd04e449c346aec0d9bdc30061ad27ea70d75b
Parents: 997c0f8
Author: Likitha Shetty <li...@citrix.com>
Authored: Tue Jan 28 16:01:19 2014 +0530
Committer: Likitha Shetty <li...@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());