mirror of https://github.com/apache/cloudstack.git
DeployVm: when SG enabled network is passed to the command, but no SG list is defined in the request, add the vm to SG enabled network automatically
Conflicts: server/src/com/cloud/vm/UserVmManagerImpl.java
This commit is contained in:
parent
74622a4dc3
commit
6d9cafbf35
|
|
@ -2145,8 +2145,13 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
|
|||
}
|
||||
|
||||
boolean isSecurityGroupEnabled = _networkMgr.isSecurityGroupSupportedInNetwork(network);
|
||||
if (isSecurityGroupEnabled && networkIdList.size() > 1) {
|
||||
throw new InvalidParameterValueException("Can't create a vm with multiple networks one of which is Security Group enabled");
|
||||
if (isSecurityGroupEnabled) {
|
||||
if (networkIdList.size() > 1) {
|
||||
throw new InvalidParameterValueException("Can't create a vm with multiple networks one of" +
|
||||
" which is Security Group enabled");
|
||||
}
|
||||
|
||||
isSecurityGroupEnabledNetworkUsed = true;
|
||||
}
|
||||
|
||||
if (network.getTrafficType() != TrafficType.Guest || network.getGuestType() != Network.GuestType.Shared || (network.getGuestType() == Network.GuestType.Shared && !isSecurityGroupEnabled)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue