Skip to content

Commit 44325ca

Browse files
weizhouapacheDaanHoogland
authored andcommitted
Update 8756: fix HostMetricsResponse and SystemVmResponse
1 parent 1c17e11 commit 44325ca

File tree

3 files changed

+1
-19
lines changed

3 files changed

+1
-19
lines changed

api/src/main/java/org/apache/cloudstack/api/response/SystemVmResponse.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,6 @@ public class SystemVmResponse extends BaseResponseWithAnnotations {
3838
@Param(description = "the system VM type")
3939
private String systemVmType;
4040

41-
@SerializedName("jobid")
42-
@Param(description = "the job ID associated with the system VM. This is only displayed if the router listed is part of a currently running asynchronous job.")
43-
private String jobId;
44-
45-
@SerializedName("jobstatus")
46-
@Param(description = "the job status associated with the system VM. This is only displayed if the router listed is part of a currently running asynchronous job.")
47-
private Integer jobStatus;
48-
4941
@SerializedName("zoneid")
5042
@Param(description = "the Zone ID for the system VM")
5143
private String zoneId;

plugins/metrics/src/main/java/org/apache/cloudstack/metrics/MetricsServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ public List<HostMetricsResponse> listHostMetrics(List<HostResponse> hostResponse
713713
metricsResponse.setCpuTotal(hostResponse.getCpuNumber(), hostResponse.getCpuSpeed());
714714
metricsResponse.setCpuUsed(hostResponse.getCpuUsed(), hostResponse.getCpuNumber(), hostResponse.getCpuSpeed());
715715
metricsResponse.setCpuAllocated(hostResponse.getCpuAllocated(), hostResponse.getCpuNumber(), hostResponse.getCpuSpeed());
716-
metricsResponse.setLoadAverage(hostResponse.getAverageLoad());
716+
metricsResponse.setCpuAverageLoad(hostResponse.getAverageLoad());
717717
metricsResponse.setMemTotal(hostResponse.getMemoryTotal());
718718
metricsResponse.setMemAllocated(hostResponse.getMemoryAllocated());
719719
metricsResponse.setMemUsed(hostResponse.getMemoryUsed());

plugins/metrics/src/main/java/org/apache/cloudstack/response/HostMetricsResponse.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@ public class HostMetricsResponse extends HostResponse {
5252
@Param(description = "the total cpu allocated in Ghz")
5353
private String cpuAllocated;
5454

55-
@SerializedName("cpuloadaverage")
56-
@Param(description = "the average cpu load the last minute")
57-
private Double loadAverage;
58-
5955
@SerializedName("memorytotalgb")
6056
@Param(description = "the total memory capacity in GiB")
6157
private String memTotal;
@@ -132,12 +128,6 @@ public void setCpuUsed(final String cpuUsed, final Integer cpuNumber, final Long
132128
}
133129
}
134130

135-
public void setLoadAverage(final Double loadAverage) {
136-
if (loadAverage != null) {
137-
this.loadAverage = loadAverage;
138-
}
139-
}
140-
141131
public void setCpuAllocated(final String cpuAllocated, final Integer cpuNumber, final Long cpuSpeed) {
142132
if (cpuAllocated != null && cpuNumber != null && cpuSpeed != null) {
143133
this.cpuAllocated = String.format("%.2f Ghz", parseCPU(cpuAllocated) * cpuNumber * cpuSpeed / (100.0 * 1000.0));

0 commit comments

Comments
 (0)