weizhouapache commented on code in PR #7077:
URL: https://github.com/apache/cloudstack/pull/7077#discussion_r1066986020


##########
engine/schema/src/main/java/com/cloud/service/ServiceOfferingVO.java:
##########
@@ -327,7 +327,7 @@ public void setDynamicFlag(boolean isdynamic) {
     }
 
     public boolean isCustomCpuSpeedSupported() {
-        return isCustomized() && getDetail("minCPU") != null;
+        return isCustomized() && getDetail("minCPU") == null;

Review Comment:
   @DaanHoogland 
   there are two types of dynamic service offering
   (1) constraint: speed is fixed. there are max/min cpu and memory.
   (2) uncontraint: cpu/speed/memory are all dynamic.
   
   the `isCustomCpuSpeedSupported` should be true, if the offering is 
unconstraint (speed is not set).
   `getDetail("minCPU") != null` is a way to determine if the offering is 
uncontraint. `speed == null` is a better and simple way.



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