mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
CLOUDSTACK-6327 updated uuid to id mapping
This commit is contained in:
parent
cc2892c782
commit
78a29c0d41
@ -137,7 +137,12 @@ public class AssignToLoadBalancerRuleCmd extends BaseAsyncCmd {
|
||||
String vmId = idIpsMap.get("vmid");
|
||||
String vmIp = idIpsMap.get("vmip");
|
||||
|
||||
Long longVmId = new Long(vmId);
|
||||
VirtualMachine lbvm = _entityMgr.findByUuid(VirtualMachine.class, vmId);
|
||||
if (lbvm == null) {
|
||||
throw new InvalidParameterValueException("Unable to find virtual machine ID: " + vmId);
|
||||
}
|
||||
|
||||
Long longVmId = lbvm.getId();
|
||||
|
||||
List<String> ipsList = null;
|
||||
if (vmIdIpsMap.containsKey(longVmId)) {
|
||||
|
||||
@ -23,6 +23,7 @@ import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.cloud.vm.VirtualMachine;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import org.apache.cloudstack.api.APICommand;
|
||||
@ -126,7 +127,12 @@ public class RemoveFromLoadBalancerRuleCmd extends BaseAsyncCmd {
|
||||
String vmId = idIpsMap.get("vmid");
|
||||
String vmIp = idIpsMap.get("vmip");
|
||||
|
||||
Long longVmId = new Long(vmId);
|
||||
VirtualMachine lbvm = _entityMgr.findByUuid(VirtualMachine.class, vmId);
|
||||
if (lbvm == null) {
|
||||
throw new InvalidParameterValueException("Unable to find virtual machine ID: " + vmId);
|
||||
}
|
||||
|
||||
Long longVmId = lbvm.getId();
|
||||
|
||||
List<String> ipsList = null;
|
||||
if (vmIdIpsMap.containsKey(longVmId)) {
|
||||
|
||||
@ -1382,7 +1382,7 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase implements
|
||||
s_logger.warn("Unable to apply the load balancer config because resource is unavaliable.", e);
|
||||
}
|
||||
if (!success) {
|
||||
CloudRuntimeException ex = new CloudRuntimeException("Failed to remove specified load balancer rule id for vms " + instanceIds);
|
||||
CloudRuntimeException ex = new CloudRuntimeException("Failed to remove specified load balancer rule id for vms " + vmIds);
|
||||
ex.addProxyObject(loadBalancer.getUuid(), "loadBalancerId");
|
||||
throw ex;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user