Skip to content

Commit

Permalink
Update 8756: fix HostMetricsResponse and SystemVmResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
weizhouapache committed Mar 15, 2024
1 parent 93a7fb5 commit ea64f68
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,6 @@ public class SystemVmResponse extends BaseResponseWithAnnotations {
@Param(description = "the system VM type")
private String systemVmType;

@SerializedName("jobid")
@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.")
private String jobId;

@SerializedName("jobstatus")
@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.")
private Integer jobStatus;

@SerializedName("zoneid")
@Param(description = "the Zone ID for the system VM")
private String zoneId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ public List<HostMetricsResponse> listHostMetrics(List<HostResponse> hostResponse
metricsResponse.setCpuTotal(hostResponse.getCpuNumber(), hostResponse.getCpuSpeed());
metricsResponse.setCpuUsed(hostResponse.getCpuUsed(), hostResponse.getCpuNumber(), hostResponse.getCpuSpeed());
metricsResponse.setCpuAllocated(hostResponse.getCpuAllocated(), hostResponse.getCpuNumber(), hostResponse.getCpuSpeed());
metricsResponse.setLoadAverage(hostResponse.getAverageLoad());
metricsResponse.setCpuAverageLoad(hostResponse.getAverageLoad());
metricsResponse.setMemTotal(hostResponse.getMemoryTotal());
metricsResponse.setMemAllocated(hostResponse.getMemoryAllocated());
metricsResponse.setMemUsed(hostResponse.getMemoryUsed());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ public class HostMetricsResponse extends HostResponse {
@Param(description = "the total cpu allocated in Ghz")
private String cpuAllocated;

@SerializedName("cpuloadaverage")
@Param(description = "the average cpu load the last minute")
private Double loadAverage;

@SerializedName("memorytotalgb")
@Param(description = "the total memory capacity in GiB")
private String memTotal;
Expand Down Expand Up @@ -132,12 +128,6 @@ public void setCpuUsed(final String cpuUsed, final Integer cpuNumber, final Long
}
}

public void setLoadAverage(final Double loadAverage) {
if (loadAverage != null) {
this.loadAverage = loadAverage;
}
}

public void setCpuAllocated(final String cpuAllocated, final Integer cpuNumber, final Long cpuSpeed) {
if (cpuAllocated != null && cpuNumber != null && cpuSpeed != null) {
this.cpuAllocated = String.format("%.2f Ghz", parseCPU(cpuAllocated) * cpuNumber * cpuSpeed / (100.0 * 1000.0));
Expand Down

0 comments on commit ea64f68

Please sign in to comment.