mirror of https://github.com/apache/cloudstack.git
Make the VpcManager check a list of supported providers
This commit is contained in:
parent
d6f4eaa23c
commit
4aea133fef
|
|
@ -178,6 +178,7 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager{
|
|||
private final ScheduledExecutorService _executor = Executors.newScheduledThreadPool(1, new NamedThreadFactory("VpcChecker"));
|
||||
private VpcProvider vpcElement = null;
|
||||
private final List<Service> nonSupportedServices = Arrays.asList(Service.SecurityGroup, Service.Firewall);
|
||||
private final List<Provider> supportedProviders = Arrays.asList(Provider.VPCVirtualRouter, Provider.NiciraNvp);
|
||||
|
||||
int _cleanupInterval;
|
||||
int _maxNetworks;
|
||||
|
|
@ -994,9 +995,9 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager{
|
|||
//1) in current release, only vpc provider is supported by Vpc offering
|
||||
List<Provider> providers = _ntwkModel.getNtwkOffDistinctProviders(guestNtwkOff.getId());
|
||||
for (Provider provider : providers) {
|
||||
if (provider != Provider.VPCVirtualRouter) {
|
||||
throw new InvalidParameterValueException("Only provider of type " + Provider.VPCVirtualRouter.getName()
|
||||
+ " is supported for network offering that can be used in VPC");
|
||||
if (!supportedProviders.contains(provider) ) {
|
||||
throw new InvalidParameterValueException("Provider of type " + provider.getName()
|
||||
+ " is not supported for network offerings that can be used in VPC");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue