CLOUDSTACK-2120: mixed zone management - extend listTemplates API to return zone type.

This commit is contained in:
Jessica Wang 2013-04-23 13:01:09 -07:00
parent 16ba999bf1
commit f7f1279d81
2 changed files with 8 additions and 0 deletions

View File

@ -87,6 +87,9 @@ 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;
@ -156,6 +159,10 @@ 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;
}

View File

@ -1449,6 +1449,7 @@ 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;