S2S VPN: Add state for vpn connection response

This commit is contained in:
Sheng Yang 2012-07-09 16:53:44 -07:00
parent df9315ff02
commit 230ce1dfee
2 changed files with 8 additions and 0 deletions

View File

@ -55,6 +55,9 @@ public class Site2SiteVpnConnectionResponse extends BaseResponse {
@SerializedName(ApiConstants.LIFETIME) @Param(description="Lifetime of vpn connection to the customer gateway, in seconds") //from CustomerGateway @SerializedName(ApiConstants.LIFETIME) @Param(description="Lifetime of vpn connection to the customer gateway, in seconds") //from CustomerGateway
private Long lifetime; private Long lifetime;
@SerializedName(ApiConstants.STATE) @Param(description="State of vpn connection")
private String state;
@SerializedName(ApiConstants.CREATED) @Param(description="the date and time the host was created") @SerializedName(ApiConstants.CREATED) @Param(description="the date and time the host was created")
private Date created; private Date created;
@ -101,6 +104,10 @@ public class Site2SiteVpnConnectionResponse extends BaseResponse {
this.lifetime = lifetime; this.lifetime = lifetime;
} }
public void setState(String state) {
this.state = state;
}
public void setCreated(Date created) { public void setCreated(Date created) {
this.created = created; this.created = created;
} }

View File

@ -3815,6 +3815,7 @@ public class ApiResponseHelper implements ResponseGenerator {
response.setLifetime(customerGateway.getLifetime()); response.setLifetime(customerGateway.getLifetime());
} }
response.setState(result.getState().toString());
response.setCreated(result.getCreated()); response.setCreated(result.getCreated());
response.setRemoved(result.getRemoved()); response.setRemoved(result.getRemoved());
response.setObjectName("vpnconnection"); response.setObjectName("vpnconnection");