mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
api: Display network name for IP in shared networks (#4073)
In the list publicipaddress api call, display the network name if ip is associated to shared network Co-authored-by: Rakesh Venkatesh <r.venkatesh@global.leaseweb.com>
This commit is contained in:
parent
1fe96cc426
commit
20f9639842
@ -150,6 +150,10 @@ public class IPAddressResponse extends BaseResponse implements ControlledEntityR
|
||||
@Param(description = "is public ip for display to the regular user", since = "4.4", authorized = {RoleType.Admin})
|
||||
private Boolean forDisplay;
|
||||
|
||||
@SerializedName(ApiConstants.NETWORK_NAME)
|
||||
@Param(description="the name of the Network where ip belongs to")
|
||||
private String networkName;
|
||||
|
||||
/*
|
||||
@SerializedName(ApiConstants.JOB_ID) @Param(description="shows the current pending asynchronous job ID. This tag is not returned if no current pending jobs are acting on the volume")
|
||||
private IdentityProxy jobId = new IdentityProxy("async_job");
|
||||
@ -288,4 +292,8 @@ public class IPAddressResponse extends BaseResponse implements ControlledEntityR
|
||||
public void setForDisplay(Boolean forDisplay) {
|
||||
this.forDisplay = forDisplay;
|
||||
}
|
||||
|
||||
public void setNetworkName(String networkName) {
|
||||
this.networkName = networkName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -894,6 +894,7 @@ public class ApiResponseHelper implements ResponseGenerator {
|
||||
NetworkVO nw = ApiDBUtils.findNetworkById(networkId);
|
||||
if (nw != null) {
|
||||
ipResponse.setNetworkId(nw.getUuid());
|
||||
ipResponse.setNetworkName(nw.getName());
|
||||
}
|
||||
}
|
||||
ipResponse.setState(ipAddr.getState().toString());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user