mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
refactoring
Signed-off-by: Abhishek Kumar <abhishek.kumar@shapeblue.com>
This commit is contained in:
parent
977c5b7614
commit
e2bb43a392
@ -181,7 +181,7 @@ public class CreateDiskOfferingCmd extends BaseCmd {
|
||||
}
|
||||
|
||||
public List<Long> getDomainIds() {
|
||||
if(CollectionUtils.isNotEmpty(domainIds)) {
|
||||
if (CollectionUtils.isNotEmpty(domainIds)) {
|
||||
Set<Long> set = new LinkedHashSet<>(domainIds);
|
||||
domainIds.clear();
|
||||
domainIds.addAll(set);
|
||||
@ -190,7 +190,7 @@ public class CreateDiskOfferingCmd extends BaseCmd {
|
||||
}
|
||||
|
||||
public List<Long> getZoneIds() {
|
||||
if(CollectionUtils.isNotEmpty(zoneIds)) {
|
||||
if (CollectionUtils.isNotEmpty(zoneIds)) {
|
||||
Set<Long> set = new LinkedHashSet<>(zoneIds);
|
||||
zoneIds.clear();
|
||||
zoneIds.addAll(set);
|
||||
@ -250,7 +250,7 @@ public class CreateDiskOfferingCmd extends BaseCmd {
|
||||
return storageType;
|
||||
}
|
||||
|
||||
public String getProvisioningType(){
|
||||
public String getProvisioningType() {
|
||||
return provisioningType;
|
||||
}
|
||||
|
||||
|
||||
@ -77,8 +77,8 @@ public class CreateServiceOfferingCmd extends BaseCmd {
|
||||
private Boolean limitCpuUse;
|
||||
|
||||
@Parameter(name = ApiConstants.IS_VOLATILE,
|
||||
type = CommandType.BOOLEAN,
|
||||
description = "true if the virtual machine needs to be volatile so that on every reboot of VM, original root disk is dettached then destroyed and a fresh root disk is created and attached to VM")
|
||||
type = CommandType.BOOLEAN,
|
||||
description = "true if the virtual machine needs to be volatile so that on every reboot of VM, original root disk is dettached then destroyed and a fresh root disk is created and attached to VM")
|
||||
private Boolean isVolatile;
|
||||
|
||||
@Parameter(name = ApiConstants.STORAGE_TYPE, type = CommandType.STRING, description = "the storage type of the service offering. Values are local and shared.")
|
||||
@ -109,18 +109,18 @@ public class CreateServiceOfferingCmd extends BaseCmd {
|
||||
private Boolean isSystem;
|
||||
|
||||
@Parameter(name = ApiConstants.SYSTEM_VM_TYPE,
|
||||
type = CommandType.STRING,
|
||||
description = "the system VM type. Possible types are \"domainrouter\", \"consoleproxy\" and \"secondarystoragevm\".")
|
||||
type = CommandType.STRING,
|
||||
description = "the system VM type. Possible types are \"domainrouter\", \"consoleproxy\" and \"secondarystoragevm\".")
|
||||
private String systemVmType;
|
||||
|
||||
@Parameter(name = ApiConstants.NETWORKRATE,
|
||||
type = CommandType.INTEGER,
|
||||
description = "data transfer rate in megabits per second allowed. Supported only for non-System offering and system offerings having \"domainrouter\" systemvmtype")
|
||||
type = CommandType.INTEGER,
|
||||
description = "data transfer rate in megabits per second allowed. Supported only for non-System offering and system offerings having \"domainrouter\" systemvmtype")
|
||||
private Integer networkRate;
|
||||
|
||||
@Parameter(name = ApiConstants.DEPLOYMENT_PLANNER,
|
||||
type = CommandType.STRING,
|
||||
description = "The deployment planner heuristics used to deploy a VM of this offering. If null, value of global config vm.deployment.planner is used")
|
||||
type = CommandType.STRING,
|
||||
description = "The deployment planner heuristics used to deploy a VM of this offering. If null, value of global config vm.deployment.planner is used")
|
||||
private String deploymentPlanner;
|
||||
|
||||
@Parameter(name = ApiConstants.SERVICE_OFFERING_DETAILS, type = CommandType.MAP, description = "details for planner, used to store specific parameters")
|
||||
@ -228,7 +228,7 @@ public class CreateServiceOfferingCmd extends BaseCmd {
|
||||
return displayText;
|
||||
}
|
||||
|
||||
public String getProvisioningType(){
|
||||
public String getProvisioningType() {
|
||||
return provisioningType;
|
||||
}
|
||||
|
||||
@ -264,7 +264,7 @@ public class CreateServiceOfferingCmd extends BaseCmd {
|
||||
}
|
||||
|
||||
public List<Long> getDomainIds() {
|
||||
if(CollectionUtils.isNotEmpty(domainIds)) {
|
||||
if (CollectionUtils.isNotEmpty(domainIds)) {
|
||||
Set<Long> set = new LinkedHashSet<>(domainIds);
|
||||
domainIds.clear();
|
||||
domainIds.addAll(set);
|
||||
@ -273,7 +273,7 @@ public class CreateServiceOfferingCmd extends BaseCmd {
|
||||
}
|
||||
|
||||
public List<Long> getZoneIds() {
|
||||
if(CollectionUtils.isNotEmpty(zoneIds)) {
|
||||
if (CollectionUtils.isNotEmpty(zoneIds)) {
|
||||
Set<Long> set = new LinkedHashSet<>(zoneIds);
|
||||
zoneIds.clear();
|
||||
zoneIds.addAll(set);
|
||||
|
||||
@ -46,9 +46,9 @@ public class UpdateDiskOfferingCmd extends BaseCmd {
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@Parameter(name = ApiConstants.DISPLAY_TEXT,
|
||||
type = CommandType.STRING,
|
||||
description = "updates alternate display text of the disk offering with this value",
|
||||
length = 4096)
|
||||
type = CommandType.STRING,
|
||||
description = "updates alternate display text of the disk offering with this value",
|
||||
length = 4096)
|
||||
private String displayText;
|
||||
|
||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DiskOfferingResponse.class, required = true, description = "ID of the disk offering")
|
||||
@ -61,8 +61,8 @@ public class UpdateDiskOfferingCmd extends BaseCmd {
|
||||
private Integer sortKey;
|
||||
|
||||
@Parameter(name = ApiConstants.DISPLAY_OFFERING,
|
||||
type = CommandType.BOOLEAN,
|
||||
description = "an optional field, whether to display the offering to the end user or not.")
|
||||
type = CommandType.BOOLEAN,
|
||||
description = "an optional field, whether to display the offering to the end user or not.")
|
||||
private Boolean displayOffering;
|
||||
|
||||
@Parameter(name = ApiConstants.DOMAIN_ID,
|
||||
@ -105,7 +105,7 @@ public class UpdateDiskOfferingCmd extends BaseCmd {
|
||||
}
|
||||
|
||||
public List<Long> getDomainIds() {
|
||||
if(CollectionUtils.isNotEmpty(domainIds)) {
|
||||
if (CollectionUtils.isNotEmpty(domainIds)) {
|
||||
Set<Long> set = new LinkedHashSet<>(domainIds);
|
||||
domainIds.clear();
|
||||
domainIds.addAll(set);
|
||||
@ -114,7 +114,7 @@ public class UpdateDiskOfferingCmd extends BaseCmd {
|
||||
}
|
||||
|
||||
public List<Long> getZoneIds() {
|
||||
if(CollectionUtils.isNotEmpty(zoneIds)) {
|
||||
if (CollectionUtils.isNotEmpty(zoneIds)) {
|
||||
Set<Long> set = new LinkedHashSet<>(zoneIds);
|
||||
zoneIds.clear();
|
||||
zoneIds.addAll(set);
|
||||
|
||||
@ -45,10 +45,10 @@ public class UpdateServiceOfferingCmd extends BaseCmd {
|
||||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
@Parameter(name = ApiConstants.ID,
|
||||
type = CommandType.UUID,
|
||||
entityType = ServiceOfferingResponse.class,
|
||||
required = true,
|
||||
description = "the ID of the service offering to be updated")
|
||||
type = CommandType.UUID,
|
||||
entityType = ServiceOfferingResponse.class,
|
||||
required = true,
|
||||
description = "the ID of the service offering to be updated")
|
||||
private Long id;
|
||||
|
||||
@Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "the display text of the service offering to be updated")
|
||||
@ -96,7 +96,7 @@ public class UpdateServiceOfferingCmd extends BaseCmd {
|
||||
}
|
||||
|
||||
public List<Long> getDomainIds() {
|
||||
if(CollectionUtils.isNotEmpty(domainIds)) {
|
||||
if (CollectionUtils.isNotEmpty(domainIds)) {
|
||||
Set<Long> set = new LinkedHashSet<>(domainIds);
|
||||
domainIds.clear();
|
||||
domainIds.addAll(set);
|
||||
@ -105,7 +105,7 @@ public class UpdateServiceOfferingCmd extends BaseCmd {
|
||||
}
|
||||
|
||||
public List<Long> getZoneIds() {
|
||||
if(CollectionUtils.isNotEmpty(zoneIds)) {
|
||||
if (CollectionUtils.isNotEmpty(zoneIds)) {
|
||||
Set<Long> set = new LinkedHashSet<>(zoneIds);
|
||||
zoneIds.clear();
|
||||
zoneIds.addAll(set);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user