You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2012/07/23 21:15:32 UTC
git commit: cloudstack 3.0 API: CreateVpnCustomerGateway API,
ListVpnCustomerGateways API: set object name for API response.
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 <je...@citrix.com>
Authored: Mon Jul 23 12:14:59 2012 -0700
Committer: Jessica Wang <je...@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;
}