From 37d9b5ab50bae5f232ad3a1d5eb81b0f116c0c93 Mon Sep 17 00:00:00 2001 From: alena Date: Wed, 9 Mar 2011 18:17:01 -0800 Subject: [PATCH] bug 8849: Don't allow create Guest Virtual and Direct shared networks in Security Group enabled zone status 8849: resolved fixed --- server/src/com/cloud/network/NetworkManagerImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java b/server/src/com/cloud/network/NetworkManagerImpl.java index 97e1ee829e5..022bed91776 100755 --- a/server/src/com/cloud/network/NetworkManagerImpl.java +++ b/server/src/com/cloud/network/NetworkManagerImpl.java @@ -1520,8 +1520,8 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag throw new InvalidParameterValueException("Network creation is not allowed in zone with network type " + NetworkType.Basic); } - if (zone.isSecurityGroupEnabled() && networkOffering.getGuestType() == GuestIpType.Virtual) { - throw new InvalidParameterValueException("Virtual Network creation is not allowd if zone is security group enabled"); + if (zone.isSecurityGroupEnabled() && (networkOffering.getGuestType() == GuestIpType.Virtual || (isShared != null && isShared))) { + throw new InvalidParameterValueException("Virtual Network and Direct Shared Network creation is not allowed if zone is security group enabled"); } if (zone.isSecurityGroupEnabled() && cmd.getAccountName() == null) {