mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
List default network offerings when multiple physical networks for guest traffic type exists (#10222)
This commit is contained in:
parent
fa5c11e6b2
commit
c1bc57b844
@ -6955,10 +6955,6 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
|
|||||||
sc.addAnd("id", SearchCriteria.Op.EQ, id);
|
sc.addAnd("id", SearchCriteria.Op.EQ, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tags != null) {
|
|
||||||
sc.addAnd("tags", SearchCriteria.Op.EQ, tags);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isTagged != null) {
|
if (isTagged != null) {
|
||||||
if (isTagged) {
|
if (isTagged) {
|
||||||
sc.addAnd("tags", SearchCriteria.Op.NNULL);
|
sc.addAnd("tags", SearchCriteria.Op.NNULL);
|
||||||
@ -6967,6 +6963,17 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tags != null) {
|
||||||
|
if (GuestType.Shared.name().equalsIgnoreCase(guestIpType)) {
|
||||||
|
SearchCriteria<NetworkOfferingJoinVO> tagsSc = networkOfferingJoinDao.createSearchCriteria();
|
||||||
|
tagsSc.addAnd("tags", SearchCriteria.Op.EQ, tags);
|
||||||
|
tagsSc.addOr("isDefault", SearchCriteria.Op.EQ, true);
|
||||||
|
sc.addAnd("tags", SearchCriteria.Op.SC, tagsSc);
|
||||||
|
} else {
|
||||||
|
sc.addAnd("tags", SearchCriteria.Op.EQ, tags);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (zoneId != null) {
|
if (zoneId != null) {
|
||||||
SearchBuilder<NetworkOfferingJoinVO> sb = networkOfferingJoinDao.createSearchBuilder();
|
SearchBuilder<NetworkOfferingJoinVO> sb = networkOfferingJoinDao.createSearchBuilder();
|
||||||
sb.and("zoneId", sb.entity().getZoneId(), SearchCriteria.Op.FIND_IN_SET);
|
sb.and("zoneId", sb.entity().getZoneId(), SearchCriteria.Op.FIND_IN_SET);
|
||||||
@ -7027,7 +7034,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
|
|||||||
boolean addOffering = true;
|
boolean addOffering = true;
|
||||||
List<Service> checkForProviders = new ArrayList<Service>();
|
List<Service> checkForProviders = new ArrayList<Service>();
|
||||||
|
|
||||||
if (checkForTags && ! checkNetworkOfferingTags(pNtwkTags, allowNullTag, offering.getTags())) {
|
if (checkForTags && !checkNetworkOfferingTags(pNtwkTags, allowNullTag, offering.getTags())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user