diff --git a/api/src/org/apache/cloudstack/api/response/LoadBalancerResponse.java b/api/src/org/apache/cloudstack/api/response/LoadBalancerResponse.java index 21e1dab450e..1eb8fca5087 100644 --- a/api/src/org/apache/cloudstack/api/response/LoadBalancerResponse.java +++ b/api/src/org/apache/cloudstack/api/response/LoadBalancerResponse.java @@ -95,6 +95,10 @@ public class LoadBalancerResponse extends BaseResponse implements ControlledEnti @Param(description = "the id of the zone the rule belongs to") private String zoneId; + @SerializedName(ApiConstants.ZONE_NAME) + @Param(description = "the name of the zone the load balancer rule belongs to", since = "4.11") + private String zoneName; + @SerializedName(ApiConstants.PROTOCOL) @Param(description = "the protocol of the loadbalanacer rule") private String lbProtocol; @@ -166,6 +170,10 @@ public class LoadBalancerResponse extends BaseResponse implements ControlledEnti this.zoneId = zoneId; } + public void setZoneName(String zoneName) { + this.zoneName = zoneName; + } + @Override public void setProjectId(String projectId) { this.projectId = projectId; diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java index fd7c67db29d..d9fd01cf5fc 100644 --- a/server/src/com/cloud/api/ApiResponseHelper.java +++ b/server/src/com/cloud/api/ApiResponseHelper.java @@ -888,6 +888,7 @@ public class ApiResponseHelper implements ResponseGenerator { DataCenter zone = ApiDBUtils.findZoneById(publicIp.getDataCenterId()); if (zone != null) { lbResponse.setZoneId(zone.getUuid()); + lbResponse.setZoneName(zone.getName()); } //set tag information