mirror of https://github.com/apache/cloudstack.git
bug 13813: fixed network offering search to use traffic type when locate physical network in the zone
status 13813: resolved fixed Reviewed-by: Frank
This commit is contained in:
parent
de2ae87859
commit
995586495f
|
|
@ -3525,7 +3525,7 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
|
|||
checkForProviders = _networkMgr.listNetworkOfferingServices(offering.getId());
|
||||
}
|
||||
|
||||
addOffering = addOffering && _networkMgr.areServicesEnabledInZone(zoneId, offering.getId(), offering.getTags(), checkForProviders);
|
||||
addOffering = addOffering && _networkMgr.areServicesEnabledInZone(zoneId, offering, checkForProviders);
|
||||
}
|
||||
|
||||
if (sourceNatSupported != null) {
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ public interface NetworkManager extends NetworkService {
|
|||
|
||||
List<Service> listNetworkOfferingServices(long networkOfferingId);
|
||||
|
||||
boolean areServicesEnabledInZone(long zoneId, long networkOfferingId, String tags, List<Service> services);
|
||||
boolean areServicesEnabledInZone(long zoneId, NetworkOffering offering, List<Service> services);
|
||||
|
||||
public Map<PublicIp, Set<Service>> getIpToServices(List<PublicIp> publicIps, boolean rulesRevoked, boolean includingFirewall);
|
||||
|
||||
|
|
|
|||
|
|
@ -6040,13 +6040,13 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean areServicesEnabledInZone(long zoneId, long networkOfferingId, String tags, List<Service> services) {
|
||||
long physicalNtwkId = findPhysicalNetworkId(zoneId, tags, null);
|
||||
public boolean areServicesEnabledInZone(long zoneId, NetworkOffering offering, List<Service> services) {
|
||||
long physicalNtwkId = findPhysicalNetworkId(zoneId, offering.getTags(), offering.getTrafficType());
|
||||
boolean result = true;
|
||||
List<String> checkedProvider = new ArrayList<String>();
|
||||
for (Service service : services) {
|
||||
// get all the providers, and check if each provider is enabled
|
||||
List<String> providerNames = _ntwkOfferingSrvcDao.listProvidersForServiceForNetworkOffering(networkOfferingId, service);
|
||||
List<String> providerNames = _ntwkOfferingSrvcDao.listProvidersForServiceForNetworkOffering(offering.getId(), service);
|
||||
for (String providerName : providerNames) {
|
||||
if (!checkedProvider.contains(providerName)) {
|
||||
result = result && isProviderEnabledInPhysicalNetwork(physicalNtwkId, providerName);
|
||||
|
|
|
|||
|
|
@ -739,7 +739,7 @@ public class MockNetworkManagerImpl implements NetworkManager, Manager, NetworkS
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean areServicesEnabledInZone(long zoneId, long networkOfferingId, String tags, List<Service> services) {
|
||||
public boolean areServicesEnabledInZone(long zoneId, NetworkOffering offering, List<Service> services) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue