You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pe...@apache.org on 2025/01/20 18:51:40 UTC
(cloudstack) branch list-default-offerings created (now ae061d80529)
This is an automated email from the ASF dual-hosted git repository.
pearl11594 pushed a change to branch list-default-offerings
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
at ae061d80529 List default network offerings when multiple physical networks for guest traffic type exists
This branch includes the following new commits:
new ae061d80529 List default network offerings when multiple physical networks for guest traffic type exists
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(cloudstack) 01/01: List default network offerings when multiple physical networks for guest traffic type exists
Posted by pe...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
pearl11594 pushed a commit to branch list-default-offerings
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit ae061d805294ab521e2047066205dc7fb9e6ac91
Author: Pearl Dsilva <pe...@gmail.com>
AuthorDate: Mon Jan 20 13:47:12 2025 -0500
List default network offerings when multiple physical networks for guest traffic type exists
---
.../com/cloud/configuration/ConfigurationManagerImpl.java | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
index 9df33b47257..0f86179045c 100644
--- a/server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -6955,10 +6955,6 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
sc.addAnd("id", SearchCriteria.Op.EQ, id);
}
- if (tags != null) {
- sc.addAnd("tags", SearchCriteria.Op.EQ, tags);
- }
-
if (isTagged != null) {
if (isTagged) {
sc.addAnd("tags", SearchCriteria.Op.NNULL);
@@ -6967,6 +6963,13 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
}
}
+ if (tags != null) {
+ 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);
+ }
+
if (zoneId != null) {
SearchBuilder<NetworkOfferingJoinVO> sb = networkOfferingJoinDao.createSearchBuilder();
sb.and("zoneId", sb.entity().getZoneId(), SearchCriteria.Op.FIND_IN_SET);
@@ -7027,7 +7030,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
boolean addOffering = true;
List<Service> checkForProviders = new ArrayList<Service>();
- if (checkForTags && ! checkNetworkOfferingTags(pNtwkTags, allowNullTag, offering.getTags())) {
+ if (checkForTags && !checkNetworkOfferingTags(pNtwkTags, allowNullTag, offering.getTags())) {
continue;
}