weizhouapache commented on a change in pull request #4376:
URL: https://github.com/apache/cloudstack/pull/4376#discussion_r502630493
##########
File path:
server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
##########
@@ -2343,7 +2343,7 @@ public ServiceOffering createServiceOffering(final
CreateServiceOfferingCmd cmd)
if (cpuNumber != null && (cpuNumber.intValue() <= 0 ||
cpuNumber.longValue() > Integer.MAX_VALUE)) {
throw new InvalidParameterValueException("Failed to create
service offering " + offeringName + ": specify the cpu number value between 1
and " + Integer.MAX_VALUE);
}
- if (cpuSpeed != null && (cpuSpeed.intValue() < 0 ||
cpuSpeed.longValue() > Integer.MAX_VALUE)) {
+ if (cpuSpeed == null || (cpuSpeed.intValue() < 0 ||
cpuSpeed.longValue() > Integer.MAX_VALUE)) {
Review comment:
@sureshanaparti cpuNumber and memory are not mandatory for dynamic
offerings.
There are 3 types of offerings
(1) fixed offering, cpu number, cpu speed, memory are mandatory
(2) dynamic offering,
(2.1) unconstrained offering, cpu number, cpu speed, memory are not required
(2.2) constrained offerings, min/max cpu, min/max memory, and cpu speed are
mandatory.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]