Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@
import java.util.List;
import java.util.Map;

import com.google.gson.annotations.SerializedName;

import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseResponse;
import org.apache.cloudstack.api.EntityReference;

import com.cloud.org.Cluster;
import com.cloud.serializer.Param;
import com.google.gson.annotations.SerializedName;

@EntityReference(value = Cluster.class)
public class ClusterResponse extends BaseResponse {
Expand Down Expand Up @@ -216,4 +215,8 @@ public void setResourceDetails(Map<String, String> details) {
resourceDetails.remove("password");
}
}

public Map<String, String> getResourceDetails() {
return resourceDetails;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,22 @@
// under the License.
package org.apache.cloudstack.api.response;

import com.cloud.host.Host;
import com.cloud.host.Status;
import com.cloud.hypervisor.Hypervisor.HypervisorType;
import com.cloud.serializer.Param;
import com.google.gson.annotations.SerializedName;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseResponse;
import org.apache.cloudstack.api.EntityReference;
import org.apache.cloudstack.ha.HAConfig;
import org.apache.cloudstack.outofbandmanagement.OutOfBandManagement;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.cloud.host.Host;
import com.cloud.host.Status;
import com.cloud.hypervisor.Hypervisor.HypervisorType;
import com.cloud.serializer.Param;
import com.google.gson.annotations.SerializedName;

@EntityReference(value = Host.class)
public class HostResponse extends BaseResponse {
Expand Down Expand Up @@ -243,11 +244,6 @@ public class HostResponse extends BaseResponse {
@Param(description = "the admin that annotated this host", since = "4.11")
private String username;

// Default visibility to support accessing the details from unit tests
Map getDetails() {
return details;
}

@Override
public String getObjectId() {
return this.getId();
Expand Down Expand Up @@ -361,7 +357,7 @@ public void setMemoryUsed(Long memoryUsed) {
this.memoryUsed = memoryUsed;
}

public void setGpuGroups(List<GpuResponse> gpuGroup) {
public void setGpuGroup(List<GpuResponse> gpuGroup) {
this.gpuGroup = gpuGroup;
}

Expand Down Expand Up @@ -437,6 +433,10 @@ public void setHostHAResponse(final HAConfig config) {
this.hostHAResponse = new HostHAResponse(config);
}

public void setHostHAResponse(HostHAResponse hostHAResponse) {
this.hostHAResponse = hostHAResponse;
}

public OutOfBandManagementResponse getOutOfBandManagementResponse() {
return outOfBandManagementResponse;
}
Expand All @@ -445,6 +445,10 @@ public void setOutOfBandManagementResponse(final OutOfBandManagement outOfBandMa
this.outOfBandManagementResponse = new OutOfBandManagementResponse(outOfBandManagementConfig);
}

public void setOutOfBandManagementResponse(OutOfBandManagementResponse outOfBandManagementResponse) {
this.outOfBandManagementResponse = outOfBandManagementResponse;
}

public String getResourceState() {
return resourceState;
}
Expand Down Expand Up @@ -496,7 +500,10 @@ public void setDetails(Map details) {
detailsCopy.remove("password");

this.details = detailsCopy;
}

public Map getDetails() {
return details;
}

public void setMemoryTotal(Long memoryTotal) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,19 +262,19 @@ public class VolumeResponse extends BaseResponseWithTagInformation implements Co

@SerializedName(ApiConstants.CLUSTER_ID)
@Param(description = "cluster id of the volume")
private String clusterid;
private String clusterId;

@SerializedName(ApiConstants.CLUSTER_NAME)
@Param(description = "cluster name where the volume is allocated")
private String clustername;
private String clusterName;

@SerializedName(ApiConstants.POD_ID)
@Param(description = "pod id of the volume")
private String podid;
private String podId;

@SerializedName(ApiConstants.POD_NAME)
@Param(description = "pod name of the volume")
private String podname;
private String podName;

public String getPath() {
return path;
Expand Down Expand Up @@ -751,35 +751,34 @@ public void setUtilization(String utilization) {
}

public String getClusterId() {
return clusterid;
return clusterId;
}

public void setClusterId(String clusterid) {
this.clusterid = clusterid;
public void setClusterId(String clusterId) {
this.clusterId = clusterId;
}

public String getClusterName() {
return clustername;
return clusterName;
}

public void setClusterName(String clustername) {
this.clustername = clustername;
public void setClusterName(String clusterName) {
this.clusterName = clusterName;
}

public String getPodId() {
return podid;
return podId;
}

public void setPodId(String podid) {
this.podid = podid;
public void setPodId(String podId) {
this.podId = podId;
}

public String getPodName() {
return podname;
return podName;
}

public void setPodName(String podname) {
this.podname = podname;
public void setPodName(String podName) {
this.podName = podName;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public void setDomainId(String domainId) {
this.domainId = domainId;
}

public void setType(String networkType) {
public void setNetworkType(String networkType) {
this.networkType = networkType;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public ZoneResponse newDataCenterResponse(ResponseView view, DataCenterJoinVO da
zoneResponse.setDomainId(dataCenter.getDomainUuid());
zoneResponse.setDomainName(dataCenter.getDomainName());

zoneResponse.setType(dataCenter.getNetworkType().toString());
zoneResponse.setNetworkType(dataCenter.getNetworkType().toString());
zoneResponse.setAllocationState(dataCenter.getAllocationState().toString());
zoneResponse.setZoneToken(dataCenter.getZoneToken());
zoneResponse.setDhcpProvider(dataCenter.getDhcpProvider());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public HostResponse newHostResponse(HostJoinVO host, EnumSet<HostDetails> detail
}
gpus.add(gpuResponse);
}
hostResponse.setGpuGroups(gpus);
hostResponse.setGpuGroup(gpus);
}
if (details.contains(HostDetails.all) || details.contains(HostDetails.capacity) || details.contains(HostDetails.stats) || details.contains(HostDetails.events)) {

Expand Down