Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -470,4 +474,12 @@ public Boolean getRedundantRouter() {
public void setRedundantRouter(Boolean redundantRouter) {
this.redundantRouter = redundantRouter;
}

public String getVpcName() {
return vpcName;
}

public void setVpcName(String vpcName) {
this.vpcName = vpcName;
}
}
1 change: 1 addition & 0 deletions server/src/main/java/com/cloud/api/ApiResponseHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -2262,6 +2262,7 @@ public NetworkResponse createNetworkResponse(ResponseView view, Network network)
Vpc vpc = ApiDBUtils.findVpcById(network.getVpcId());
if (vpc != null) {
response.setVpcId(vpc.getUuid());
response.setVpcName(vpc.getName());
}
}
response.setCanUseForDeploy(ApiDBUtils.canUseForDeploy(network));
Expand Down