CLOUDSTACK-3016: remove zonetype property from API response (snapshot, ISO, template, network, volume)

This commit is contained in:
Jessica Wang 2013-06-18 14:42:38 -07:00
parent 0a8343e750
commit 759eeca651
7 changed files with 2 additions and 65 deletions

View File

@ -67,9 +67,6 @@ public class NetworkResponse extends BaseResponse implements ControlledEntityRes
@SerializedName(ApiConstants.ZONE_NAME) @Param(description="the name of the zone the network belongs to") @SerializedName(ApiConstants.ZONE_NAME) @Param(description="the name of the zone the network belongs to")
private String zoneName; 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") @SerializedName("networkofferingid") @Param(description="network offering id the network is created from")
private String networkOfferingId; private String networkOfferingId;
@ -309,10 +306,6 @@ public class NetworkResponse extends BaseResponse implements ControlledEntityRes
this.zoneName = zoneName; this.zoneName = zoneName;
} }
public void setZoneType(String zoneType) {
this.zoneType = zoneType;
}
public void setCidr(String cidr) { public void setCidr(String cidr) {
this.cidr = cidr; this.cidr = cidr;
} }

View File

@ -97,14 +97,6 @@ public class SnapshotResponse extends BaseResponse implements ControlledEntityRe
@Param(description = "id of the availability zone") @Param(description = "id of the availability zone")
private String zoneId; 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) @SerializedName(ApiConstants.TAGS) @Param(description="the list of resource tags associated with snapshot", responseObject = ResourceTagResponse.class)
private List<ResourceTagResponse> tags; private List<ResourceTagResponse> tags;
@ -188,13 +180,6 @@ public class SnapshotResponse extends BaseResponse implements ControlledEntityRe
public void setZoneId(String zoneId) { public void setZoneId(String zoneId) {
this.zoneId = 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) { public void setTags(List<ResourceTagResponse> tags) {
this.tags = tags; this.tags = tags;

View File

@ -88,9 +88,6 @@ public class TemplateResponse extends BaseResponse implements ControlledEntityRe
@SerializedName(ApiConstants.ZONE_NAME) @Param(description="the name of the zone for this template") @SerializedName(ApiConstants.ZONE_NAME) @Param(description="the name of the zone for this template")
private String zoneName; 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") @SerializedName(ApiConstants.STATUS) @Param(description="the status of the template")
private String status; private String status;
@ -159,10 +156,6 @@ public class TemplateResponse extends BaseResponse implements ControlledEntityRe
this.zoneName = zoneName; this.zoneName = zoneName;
} }
public void setZoneType(String zoneType) {
this.zoneType = zoneType;
}
public void setAccountId(String accountId) { public void setAccountId(String accountId) {
this.accountId = accountId; this.accountId = accountId;
} }

View File

@ -48,10 +48,6 @@ public class VolumeResponse extends BaseResponse implements ControlledViewEntity
@Param(description = "name of the availability zone") @Param(description = "name of the availability zone")
private String zoneName; private String zoneName;
@SerializedName(ApiConstants.ZONE_TYPE)
@Param(description = "network type of the availability zone")
private String zoneType;
@SerializedName(ApiConstants.TYPE) @SerializedName(ApiConstants.TYPE)
@Param(description = "type of the disk volume (ROOT or DATADISK)") @Param(description = "type of the disk volume (ROOT or DATADISK)")
private String volumeType; private String volumeType;
@ -217,10 +213,6 @@ public class VolumeResponse extends BaseResponse implements ControlledViewEntity
this.zoneName = zoneName; this.zoneName = zoneName;
} }
public void setZoneType(String zoneType) {
this.zoneType = zoneType;
}
public void setVolumeType(String volumeType) { public void setVolumeType(String volumeType) {
this.volumeType = volumeType; this.volumeType = volumeType;
} }

View File

@ -435,13 +435,6 @@ public class ApiResponseHelper implements ResponseGenerator {
snapshotResponse.setVolumeId(volume.getUuid()); snapshotResponse.setVolumeId(volume.getUuid());
snapshotResponse.setVolumeName(volume.getName()); snapshotResponse.setVolumeName(volume.getName());
snapshotResponse.setVolumeType(volume.getVolumeType().name()); 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.setCreated(snapshot.getCreated());
snapshotResponse.setName(snapshot.getName()); snapshotResponse.setName(snapshot.getName());
@ -1462,7 +1455,6 @@ public class ApiResponseHelper implements ResponseGenerator {
// Add the zone ID // Add the zone ID
templateResponse.setZoneId(datacenter.getUuid()); templateResponse.setZoneId(datacenter.getUuid());
templateResponse.setZoneName(datacenter.getName()); templateResponse.setZoneName(datacenter.getName());
templateResponse.setZoneType(datacenter.getNetworkType().toString());
} }
boolean isAdmin = false; boolean isAdmin = false;
@ -1751,7 +1743,6 @@ public class ApiResponseHelper implements ResponseGenerator {
if (datacenter != null) { if (datacenter != null) {
isoResponse.setZoneId(datacenter.getUuid()); isoResponse.setZoneId(datacenter.getUuid());
isoResponse.setZoneName(datacenter.getName()); isoResponse.setZoneName(datacenter.getName());
isoResponse.setZoneType(datacenter.getNetworkType().toString());
} }
// If the user is an admin, add the template download status // If the user is an admin, add the template download status
@ -2239,7 +2230,6 @@ public class ApiResponseHelper implements ResponseGenerator {
if (zone != null) { if (zone != null) {
response.setZoneId(zone.getUuid()); response.setZoneId(zone.getUuid());
response.setZoneName(zone.getName()); response.setZoneName(zone.getName());
response.setZoneType(zone.getNetworkType().toString());
} }
if (network.getPhysicalNetworkId() != null) { if (network.getPhysicalNetworkId() != null) {
PhysicalNetworkVO pnet = ApiDBUtils.findPhysicalNetworkById(network.getPhysicalNetworkId()); PhysicalNetworkVO pnet = ApiDBUtils.findPhysicalNetworkById(network.getPhysicalNetworkId());

View File

@ -86,7 +86,6 @@ public class VolumeJoinDaoImpl extends GenericDaoBase<VolumeJoinVO, Long> implem
volResponse.setZoneId(volume.getDataCenterUuid()); volResponse.setZoneId(volume.getDataCenterUuid());
volResponse.setZoneName(volume.getDataCenterName()); volResponse.setZoneName(volume.getDataCenterName());
volResponse.setZoneType(volume.getDataCenterType());
volResponse.setVolumeType(volume.getVolumeType().toString()); volResponse.setVolumeType(volume.getVolumeType().toString());
volResponse.setDeviceId(volume.getDeviceId()); volResponse.setDeviceId(volume.getDeviceId());

View File

@ -118,9 +118,6 @@ public class VolumeJoinVO extends BaseViewVO implements ControlledViewEntity {
@Column(name="data_center_name") @Column(name="data_center_name")
private String dataCenterName; private String dataCenterName;
@Column(name="data_center_type")
private String dataCenterType;
@Column(name="vm_id") @Column(name="vm_id")
private long vmId; private long vmId;
@ -1062,18 +1059,6 @@ public class VolumeJoinVO extends BaseViewVO implements ControlledViewEntity {
public String getDataCenterType() {
return dataCenterType;
}
public void setDataCenterType(String dataCenterType) {
this.dataCenterType = dataCenterType;
}
public long getPodId() { public long getPodId() {
return podId; return podId;
} }