incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessicaw...@apache.org
Subject git commit: cloudstack 3.0 API: CreateVpnCustomerGateway API, ListVpnCustomerGateways API: set object name for API response.
Date Mon, 23 Jul 2012 19:15:32 GMT
Updated Branches:
  refs/heads/vpc aac0a808c -> 8fad593ac


cloudstack 3.0 API: CreateVpnCustomerGateway API, ListVpnCustomerGateways API: set object
name for API 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/8fad593a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/8fad593a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/8fad593a

Branch: refs/heads/vpc
Commit: 8fad593ac58d75c39ddc344b27850b405b746f9a
Parents: aac0a80
Author: Jessica Wang <jessica.wang@citrix.com>
Authored: Mon Jul 23 12:14:59 2012 -0700
Committer: Jessica Wang <jessica.wang@citrix.com>
Committed: Mon Jul 23 12:14:59 2012 -0700

----------------------------------------------------------------------
 .../api/commands/ListVpnCustomerGatewaysCmd.java   |    9 +++++++--
 server/src/com/cloud/api/ApiResponseHelper.java    |    1 +
 2 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/8fad593a/api/src/com/cloud/api/commands/ListVpnCustomerGatewaysCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListVpnCustomerGatewaysCmd.java b/api/src/com/cloud/api/commands/ListVpnCustomerGatewaysCmd.java
index 70942dc..1e8b06b 100644
--- a/api/src/com/cloud/api/commands/ListVpnCustomerGatewaysCmd.java
+++ b/api/src/com/cloud/api/commands/ListVpnCustomerGatewaysCmd.java
@@ -68,8 +68,13 @@ public class ListVpnCustomerGatewaysCmd extends BaseListProjectAndAccountResourc
         ListResponse<Site2SiteCustomerGatewayResponse> response = new ListResponse<Site2SiteCustomerGatewayResponse>();
         List<Site2SiteCustomerGatewayResponse> gwResponses = new ArrayList<Site2SiteCustomerGatewayResponse>();
         if (gws != null && !gws.isEmpty()) {
-            for (Site2SiteCustomerGateway gw : gws) {
-                gwResponses.add(_responseGenerator.createSite2SiteCustomerGatewayResponse(gw));
+        	for (Site2SiteCustomerGateway gw : gws) {
+                if (gw == null) {
+                    continue;
+                }
+            	Site2SiteCustomerGatewayResponse site2SiteCustomerGatewayRes = _responseGenerator.createSite2SiteCustomerGatewayResponse(gw);
+            	site2SiteCustomerGatewayRes.setObjectName("vpncustomergateway");
+                gwResponses.add(site2SiteCustomerGatewayRes);
             }
         }
         response.setResponses(gwResponses);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/8fad593a/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 e01bcd2..83288ae 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -3782,6 +3782,7 @@ public class ApiResponseHelper implements ResponseGenerator {
         response.setGuestCidrList(result.getGuestCidrList());
         response.setIpsecPsk(result.getIpsecPsk());
         response.setRemoved(result.getRemoved());
+        response.setObjectName("vpncustomergateway");
         return response;
     }
 


Mime
View raw message