mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
CLOUDSTACK-10359: Change the inconsistent method names. (#2591)
* CLOUDSTACK-10359: Change the inconsistent method names. The two methods are named "getXXX". The two method are checking the status of variables. "getCustomized" is not as intuitive as "isCustomized". "getIsSystem" is not as intuitive as "isSystem" as well. * Add the missing changes of all usages of method getIsSystem.
This commit is contained in:
parent
9187392ff9
commit
f8b6375465
@ -194,7 +194,7 @@ public class CreateServiceOfferingCmd extends BaseCmd {
|
||||
return hostTag;
|
||||
}
|
||||
|
||||
public Boolean getIsSystem() {
|
||||
public Boolean isSystem() {
|
||||
return isSystem == null ? false : isSystem;
|
||||
}
|
||||
|
||||
@ -210,7 +210,7 @@ public class CreateServiceOfferingCmd extends BaseCmd {
|
||||
return deploymentPlanner;
|
||||
}
|
||||
|
||||
public boolean getCustomized() {
|
||||
public boolean isCustomized() {
|
||||
return (cpuNumber == null || memory == null || cpuSpeed == null);
|
||||
}
|
||||
|
||||
|
||||
@ -2279,7 +2279,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
|
||||
|
||||
Boolean isCustomizedIops;
|
||||
|
||||
if (cmd.getIsSystem()) {
|
||||
if (cmd.isSystem()) {
|
||||
if (vmTypeString == null || VirtualMachine.Type.DomainRouter.toString().toLowerCase().equals(vmTypeString)) {
|
||||
vmType = VirtualMachine.Type.DomainRouter;
|
||||
allowNetworkRate = true;
|
||||
@ -2328,7 +2328,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
|
||||
}
|
||||
}
|
||||
|
||||
return createServiceOffering(userId, cmd.getIsSystem(), vmType, cmd.getServiceOfferingName(), cpuNumber, memory, cpuSpeed, cmd.getDisplayText(),
|
||||
return createServiceOffering(userId, cmd.isSystem(), vmType, cmd.getServiceOfferingName(), cpuNumber, memory, cpuSpeed, cmd.getDisplayText(),
|
||||
cmd.getProvisioningType(), localStorageRequired, offerHA, limitCpuUse, volatileVm, cmd.getTags(), cmd.getDomainId(), cmd.getHostTag(),
|
||||
cmd.getNetworkRate(), cmd.getDeploymentPlanner(), cmd.getDetails(), isCustomizedIops, cmd.getMinIops(), cmd.getMaxIops(),
|
||||
cmd.getBytesReadRate(), cmd.getBytesWriteRate(), cmd.getIopsReadRate(), cmd.getIopsWriteRate(), cmd.getHypervisorSnapshotReserve());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user