mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-16 10:32:34 +01:00
CLOUDSTACK-3016: remove zonetype property from API response (snapshot, ISO, template, network, volume)
This commit is contained in:
parent
0a8343e750
commit
759eeca651
@ -66,9 +66,6 @@ public class NetworkResponse extends BaseResponse implements ControlledEntityRes
|
||||
|
||||
@SerializedName(ApiConstants.ZONE_NAME) @Param(description="the name of the zone the network belongs to")
|
||||
private String zoneName;
|
||||
|
||||
@SerializedName(ApiConstants.ZONE_TYPE) @Param(description="the networktype of the zone the network belongs to")
|
||||
private String zoneType;
|
||||
|
||||
@SerializedName("networkofferingid") @Param(description="network offering id the network is created from")
|
||||
private String networkOfferingId;
|
||||
@ -309,10 +306,6 @@ public class NetworkResponse extends BaseResponse implements ControlledEntityRes
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public void setZoneType(String zoneType) {
|
||||
this.zoneType = zoneType;
|
||||
}
|
||||
|
||||
public void setCidr(String cidr) {
|
||||
this.cidr = cidr;
|
||||
}
|
||||
|
||||
@ -97,14 +97,6 @@ public class SnapshotResponse extends BaseResponse implements ControlledEntityRe
|
||||
@Param(description = "id of the availability zone")
|
||||
private String zoneId;
|
||||
|
||||
@SerializedName(ApiConstants.ZONE_NAME)
|
||||
@Param(description = "name of the availability zone")
|
||||
private String zoneName;
|
||||
|
||||
@SerializedName(ApiConstants.ZONE_TYPE)
|
||||
@Param(description = "network type of the availability zone")
|
||||
private String zoneType;
|
||||
|
||||
@SerializedName(ApiConstants.TAGS) @Param(description="the list of resource tags associated with snapshot", responseObject = ResourceTagResponse.class)
|
||||
private List<ResourceTagResponse> tags;
|
||||
|
||||
@ -188,14 +180,7 @@ public class SnapshotResponse extends BaseResponse implements ControlledEntityRe
|
||||
public void setZoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
public void setZoneName(String zoneName) {
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public void setZoneType(String zoneType) {
|
||||
this.zoneType = zoneType;
|
||||
}
|
||||
|
||||
|
||||
public void setTags(List<ResourceTagResponse> tags) {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
@ -87,9 +87,6 @@ public class TemplateResponse extends BaseResponse implements ControlledEntityRe
|
||||
|
||||
@SerializedName(ApiConstants.ZONE_NAME) @Param(description="the name of the zone for this template")
|
||||
private String zoneName;
|
||||
|
||||
@SerializedName(ApiConstants.ZONE_TYPE) @Param(description="the networktype of the zone for this template")
|
||||
private String zoneType;
|
||||
|
||||
@SerializedName(ApiConstants.STATUS) @Param(description="the status of the template")
|
||||
private String status;
|
||||
@ -159,10 +156,6 @@ public class TemplateResponse extends BaseResponse implements ControlledEntityRe
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public void setZoneType(String zoneType) {
|
||||
this.zoneType = zoneType;
|
||||
}
|
||||
|
||||
public void setAccountId(String accountId) {
|
||||
this.accountId = accountId;
|
||||
}
|
||||
|
||||
@ -47,10 +47,6 @@ public class VolumeResponse extends BaseResponse implements ControlledViewEntity
|
||||
@SerializedName(ApiConstants.ZONE_NAME)
|
||||
@Param(description = "name of the availability zone")
|
||||
private String zoneName;
|
||||
|
||||
@SerializedName(ApiConstants.ZONE_TYPE)
|
||||
@Param(description = "network type of the availability zone")
|
||||
private String zoneType;
|
||||
|
||||
@SerializedName(ApiConstants.TYPE)
|
||||
@Param(description = "type of the disk volume (ROOT or DATADISK)")
|
||||
@ -217,10 +213,6 @@ public class VolumeResponse extends BaseResponse implements ControlledViewEntity
|
||||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public void setZoneType(String zoneType) {
|
||||
this.zoneType = zoneType;
|
||||
}
|
||||
|
||||
public void setVolumeType(String volumeType) {
|
||||
this.volumeType = volumeType;
|
||||
}
|
||||
|
||||
@ -435,13 +435,6 @@ public class ApiResponseHelper implements ResponseGenerator {
|
||||
snapshotResponse.setVolumeId(volume.getUuid());
|
||||
snapshotResponse.setVolumeName(volume.getName());
|
||||
snapshotResponse.setVolumeType(volume.getVolumeType().name());
|
||||
|
||||
DataCenter zone = ApiDBUtils.findZoneById(volume.getDataCenterId());
|
||||
if (zone != null) {
|
||||
snapshotResponse.setZoneName(zone.getName());
|
||||
snapshotResponse.setZoneType(zone.getNetworkType().toString());
|
||||
snapshotResponse.setZoneId(zone.getUuid());
|
||||
}
|
||||
}
|
||||
snapshotResponse.setCreated(snapshot.getCreated());
|
||||
snapshotResponse.setName(snapshot.getName());
|
||||
@ -1462,7 +1455,6 @@ public class ApiResponseHelper implements ResponseGenerator {
|
||||
// Add the zone ID
|
||||
templateResponse.setZoneId(datacenter.getUuid());
|
||||
templateResponse.setZoneName(datacenter.getName());
|
||||
templateResponse.setZoneType(datacenter.getNetworkType().toString());
|
||||
}
|
||||
|
||||
boolean isAdmin = false;
|
||||
@ -1751,7 +1743,6 @@ public class ApiResponseHelper implements ResponseGenerator {
|
||||
if (datacenter != null) {
|
||||
isoResponse.setZoneId(datacenter.getUuid());
|
||||
isoResponse.setZoneName(datacenter.getName());
|
||||
isoResponse.setZoneType(datacenter.getNetworkType().toString());
|
||||
}
|
||||
|
||||
// If the user is an admin, add the template download status
|
||||
@ -2239,7 +2230,6 @@ public class ApiResponseHelper implements ResponseGenerator {
|
||||
if (zone != null) {
|
||||
response.setZoneId(zone.getUuid());
|
||||
response.setZoneName(zone.getName());
|
||||
response.setZoneType(zone.getNetworkType().toString());
|
||||
}
|
||||
if (network.getPhysicalNetworkId() != null) {
|
||||
PhysicalNetworkVO pnet = ApiDBUtils.findPhysicalNetworkById(network.getPhysicalNetworkId());
|
||||
|
||||
@ -86,8 +86,7 @@ public class VolumeJoinDaoImpl extends GenericDaoBase<VolumeJoinVO, Long> implem
|
||||
|
||||
volResponse.setZoneId(volume.getDataCenterUuid());
|
||||
volResponse.setZoneName(volume.getDataCenterName());
|
||||
volResponse.setZoneType(volume.getDataCenterType());
|
||||
|
||||
|
||||
volResponse.setVolumeType(volume.getVolumeType().toString());
|
||||
volResponse.setDeviceId(volume.getDeviceId());
|
||||
|
||||
|
||||
@ -117,9 +117,6 @@ public class VolumeJoinVO extends BaseViewVO implements ControlledViewEntity {
|
||||
|
||||
@Column(name="data_center_name")
|
||||
private String dataCenterName;
|
||||
|
||||
@Column(name="data_center_type")
|
||||
private String dataCenterType;
|
||||
|
||||
@Column(name="vm_id")
|
||||
private long vmId;
|
||||
@ -1060,20 +1057,8 @@ public class VolumeJoinVO extends BaseViewVO implements ControlledViewEntity {
|
||||
this.dataCenterName = dataCenterName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getDataCenterType() {
|
||||
return dataCenterType;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setDataCenterType(String dataCenterType) {
|
||||
this.dataCenterType = dataCenterType;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public long getPodId() {
|
||||
return podId;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user