mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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
2df5df1b68
commit
e18ff2821d
@ -3979,17 +3979,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…
x
Reference in New Issue
Block a user