From edf97ac86c94741ae8964b640bdfc0234929c1e4 Mon Sep 17 00:00:00 2001 From: Daan Hoogland Date: Wed, 12 Mar 2014 19:36:11 +0100 Subject: [PATCH] CLOUDSTACK-6232 allow expansion of ip on isolated networks as well --- .../com/cloud/configuration/ConfigurationManagerImpl.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java index 2e2c39faf3c..662eaae930d 100755 --- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java +++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java @@ -2643,9 +2643,10 @@ ConfigurationManagerImpl extends ManagerBase implements ConfigurationManager, Co networkId = network.getId(); zoneId = network.getDataCenterId(); } - } else if (network.getGuestType() == null || network.getGuestType() == Network.GuestType.Isolated) { - throw new InvalidParameterValueException("Can't create direct vlan for network id=" + networkId - + " with type: " + network.getGuestType()); + } else if (network.getGuestType() == null || + (network.getGuestType() == Network.GuestType.Isolated + && _ntwkOffServiceMapDao.areServicesSupportedByNetworkOffering(network.getNetworkOfferingId(), Service.SourceNat))) { + throw new InvalidParameterValueException("Can't create direct vlan for network id=" + networkId + " with type: " + network.getGuestType()); } }