mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
CLOUDSTACK-2120: mixed zone management - extend listNetworks API to return zone type.
This commit is contained in:
parent
35e2072660
commit
16ba999bf1
@ -66,6 +66,9 @@ public class NetworkResponse extends BaseResponse implements ControlledEntityRes
|
|||||||
|
|
||||||
@SerializedName(ApiConstants.ZONE_NAME) @Param(description="the name of the zone the network belongs to")
|
@SerializedName(ApiConstants.ZONE_NAME) @Param(description="the name of the zone the network belongs to")
|
||||||
private String zoneName;
|
private String zoneName;
|
||||||
|
|
||||||
|
@SerializedName(ApiConstants.ZONE_TYPE) @Param(description="the networktype of the zone the network belongs to")
|
||||||
|
private String zoneType;
|
||||||
|
|
||||||
@SerializedName("networkofferingid") @Param(description="network offering id the network is created from")
|
@SerializedName("networkofferingid") @Param(description="network offering id the network is created from")
|
||||||
private String networkOfferingId;
|
private String networkOfferingId;
|
||||||
@ -291,6 +294,10 @@ public class NetworkResponse extends BaseResponse implements ControlledEntityRes
|
|||||||
this.zoneName = zoneName;
|
this.zoneName = zoneName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setZoneType(String zoneType) {
|
||||||
|
this.zoneType = zoneType;
|
||||||
|
}
|
||||||
|
|
||||||
public void setCidr(String cidr) {
|
public void setCidr(String cidr) {
|
||||||
this.cidr = cidr;
|
this.cidr = cidr;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2354,6 +2354,7 @@ public class ApiResponseHelper implements ResponseGenerator {
|
|||||||
if (zone != null) {
|
if (zone != null) {
|
||||||
response.setZoneId(zone.getUuid());
|
response.setZoneId(zone.getUuid());
|
||||||
response.setZoneName(zone.getName());
|
response.setZoneName(zone.getName());
|
||||||
|
response.setZoneType(zone.getNetworkType().toString());
|
||||||
}
|
}
|
||||||
if (network.getPhysicalNetworkId() != null) {
|
if (network.getPhysicalNetworkId() != null) {
|
||||||
PhysicalNetworkVO pnet = ApiDBUtils.findPhysicalNetworkById(network.getPhysicalNetworkId());
|
PhysicalNetworkVO pnet = ApiDBUtils.findPhysicalNetworkById(network.getPhysicalNetworkId());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user