@@ -3457,10 +3457,6 @@ private Ternary<List<Long>, Integer, String[]> searchForDiskOfferingsIdsAndCount
34573457 diskOfferingSearch .and ("state" , diskOfferingSearch .entity ().getState (), Op .EQ );
34583458 }
34593459
3460- if (tags != null ) {
3461- diskOfferingSearch .and ("tags" , diskOfferingSearch .entity ().getTags (), Op .EQ );
3462- }
3463-
34643460 // Keeping this logic consistent with domain specific zones
34653461 // if a domainId is provided, we just return the disk offering
34663462 // associated with this domain
@@ -3525,6 +3521,10 @@ private Ternary<List<Long>, Integer, String[]> searchForDiskOfferingsIdsAndCount
35253521 diskOfferingSearch .and ("encrypt" , diskOfferingSearch .entity ().getEncrypt (), Op .EQ );
35263522 }
35273523
3524+ if (tags != null ) {
3525+ diskOfferingSearch .and ("tags" , diskOfferingSearch .entity ().getTags (), Op .EQ );
3526+ }
3527+
35283528 if (storageType != null || zoneId != null ) {
35293529 diskOfferingSearch .and ("useLocalStorage" , diskOfferingSearch .entity ().isUseLocalStorage (), Op .EQ );
35303530 }
@@ -3594,6 +3594,10 @@ private Ternary<List<Long>, Integer, String[]> searchForDiskOfferingsIdsAndCount
35943594 sc .setParameters ("encrypt" , encrypt );
35953595 }
35963596
3597+ if (tags != null ) {
3598+ sc .setParameters ("tags" , tags );
3599+ }
3600+
35973601 if (storageType != null ) {
35983602 if (storageType .equalsIgnoreCase (ServiceOffering .StorageType .local .toString ())) {
35993603 sc .setParameters ("useLocalStorage" , true );
0 commit comments