CLOUDSTACK-8873: add zonename in load balancer response

This commit is contained in:
Rene Moser 2017-03-10 11:49:49 +01:00 committed by Rohit Yadav
parent afbbb810f0
commit 256c193e92
2 changed files with 9 additions and 0 deletions

View File

@ -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;

View File

@ -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