incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yas...@apache.org
Subject [6/13] git commit: S2S VPN: Add state for vpn connection response
Date Mon, 23 Jul 2012 21:57:40 GMT
S2S VPN: Add state for vpn connection response


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/230ce1df
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/230ce1df
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/230ce1df

Branch: refs/heads/vpc
Commit: 230ce1dfee8216e05f47143eb0501c6a9591e69c
Parents: df9315f
Author: Sheng Yang <sheng.yang@citrix.com>
Authored: Mon Jul 9 16:53:44 2012 -0700
Committer: Sheng Yang <sheng.yang@citrix.com>
Committed: Mon Jul 23 14:38:06 2012 -0700

----------------------------------------------------------------------
 .../response/Site2SiteVpnConnectionResponse.java   |    7 +++++++
 server/src/com/cloud/api/ApiResponseHelper.java    |    1 +
 2 files changed, 8 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/230ce1df/api/src/com/cloud/api/response/Site2SiteVpnConnectionResponse.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/response/Site2SiteVpnConnectionResponse.java b/api/src/com/cloud/api/response/Site2SiteVpnConnectionResponse.java
index 54daf95..fcbe56b 100644
--- a/api/src/com/cloud/api/response/Site2SiteVpnConnectionResponse.java
+++ b/api/src/com/cloud/api/response/Site2SiteVpnConnectionResponse.java
@@ -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
     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")
     private Date created;
 
@@ -101,6 +104,10 @@ public class Site2SiteVpnConnectionResponse extends BaseResponse {
     	this.lifetime = lifetime;
     }     
     
+    public void setState(String state) {
+        this.state = state;
+    }
+
     public void setCreated(Date created) {
         this.created = created;
     }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/230ce1df/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index e79ec58..50fb8dc 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -3815,6 +3815,7 @@ public class ApiResponseHelper implements ResponseGenerator {
         	response.setLifetime(customerGateway.getLifetime());
         }      
                 
+        response.setState(result.getState().toString());
         response.setCreated(result.getCreated());
         response.setRemoved(result.getRemoved());
         response.setObjectName("vpnconnection");


Mime
View raw message