mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
api: Display VPC name to which the network belongs to (#4483)
* Display VPC name to which the network belongs to If an isolated network is created in VPC then display its name along with vpc id which is used for UI * Change description
This commit is contained in:
parent
dfa09fc856
commit
0a2a54aeba
@ -190,6 +190,10 @@ public class NetworkResponse extends BaseResponse implements ControlledEntityRes
|
||||
@Param(description = "VPC the network belongs to")
|
||||
private String vpcId;
|
||||
|
||||
@SerializedName(ApiConstants.VPC_NAME)
|
||||
@Param(description = "Name of the VPC to which this network belongs", since = "4.15")
|
||||
private String vpcName;
|
||||
|
||||
@SerializedName(ApiConstants.CAN_USE_FOR_DEPLOY)
|
||||
@Param(description = "list networks available for vm deployment")
|
||||
private Boolean canUseForDeploy;
|
||||
@ -470,4 +474,12 @@ public class NetworkResponse extends BaseResponse implements ControlledEntityRes
|
||||
public void setRedundantRouter(Boolean redundantRouter) {
|
||||
this.redundantRouter = redundantRouter;
|
||||
}
|
||||
|
||||
public String getVpcName() {
|
||||
return vpcName;
|
||||
}
|
||||
|
||||
public void setVpcName(String vpcName) {
|
||||
this.vpcName = vpcName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2262,6 +2262,7 @@ public class ApiResponseHelper implements ResponseGenerator {
|
||||
Vpc vpc = ApiDBUtils.findVpcById(network.getVpcId());
|
||||
if (vpc != null) {
|
||||
response.setVpcId(vpc.getUuid());
|
||||
response.setVpcName(vpc.getName());
|
||||
}
|
||||
}
|
||||
response.setCanUseForDeploy(ApiDBUtils.canUseForDeploy(network));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user