Adding zone name to physicalnetworkresponse (#4510)

This commit is contained in:
davidjumani 2020-12-02 14:01:22 +05:30 committed by GitHub
parent df07e27921
commit 93ff156222
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -47,6 +47,10 @@ public class PhysicalNetworkResponse extends BaseResponse {
@Param(description = "zone id of the physical network")
private String zoneId;
@SerializedName(ApiConstants.ZONE_NAME)
@Param(description = "zone name of the physical network")
private String zoneName;
@SerializedName(ApiConstants.STATE)
@Param(description = "state of the physical network")
private String state;
@ -85,6 +89,10 @@ public class PhysicalNetworkResponse extends BaseResponse {
this.zoneId = zoneId;
}
public void setZoneName(String zoneName) {
this.zoneName = zoneName;
}
public void setState(String state) {
this.state = state;
}

View File

@ -2545,6 +2545,7 @@ public class ApiResponseHelper implements ResponseGenerator {
DataCenter zone = ApiDBUtils.findZoneById(result.getDataCenterId());
if (zone != null) {
response.setZoneId(zone.getUuid());
response.setZoneName(zone.getName());
}
response.setNetworkSpeed(result.getSpeed());
response.setVlan(result.getVnetString());