From ac8524da512fa5220212362571917059b28c23d4 Mon Sep 17 00:00:00 2001 From: Edison Su Date: Fri, 25 Feb 2011 15:30:02 -0500 Subject: [PATCH] creating zone wide vlan is disabled if zone is security group enabled --- server/src/com/cloud/network/NetworkManagerImpl.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java b/server/src/com/cloud/network/NetworkManagerImpl.java index 5480cd7d5ee..d2a5900ce1c 100755 --- a/server/src/com/cloud/network/NetworkManagerImpl.java +++ b/server/src/com/cloud/network/NetworkManagerImpl.java @@ -1499,6 +1499,10 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag throw new InvalidParameterValueException("Virtual Network creation is not allowd if zone is security group enabled"); } + if (zone.isSecurityGroupEnabled() && cmd.getAccountName() == null) { + throw new InvalidParameterValueException("Can't create a zone wide network if zone is security group enabled"); + } + //If one of the following parameters are defined (starIP/endIP/netmask/gateway), all the rest should be defined too ArrayList networkConfigs = new ArrayList(); networkConfigs.add(gateway);