incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [15/43] git commit: refs/heads/ui-plugins - [EC2 Query API] DescribeAvailabilityZones doesn't have any filter support.
Date Fri, 08 Feb 2013 21:10:34 GMT
[EC2 Query API] DescribeAvailabilityZones doesn't have any filter support.

CLOUDSTACK-1118

Support will be available for filters - zone-name and message


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

Branch: refs/heads/ui-plugins
Commit: b5e28038cbc85e4e39bfc2b71927e2935b1f1673
Parents: 12ad296
Author: Likitha Shetty <Likitha.Shetty@citrix.com>
Authored: Thu Feb 7 18:00:25 2013 -0800
Committer: Prachi Damle <prachi@cloud.com>
Committed: Thu Feb 7 18:00:35 2013 -0800

----------------------------------------------------------------------
 .../com/cloud/bridge/service/EC2RestServlet.java   |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/b5e28038/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java b/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java
index c3a86a0..8f36490 100644
--- a/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java
+++ b/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java
@@ -107,6 +107,7 @@ import com.cloud.bridge.persist.dao.UserCredentialsDaoImpl;
 import com.cloud.bridge.service.controller.s3.ServiceProvider;
 import com.cloud.bridge.service.core.ec2.EC2AssociateAddress;
 import com.cloud.bridge.service.core.ec2.EC2AuthorizeRevokeSecurityGroup;
+import com.cloud.bridge.service.core.ec2.EC2AvailabilityZonesFilterSet;
 import com.cloud.bridge.service.core.ec2.EC2CreateImage;
 import com.cloud.bridge.service.core.ec2.EC2CreateKeyPair;
 import com.cloud.bridge.service.core.ec2.EC2CreateVolume;
@@ -1286,6 +1287,17 @@ public class EC2RestServlet extends HttpServlet {
                 if (null != value && 0 < value.length) EC2request.addZone( value[0]
);
             }
         }		
+
+        // add filters
+        EC2Filter[] filterSet = extractFilters( request );
+        if ( filterSet != null ) {
+            EC2AvailabilityZonesFilterSet afs = new EC2AvailabilityZonesFilterSet();
+            for( int i=0; i < filterSet.length; i++ ) {
+                afs.addFilter(filterSet[i]);
+            }
+            EC2request.setFilterSet( afs );
+        }
+
         // -> execute the request
         DescribeAvailabilityZonesResponse EC2response = EC2SoapServiceImpl.toDescribeAvailabilityZonesResponse(
ServiceProvider.getInstance().getEC2Engine().handleRequest( EC2request ));
         serializeResponse(response, EC2response);


Mime
View raw message