You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2015/03/26 13:54:29 UTC

git commit: updated refs/heads/master to 0eec4ff

Repository: cloudstack
Updated Branches:
  refs/heads/master 9763c9b84 -> 0eec4ff97


CLOUDSTACK-6353: Fix list to have correct LB IP for each rule

(cherry picked from commit 0fe4acf525824650ea290f09edd5a71ed9e7b053)
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


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

Branch: refs/heads/master
Commit: 0eec4ff9770846a9caf779f12c54ae59263be0e9
Parents: 9763c9b
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Thu Mar 26 18:20:59 2015 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Thu Mar 26 18:24:19 2015 +0530

----------------------------------------------------------------------
 .../user/loadbalancer/ListLoadBalancerRuleInstancesCmd.java     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0eec4ff9/api/src/org/apache/cloudstack/api/command/user/loadbalancer/ListLoadBalancerRuleInstancesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/ListLoadBalancerRuleInstancesCmd.java b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/ListLoadBalancerRuleInstancesCmd.java
index cc4203c..8827557 100644
--- a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/ListLoadBalancerRuleInstancesCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/ListLoadBalancerRuleInstancesCmd.java
@@ -19,6 +19,7 @@ package org.apache.cloudstack.api.command.user.loadbalancer;
 import java.util.ArrayList;
 import java.util.List;
 
+import com.cloud.vm.VirtualMachine;
 import org.apache.cloudstack.api.response.LoadBalancerRuleVmMapResponse;
 import org.apache.log4j.Logger;
 
@@ -129,7 +130,9 @@ public class ListLoadBalancerRuleInstancesCmd extends BaseListCmd {
                     LoadBalancerRuleVmMapResponse lbRuleVmIpResponse = new LoadBalancerRuleVmMapResponse();
                     vmResponses.get(i).setServiceState(serviceStates.get(i));
                     lbRuleVmIpResponse.setUserVmResponse(vmResponses.get(i));
-                    lbRuleVmIpResponse.setIpAddr(_lbService.listLbVmIpAddress(getId(), result.get(i).getId()));
+                    //get vm id from the uuid
+                    VirtualMachine lbvm = _entityMgr.findByUuid(VirtualMachine.class, vmResponses.get(i).getId());
+                    lbRuleVmIpResponse.setIpAddr(_lbService.listLbVmIpAddress(getId(), lbvm.getId()));
                     lbRuleVmIpResponse.setObjectName("lbrulevmidip");
                     listlbVmRes.add(lbRuleVmIpResponse);
                 }