mirror of https://github.com/apache/cloudstack.git
Added "status" field to listPublicIpAddresses response
This commit is contained in:
parent
668fde991c
commit
d4b1831bf4
|
|
@ -19,6 +19,7 @@ package com.cloud.api.response;
|
|||
|
||||
import java.util.Date;
|
||||
|
||||
import com.cloud.api.ApiConstants;
|
||||
import com.cloud.serializer.Param;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
|
|
@ -77,6 +78,9 @@ public class IPAddressResponse extends BaseResponse {
|
|||
@SerializedName("networkid") @Param(description="the ID of the Network where ip belongs to")
|
||||
private Long networkId;
|
||||
|
||||
@SerializedName(ApiConstants.STATE) @Param(description="State of the ip address. Can be: Allocatin, Allocated and Releasing")
|
||||
private String state;
|
||||
|
||||
public String getIpAddress() {
|
||||
return ipAddress;
|
||||
}
|
||||
|
|
@ -220,4 +224,12 @@ public class IPAddressResponse extends BaseResponse {
|
|||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -658,6 +658,7 @@ public class ApiResponseHelper implements ResponseGenerator {
|
|||
}
|
||||
|
||||
ipResponse.setNetworkId(networkId);
|
||||
ipResponse.setState(ipAddress.getState().toString());
|
||||
|
||||
// show this info to admin only
|
||||
Account account = UserContext.current().getCaller();
|
||||
|
|
|
|||
Loading…
Reference in New Issue