Pearl1594 commented on code in PR #9546:
URL: https://github.com/apache/cloudstack/pull/9546#discussion_r1723745815


##########
server/src/main/java/com/cloud/api/query/QueryManagerImpl.java:
##########
@@ -3913,8 +3915,7 @@ private Pair<List<Long>, Integer> 
searchForServiceOfferingIdsAndCount(ListServic
             }
 
             serviceOfferingSearch.join("diskOfferingSearch", 
diskOfferingSearch, JoinBuilder.JoinType.INNER, JoinBuilder.JoinCondition.AND,
-                    serviceOfferingSearch.entity().getDiskOfferingId(), 
diskOfferingSearch.entity().getId(),
-                    serviceOfferingSearch.entity().setString("Active"), 
diskOfferingSearch.entity().getState());
+                    serviceOfferingSearch.entity().getDiskOfferingId(), 
diskOfferingSearch.entity().getId());

Review Comment:
   Since this PR aims to support disabling service offerings - to make it 
similar to the way network offerings work, it would make sense to list active 
and inactive offerings 



##########
engine/schema/src/main/java/com/cloud/vm/dao/VMInstanceDaoImpl.java:
##########
@@ -325,6 +326,10 @@ protected void init() {
         VmsNotInClusterUsingPool.join("hostSearch2", hostSearch2, 
hostSearch2.entity().getId(), VmsNotInClusterUsingPool.entity().getHostId(), 
JoinType.INNER);
         VmsNotInClusterUsingPool.and("vmStates", 
VmsNotInClusterUsingPool.entity().getState(), Op.IN);
         VmsNotInClusterUsingPool.done();
+
+        ServiceOfferingSearch = createSearchBuilder();
+        ServiceOfferingSearch.and("serviceOfferingId", 
ServiceOfferingSearch.entity().getServiceOfferingId(), Op.EQ);
+        BackupSearch.done();

Review Comment:
   You're right



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to