Once again allow a VM to be on multiple networks from VPCs (#3754)

to once again allow a VM to be on multiple networks from VPCs
This commit is contained in:
dahn 2019-12-20 14:10:02 +01:00 committed by GitHub
parent 5afff61e6f
commit 0b34971b6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3613,7 +3613,6 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir
short defaultNetworkNumber = 0;
boolean securityGroupEnabled = false;
boolean vpcNetwork = false;
for (NetworkVO network : networkList) {
if ((network.getDataCenterId() != zone.getId())) {
if (!network.isStrechedL2Network()) {
@ -3684,14 +3683,6 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir
securityGroupEnabled = true;
}
// vm can't be a part of more than 1 VPC network
if (network.getVpcId() != null) {
if (vpcNetwork) {
throw new InvalidParameterValueException("Vm can't be a part of more than 1 VPC network");
}
vpcNetwork = true;
}
networkNicMap.put(network.getUuid(), profile);
}