mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-6593: Connectivity service capabilites should be matched with
the provider only if at least one capability is specified Fix avoids the check, and only if the createNetworkOffering 'StrechedL2'Subnet' capability is specified then it should match against 'Connectivity' service provider
This commit is contained in:
parent
d9b4b87c5c
commit
645f165429
|
|
@ -3968,17 +3968,18 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
|
|||
+ " specified with connectivity service.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (providers != null && !providers.isEmpty()) {
|
||||
for (Provider provider: providers) {
|
||||
NetworkElement element = _networkModel.getElementImplementingProvider(provider.getName());
|
||||
Map<Service, Map<Capability, String>> capabilities = element.getCapabilities();
|
||||
if (capabilities != null && !capabilities.isEmpty()) {
|
||||
Map<Capability, String> connectivityCapabilities = capabilities.get(Service.Connectivity);
|
||||
if (connectivityCapabilities == null || (connectivityCapabilities != null && !connectivityCapabilities.keySet().contains(Capability.StretchedL2Subnet))) {
|
||||
throw new InvalidParameterValueException("Provider: " + provider.getName() + " does not support "
|
||||
+ Capability.StretchedL2Subnet.getName());
|
||||
// validate connectivity service provider actually supports specified capabilities
|
||||
if (providers != null && !providers.isEmpty()) {
|
||||
for (Provider provider: providers) {
|
||||
NetworkElement element = _networkModel.getElementImplementingProvider(provider.getName());
|
||||
Map<Service, Map<Capability, String>> capabilities = element.getCapabilities();
|
||||
if (capabilities != null && !capabilities.isEmpty()) {
|
||||
Map<Capability, String> connectivityCapabilities = capabilities.get(Service.Connectivity);
|
||||
if (connectivityCapabilities == null || (connectivityCapabilities != null && !connectivityCapabilities.keySet().contains(Capability.StretchedL2Subnet))) {
|
||||
throw new InvalidParameterValueException("Provider: " + provider.getName() + " does not support "
|
||||
+ Capability.StretchedL2Subnet.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue