From f2c1291f6d09dbd55cc53bbdbdc13108e122e5ef Mon Sep 17 00:00:00 2001 From: alena Date: Tue, 16 Nov 2010 18:51:28 -0800 Subject: [PATCH] Don't allow to update zone with new guestVlan range if the zone's network type is Basic --- .../com/cloud/configuration/ConfigurationManagerImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java index 2926dd31bbb..ceff0b37611 100755 --- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java +++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java @@ -877,6 +877,11 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura if (zoneName == null) { zoneName = zone.getName(); } + + //if zone is of Basic type, don't allow to add vnet range + if (vnetRange != null && zone.getNetworkType() == DataCenterNetworkType.Basic) { + throw new InvalidParameterValueException("Can't add vnet range for the zone that supports Basic network"); + } // Make sure the zone exists if (!validZone(zoneId)) {