Updated Branches: refs/heads/master ba4b8f170 -> 04a2b2d32
CLOUDSTACK-2120: mixed zone management - extend listTemplates API to return zone type. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f7f1279d Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f7f1279d Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f7f1279d Branch: refs/heads/master Commit: f7f1279d81f32a908b552f38f724e4d5ba4dab7e Parents: 16ba999 Author: Jessica Wang <[email protected]> Authored: Tue Apr 23 13:01:09 2013 -0700 Committer: Jessica Wang <[email protected]> Committed: Tue Apr 23 13:01:55 2013 -0700 ---------------------------------------------------------------------- .../cloudstack/api/response/TemplateResponse.java | 7 +++++++ server/src/com/cloud/api/ApiResponseHelper.java | 1 + 2 files changed, 8 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f7f1279d/api/src/org/apache/cloudstack/api/response/TemplateResponse.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/response/TemplateResponse.java b/api/src/org/apache/cloudstack/api/response/TemplateResponse.java index ed933ff..896154a 100644 --- a/api/src/org/apache/cloudstack/api/response/TemplateResponse.java +++ b/api/src/org/apache/cloudstack/api/response/TemplateResponse.java @@ -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; } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f7f1279d/server/src/com/cloud/api/ApiResponseHelper.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java index 84dc46e..0b996c9 100755 --- a/server/src/com/cloud/api/ApiResponseHelper.java +++ b/server/src/com/cloud/api/ApiResponseHelper.java @@ -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;
