mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
CLOUDSTACK-6170
This commit is contained in:
parent
ea0dec77d9
commit
9b66866dc2
@ -93,9 +93,9 @@ public class CreateDiskOfferingCmd extends BaseCmd {
|
||||
private Long maxIops;
|
||||
|
||||
@Parameter(name = ApiConstants.HYPERVISOR_SNAPSHOT_RESERVE,
|
||||
type = CommandType.INTEGER,
|
||||
required = false,
|
||||
description = "Hypervisor snapshot reserve space as a percent of a volume (for managed storage using Xen or VMware)")
|
||||
type = CommandType.INTEGER,
|
||||
required = false,
|
||||
description = "Hypervisor snapshot reserve space as a percent of a volume (for managed storage using Xen or VMware)")
|
||||
private Integer hypervisorSnapshotReserve;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@ -73,6 +73,10 @@ public class DiskOfferingResponse extends BaseResponse {
|
||||
@Param(description = "the max iops of the disk offering")
|
||||
private Long maxIops;
|
||||
|
||||
@SerializedName(ApiConstants.HYPERVISOR_SNAPSHOT_RESERVE)
|
||||
@Param(description = "Hypervisor snapshot reserve space as a percent of a volume (for managed storage using Xen or VMware)")
|
||||
private Integer hypervisorSnapshotReserve;
|
||||
|
||||
@SerializedName(ApiConstants.TAGS)
|
||||
@Param(description = "the tags for the disk offering")
|
||||
private String tags;
|
||||
@ -210,6 +214,14 @@ public class DiskOfferingResponse extends BaseResponse {
|
||||
this.maxIops = maxIops;
|
||||
}
|
||||
|
||||
public Integer getHypervisorSnapshotReserve() {
|
||||
return hypervisorSnapshotReserve;
|
||||
}
|
||||
|
||||
public void setHypervisorSnapshotReserve(Integer hypervisorSnapshotReserve) {
|
||||
this.hypervisorSnapshotReserve = hypervisorSnapshotReserve;
|
||||
}
|
||||
|
||||
public String getCacheMode() {
|
||||
return cacheMode;
|
||||
}
|
||||
|
||||
@ -106,6 +106,22 @@ public class ServiceOfferingResponse extends BaseResponse {
|
||||
@Param(description = "data transfer rate in megabits per second allowed.")
|
||||
private Integer networkRate;
|
||||
|
||||
@SerializedName("iscustomizediops")
|
||||
@Param(description = "true if disk offering uses custom iops, false otherwise")
|
||||
private Boolean customizedIops;
|
||||
|
||||
@SerializedName(ApiConstants.MIN_IOPS)
|
||||
@Param(description = "the min iops of the disk offering")
|
||||
private Long minIops;
|
||||
|
||||
@SerializedName(ApiConstants.MAX_IOPS)
|
||||
@Param(description = "the max iops of the disk offering")
|
||||
private Long maxIops;
|
||||
|
||||
@SerializedName(ApiConstants.HYPERVISOR_SNAPSHOT_RESERVE)
|
||||
@Param(description = "Hypervisor snapshot reserve space as a percent of a volume (for managed storage using Xen or VMware)")
|
||||
private Integer hypervisorSnapshotReserve;
|
||||
|
||||
@SerializedName("diskBytesReadRate")
|
||||
@Param(description = "bytes read rate of the service offering")
|
||||
private Long bytesReadRate;
|
||||
@ -293,6 +309,38 @@ public class ServiceOfferingResponse extends BaseResponse {
|
||||
this.isVolatile = isVolatile;
|
||||
}
|
||||
|
||||
public Boolean isCustomizedIops() {
|
||||
return customizedIops;
|
||||
}
|
||||
|
||||
public void setCustomizedIops(Boolean customizedIops) {
|
||||
this.customizedIops = customizedIops;
|
||||
}
|
||||
|
||||
public Long getMinIops() {
|
||||
return minIops;
|
||||
}
|
||||
|
||||
public void setMinIops(Long minIops) {
|
||||
this.minIops = minIops;
|
||||
}
|
||||
|
||||
public Long getMaxIops() {
|
||||
return maxIops;
|
||||
}
|
||||
|
||||
public void setMaxIops(Long maxIops) {
|
||||
this.maxIops = maxIops;
|
||||
}
|
||||
|
||||
public Integer getHypervisorSnapshotReserve() {
|
||||
return hypervisorSnapshotReserve;
|
||||
}
|
||||
|
||||
public void setHypervisorSnapshotReserve(Integer hypervisorSnapshotReserve) {
|
||||
this.hypervisorSnapshotReserve = hypervisorSnapshotReserve;
|
||||
}
|
||||
|
||||
public void setBytesReadRate(Long bytesReadRate) {
|
||||
this.bytesReadRate = bytesReadRate;
|
||||
}
|
||||
|
||||
@ -71,6 +71,7 @@ public class DiskOfferingJoinDaoImpl extends GenericDaoBase<DiskOfferingJoinVO,
|
||||
diskOfferingResponse.setTags(offering.getTags());
|
||||
diskOfferingResponse.setCustomized(offering.isCustomized());
|
||||
diskOfferingResponse.setCustomizedIops(offering.isCustomizedIops());
|
||||
diskOfferingResponse.setHypervisorSnapshotReserve(offering.getHypervisorSnapshotReserve());
|
||||
diskOfferingResponse.setStorageType(offering.isUseLocalStorage() ? ServiceOffering.StorageType.local.toString() : ServiceOffering.StorageType.shared.toString());
|
||||
diskOfferingResponse.setBytesReadRate(offering.getBytesReadRate());
|
||||
diskOfferingResponse.setBytesWriteRate(offering.getBytesWriteRate());
|
||||
|
||||
@ -73,6 +73,10 @@ public class ServiceOfferingJoinDaoImpl extends GenericDaoBase<ServiceOfferingJo
|
||||
offeringResponse.setNetworkRate(offering.getRateMbps());
|
||||
offeringResponse.setHostTag(offering.getHostTag());
|
||||
offeringResponse.setDeploymentPlanner(offering.getDeploymentPlanner());
|
||||
offeringResponse.setCustomizedIops(offering.isCustomizedIops());
|
||||
offeringResponse.setMinIops(offering.getMinIops());
|
||||
offeringResponse.setMaxIops(offering.getMaxIops());
|
||||
offeringResponse.setHypervisorSnapshotReserve(offering.getHypervisorSnapshotReserve());
|
||||
offeringResponse.setBytesReadRate(offering.getBytesReadRate());
|
||||
offeringResponse.setBytesWriteRate(offering.getBytesWriteRate());
|
||||
offeringResponse.setIopsReadRate(offering.getIopsReadRate());
|
||||
|
||||
@ -70,6 +70,9 @@ public class DiskOfferingJoinVO extends BaseViewVO implements InternalIdentity,
|
||||
@Column(name = "max_iops")
|
||||
private Long maxIops;
|
||||
|
||||
@Column(name = "hv_ss_reserve")
|
||||
private Integer hypervisorSnapshotReserve;
|
||||
|
||||
@Column(name = "sort_key")
|
||||
int sortKey;
|
||||
|
||||
@ -165,8 +168,8 @@ public class DiskOfferingJoinVO extends BaseViewVO implements InternalIdentity,
|
||||
return maxIops;
|
||||
}
|
||||
|
||||
public void setMaxIops(Long maxIops) {
|
||||
this.maxIops = maxIops;
|
||||
public Integer getHypervisorSnapshotReserve() {
|
||||
return hypervisorSnapshotReserve;
|
||||
}
|
||||
|
||||
public String getCacheMode() {
|
||||
|
||||
@ -87,6 +87,18 @@ public class ServiceOfferingJoinVO extends BaseViewVO implements InternalIdentit
|
||||
@Column(name = "vm_type")
|
||||
private String vmType;
|
||||
|
||||
@Column(name = "customized_iops")
|
||||
private Boolean customizedIops;
|
||||
|
||||
@Column(name = "min_iops")
|
||||
private Long minIops;
|
||||
|
||||
@Column(name = "max_iops")
|
||||
private Long maxIops;
|
||||
|
||||
@Column(name = "hv_ss_reserve")
|
||||
private Integer hypervisorSnapshotReserve;
|
||||
|
||||
@Column(name = "sort_key")
|
||||
int sortKey;
|
||||
|
||||
@ -180,6 +192,22 @@ public class ServiceOfferingJoinVO extends BaseViewVO implements InternalIdentit
|
||||
return domainPath;
|
||||
}
|
||||
|
||||
public Boolean isCustomizedIops() {
|
||||
return customizedIops;
|
||||
}
|
||||
|
||||
public Long getMinIops() {
|
||||
return minIops;
|
||||
}
|
||||
|
||||
public Long getMaxIops() {
|
||||
return maxIops;
|
||||
}
|
||||
|
||||
public Integer getHypervisorSnapshotReserve() {
|
||||
return hypervisorSnapshotReserve;
|
||||
}
|
||||
|
||||
public int getSortKey() {
|
||||
return sortKey;
|
||||
}
|
||||
|
||||
@ -44,6 +44,7 @@ CREATE VIEW `cloud`.`disk_offering_view` AS
|
||||
disk_offering.removed,
|
||||
disk_offering.use_local_storage,
|
||||
disk_offering.system_use,
|
||||
disk_offering.hv_ss_reserve,
|
||||
disk_offering.bytes_read_rate,
|
||||
disk_offering.bytes_write_rate,
|
||||
disk_offering.iops_read_rate,
|
||||
@ -75,6 +76,10 @@ CREATE VIEW `cloud`.`service_offering_view` AS
|
||||
disk_offering.removed,
|
||||
disk_offering.use_local_storage,
|
||||
disk_offering.system_use,
|
||||
disk_offering.customized_iops,
|
||||
disk_offering.min_iops,
|
||||
disk_offering.max_iops,
|
||||
disk_offering.hv_ss_reserve,
|
||||
disk_offering.bytes_read_rate,
|
||||
disk_offering.bytes_write_rate,
|
||||
disk_offering.iops_read_rate,
|
||||
|
||||
@ -671,6 +671,37 @@
|
||||
networkrate: {
|
||||
label: 'label.network.rate'
|
||||
},
|
||||
iscustomizediops: {
|
||||
label: 'label.custom.disk.iops',
|
||||
converter: cloudStack.converters.toBooleanText
|
||||
},
|
||||
miniops: {
|
||||
label: 'label.disk.iops.min',
|
||||
converter: function(args) {
|
||||
if (args > 0)
|
||||
return args;
|
||||
else
|
||||
return "N/A";
|
||||
}
|
||||
},
|
||||
maxiops: {
|
||||
label: 'label.disk.iops.max',
|
||||
converter: function(args) {
|
||||
if (args > 0)
|
||||
return args;
|
||||
else
|
||||
return "N/A";
|
||||
}
|
||||
},
|
||||
hypervisorsnapshotreserve: {
|
||||
label: 'label.hypervisor.snapshot.reserve',
|
||||
converter: function(args) {
|
||||
if (args > 0)
|
||||
return args;
|
||||
else
|
||||
return "N/A";
|
||||
}
|
||||
},
|
||||
diskBytesReadRate: {
|
||||
label: 'label.disk.bytes.read.rate'
|
||||
},
|
||||
@ -1783,6 +1814,15 @@
|
||||
return "N/A";
|
||||
}
|
||||
},
|
||||
hypervisorsnapshotreserve: {
|
||||
label: 'label.hypervisor.snapshot.reserve',
|
||||
converter: function(args) {
|
||||
if (args > 0)
|
||||
return args;
|
||||
else
|
||||
return "N/A";
|
||||
}
|
||||
},
|
||||
diskBytesReadRate: {
|
||||
label: 'label.disk.bytes.write.rate'
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user