cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From weiz...@apache.org
Subject git commit: updated refs/heads/4.2 to 72f013f
Date Tue, 13 Aug 2013 19:39:07 GMT
Updated Branches:
  refs/heads/4.2 0599a8b15 -> 72f013f78


CLOUDSTACK-4296: fix parameter setting error in listVirtualMachines command


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

Branch: refs/heads/4.2
Commit: 72f013f7809db70755f0ff59f8c888d95d5179b5
Parents: 0599a8b
Author: Wei Zhou <w.zhou@leaseweb.com>
Authored: Tue Aug 13 21:38:27 2013 +0200
Committer: Wei Zhou <w.zhou@leaseweb.com>
Committed: Tue Aug 13 21:38:27 2013 +0200

----------------------------------------------------------------------
 .../org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java  | 6 +++---
 server/src/com/cloud/api/query/QueryManagerImpl.java           | 6 +++---
 server/src/com/cloud/api/query/vo/UserVmJoinVO.java            | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/72f013f7/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
index d3b29db..f9258cb 100644
--- a/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
@@ -66,7 +66,7 @@ public class ListVMsCmd extends BaseListTaggedResourcesCmd {
     private Long id;
 
     @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="name of the
virtual machine")
-    private String instanceName;
+    private String name;
 
     @Parameter(name=ApiConstants.POD_ID, type=CommandType.UUID, entityType=PodResponse.class,
             description="the pod ID")
@@ -130,8 +130,8 @@ public class ListVMsCmd extends BaseListTaggedResourcesCmd {
         return id;
     }
 
-    public String getInstanceName() {
-        return instanceName;
+    public String getName() {
+        return name;
     }
 
     public Long getPodId() {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/72f013f7/server/src/com/cloud/api/query/QueryManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/QueryManagerImpl.java b/server/src/com/cloud/api/query/QueryManagerImpl.java
index 359543d..c0180f0 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@@ -721,7 +721,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService
{
         // cmd.getPageSizeVal()); //version without default sorting
         c.addCriteria(Criteria.KEYWORD, cmd.getKeyword());
         c.addCriteria(Criteria.ID, cmd.getId());
-        c.addCriteria(Criteria.NAME, cmd.getInstanceName());
+        c.addCriteria(Criteria.NAME, cmd.getName());
         c.addCriteria(Criteria.STATE, cmd.getState());
         c.addCriteria(Criteria.DATACENTERID, cmd.getZoneId());
         c.addCriteria(Criteria.GROUPID, cmd.getGroupId());
@@ -793,7 +793,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService
{
 
         sb.and("displayName", sb.entity().getDisplayName(), SearchCriteria.Op.LIKE);
         sb.and("id", sb.entity().getId(), SearchCriteria.Op.EQ);
-        sb.and("name", sb.entity().getHostName(), SearchCriteria.Op.LIKE);
+        sb.and("name", sb.entity().getName(), SearchCriteria.Op.LIKE);
         sb.and("stateEQ", sb.entity().getState(), SearchCriteria.Op.EQ);
         sb.and("stateNEQ", sb.entity().getState(), SearchCriteria.Op.NEQ);
         sb.and("stateNIN", sb.entity().getState(), SearchCriteria.Op.NIN);
@@ -851,7 +851,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService
{
         if (keyword != null) {
             SearchCriteria<UserVmJoinVO> ssc = _userVmJoinDao.createSearchCriteria();
             ssc.addOr("displayName", SearchCriteria.Op.LIKE, "%" + keyword + "%");
-            ssc.addOr("hostName", SearchCriteria.Op.LIKE, "%" + keyword + "%");
+            ssc.addOr("name", SearchCriteria.Op.LIKE, "%" + keyword + "%");
             ssc.addOr("instanceName", SearchCriteria.Op.LIKE, "%" + keyword + "%");
             ssc.addOr("state", SearchCriteria.Op.EQ, keyword);
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/72f013f7/server/src/com/cloud/api/query/vo/UserVmJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/UserVmJoinVO.java b/server/src/com/cloud/api/query/vo/UserVmJoinVO.java
index c784104..745db56 100644
--- a/server/src/com/cloud/api/query/vo/UserVmJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/UserVmJoinVO.java
@@ -1653,7 +1653,7 @@ public class UserVmJoinVO extends BaseViewVO implements ControlledViewEntity
{
     @Override
     public String toString() {
         if (toString == null) {
-            toString = new StringBuilder("VM[").append(id).append("|").append(hostName).append("]").toString();
+            toString = new StringBuilder("VM[").append(id).append("|").append(name).append("]").toString();
         }
         return toString;
     }


Mime
View raw message