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:
Kui LIU 2018-04-23 16:54:38 +02:00 committed by dahn
parent 9187392ff9
commit f8b6375465
2 changed files with 4 additions and 4 deletions

View File

@ -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);
}

View File

@ -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());