Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List default network offerings when multiple physical networks for guest traffic type exists #10222

Merged
merged 2 commits into from
Feb 3, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6955,10 +6955,6 @@
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);
Expand All @@ -6967,6 +6963,13 @@
}
}

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);

Check warning on line 6970 in server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java

View check run for this annotation

Codecov / codecov/patch

server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java#L6967-L6970

Added lines #L6967 - L6970 were not covered by tests
}

if (zoneId != null) {
SearchBuilder<NetworkOfferingJoinVO> sb = networkOfferingJoinDao.createSearchBuilder();
sb.and("zoneId", sb.entity().getZoneId(), SearchCriteria.Op.FIND_IN_SET);
Expand Down Expand Up @@ -7027,7 +7030,7 @@
boolean addOffering = true;
List<Service> checkForProviders = new ArrayList<Service>();

if (checkForTags && ! checkNetworkOfferingTags(pNtwkTags, allowNullTag, offering.getTags())) {
if (checkForTags && !checkNetworkOfferingTags(pNtwkTags, allowNullTag, offering.getTags())) {
continue;
}

Expand Down
Loading