mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
bug 3120: incremental checkin
This commit is contained in:
parent
131e487c32
commit
6731dc66f1
@ -48,7 +48,8 @@ public class AssociateIPAddrCmd extends BaseCmd {
|
||||
s_properties.add(new Pair<Enum, Boolean>(BaseCmd.Properties.DOMAIN_ID, Boolean.FALSE));
|
||||
s_properties.add(new Pair<Enum, Boolean>(BaseCmd.Properties.ACCOUNT_OBJ, Boolean.FALSE));
|
||||
s_properties.add(new Pair<Enum, Boolean>(BaseCmd.Properties.USER_ID, Boolean.FALSE));
|
||||
s_properties.add(new Pair<Enum, Boolean>(BaseCmd.Properties.ZONE_ID, Boolean.TRUE));
|
||||
s_properties.add(new Pair<Enum, Boolean>(BaseCmd.Properties.ZONE_ID, Boolean.TRUE));
|
||||
s_properties.add(new Pair<Enum, Boolean>(BaseCmd.Properties.VIRTUAL_MACHINE_ID, Boolean.FALSE));
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
@ -69,7 +70,8 @@ public class AssociateIPAddrCmd extends BaseCmd {
|
||||
Account account = (Account)params.get(BaseCmd.Properties.ACCOUNT_OBJ.getName());
|
||||
Long userId = (Long)params.get(BaseCmd.Properties.USER_ID.getName());
|
||||
String accountName = (String)params.get(BaseCmd.Properties.ACCOUNT.getName());
|
||||
Long domainId = (Long)params.get(BaseCmd.Properties.DOMAIN_ID.getName());
|
||||
Long domainId = (Long)params.get(BaseCmd.Properties.DOMAIN_ID.getName());
|
||||
Long vmId = (Long)params.get(BaseCmd.Properties.VIRTUAL_MACHINE_ID.getName());
|
||||
String newIpAddr = null;
|
||||
String errorDesc = null;
|
||||
Long accountId = null;
|
||||
@ -104,7 +106,13 @@ public class AssociateIPAddrCmd extends BaseCmd {
|
||||
if (userId == null) {
|
||||
userId = Long.valueOf(1);
|
||||
}
|
||||
|
||||
|
||||
//vmId == 0 => general flow
|
||||
//vmId = 1 => 1:1 NAT
|
||||
if(vmId == null){
|
||||
vmId = Long.valueOf(0);
|
||||
}
|
||||
|
||||
try {
|
||||
newIpAddr = getManagementServer().associateIpAddress(userId.longValue(), accountId.longValue(), domainId.longValue(), zoneId.longValue());
|
||||
} catch (ResourceAllocationException rae) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user