Skip to content

Commit b5c8a56

Browse files
author
Daan Hoogland
committed
CLOUDSTACK-6232 allow expansion of ip on isolated networks as well
1 parent 6c03524 commit b5c8a56

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎server/src/com/cloud/configuration/ConfigurationManagerImpl.java‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
import javax.inject.Inject;
3737
import javax.naming.ConfigurationException;
3838

39+
import org.apache.log4j.Logger;
40+
3941
import org.apache.cloudstack.acl.SecurityChecker;
4042
import org.apache.cloudstack.affinity.AffinityGroup;
4143
import org.apache.cloudstack.affinity.AffinityGroupService;
@@ -83,7 +85,6 @@
8385
import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
8486
import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
8587
import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
86-
import org.apache.log4j.Logger;
8788

8889
import com.cloud.alert.AlertManager;
8990
import com.cloud.api.ApiDBUtils;
@@ -2623,7 +2624,9 @@ public Vlan createVlanAndPublicIpRange(CreateVlanIpRangeCmd cmd) throws Insuffic
26232624
networkId = network.getId();
26242625
zoneId = network.getDataCenterId();
26252626
}
2626-
} else if (network.getGuestType() == null || network.getGuestType() == Network.GuestType.Isolated) {
2627+
} else if (network.getGuestType() == null ||
2628+
(network.getGuestType() == Network.GuestType.Isolated
2629+
&& _ntwkOffServiceMapDao.areServicesSupportedByNetworkOffering(network.getNetworkOfferingId(), Service.SourceNat))) {
26272630
throw new InvalidParameterValueException("Can't create direct vlan for network id=" + networkId + " with type: " + network.getGuestType());
26282631
}
26292632
}

0 commit comments

Comments
 (0)