You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Likitha Shetty <li...@citrix.com> on 2012/07/11 15:20:40 UTC

Review Request: Modifying filter support in 3 EC2 Describe* API's(DescribeInstances, DescribeVolumes and DescribeSnapshots) to include tags. Component: AWSAPI.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5909/
-----------------------------------------------------------

Review request for cloudstack and Prachi Damle.


Description
-------

Tags support has been added to 3 EC2Describe* API's(DescribeInstances, DescribeVolumes and DescribeSnapshots). Hence for the same 3 EC2Describe* API's filter support has been modified to included 3 tag related filters: tag-key, tag-value and tag:key.


Diffs
-----

  awsapi/src/com/cloud/bridge/service/core/ec2/EC2InstanceFilterSet.java 6d5255a 
  awsapi/src/com/cloud/bridge/service/core/ec2/EC2SnapshotFilterSet.java 1c428f0 
  awsapi/src/com/cloud/bridge/service/core/ec2/EC2VolumeFilterSet.java 95d306f 

Diff: https://reviews.apache.org/r/5909/diff/


Testing
-------


Thanks,

Likitha Shetty


Re: Review Request: Modifying filter support in 3 EC2 Describe* API's(DescribeInstances, DescribeVolumes and DescribeSnapshots) to include tags. Component: AWSAPI.

Posted by Prachi Damle <pr...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5909/#review9377
-----------------------------------------------------------

Ship it!


Changes look good. 

- Prachi Damle


On July 12, 2012, 1:29 p.m., Likitha Shetty wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/5909/
> -----------------------------------------------------------
> 
> (Updated July 12, 2012, 1:29 p.m.)
> 
> 
> Review request for cloudstack and Prachi Damle.
> 
> 
> Description
> -------
> 
> Tags support has been added to 3 EC2Describe* API's(DescribeInstances, DescribeVolumes and DescribeSnapshots). Hence for the same 3 EC2Describe* API's filter support has been modified to included 3 tag related filters: tag-key, tag-value and tag:key.
> 
> 
> Diffs
> -----
> 
>   awsapi/src/com/cloud/bridge/service/EC2SoapServiceImpl.java 9e10e09 
>   awsapi/src/com/cloud/bridge/service/core/ec2/EC2DescribeInstances.java e79cd9d 
>   awsapi/src/com/cloud/bridge/service/core/ec2/EC2DescribeSnapshots.java 1bf6e37 
>   awsapi/src/com/cloud/bridge/service/core/ec2/EC2DescribeVolumes.java 04145fa 
>   awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java 5f45847 
>   awsapi/src/com/cloud/bridge/service/core/ec2/EC2InstanceFilterSet.java 6d5255a 
>   awsapi/src/com/cloud/bridge/service/core/ec2/EC2SnapshotFilterSet.java 1c428f0 
>   awsapi/src/com/cloud/bridge/service/core/ec2/EC2VolumeFilterSet.java 95d306f 
>   awsapi/src/com/cloud/stack/CloudStackApi.java 50b2b25 
> 
> Diff: https://reviews.apache.org/r/5909/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Likitha Shetty
> 
>


Re: Review Request: Modifying filter support in 3 EC2 Describe* API's(DescribeInstances, DescribeVolumes and DescribeSnapshots) to include tags. Component: AWSAPI.

Posted by Likitha Shetty <li...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5909/
-----------------------------------------------------------

(Updated July 12, 2012, 1:29 p.m.)


Review request for cloudstack and Prachi Damle.


Changes
-------

Thanks for the review Prachi. I have uploaded a new diff that avoids applying the filter tag:key on top of the CloudStack list command's response. But instead makes a call to the CloudStack list command with tag.key and tag.value parameters set. And then narrows down the list of resources obtained using the remaining filters.
But the issue with this change is that the CloudStack List API's which accept tag key:value filter don't accept an empty string for 'value'. And hence we cannot filter the resources based on empty values for tag-value.


Description
-------

Tags support has been added to 3 EC2Describe* API's(DescribeInstances, DescribeVolumes and DescribeSnapshots). Hence for the same 3 EC2Describe* API's filter support has been modified to included 3 tag related filters: tag-key, tag-value and tag:key.


Diffs (updated)
-----

  awsapi/src/com/cloud/bridge/service/EC2SoapServiceImpl.java 9e10e09 
  awsapi/src/com/cloud/bridge/service/core/ec2/EC2DescribeInstances.java e79cd9d 
  awsapi/src/com/cloud/bridge/service/core/ec2/EC2DescribeSnapshots.java 1bf6e37 
  awsapi/src/com/cloud/bridge/service/core/ec2/EC2DescribeVolumes.java 04145fa 
  awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java 5f45847 
  awsapi/src/com/cloud/bridge/service/core/ec2/EC2InstanceFilterSet.java 6d5255a 
  awsapi/src/com/cloud/bridge/service/core/ec2/EC2SnapshotFilterSet.java 1c428f0 
  awsapi/src/com/cloud/bridge/service/core/ec2/EC2VolumeFilterSet.java 95d306f 
  awsapi/src/com/cloud/stack/CloudStackApi.java 50b2b25 

Diff: https://reviews.apache.org/r/5909/diff/


Testing
-------


Thanks,

Likitha Shetty


Re: Review Request: Modifying filter support in 3 EC2 Describe* API's(DescribeInstances, DescribeVolumes and DescribeSnapshots) to include tags. Component: AWSAPI.

Posted by Prachi Damle <pr...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5909/#review9099
-----------------------------------------------------------


1) Implementation for filters tag-key and tag-value are good.

2) But the filter tag:key need not be applied on top of the CloudStack list command's response like other filters. CloudStack List API has been updated to accept tag key:value filter. So we can set the key and value provided in the EC2 tag:key=value filter to the CloudStack API and get filtered results from CS. 

When EC2 filter is tag:region=canada, CloudStack command should be set this way:

http://localhost:8096/?command=listVolumes&listAll=true&tags[0].key=region&tags[0].value=canada

- Prachi Damle


On July 11, 2012, 1:20 p.m., Likitha Shetty wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/5909/
> -----------------------------------------------------------
> 
> (Updated July 11, 2012, 1:20 p.m.)
> 
> 
> Review request for cloudstack and Prachi Damle.
> 
> 
> Description
> -------
> 
> Tags support has been added to 3 EC2Describe* API's(DescribeInstances, DescribeVolumes and DescribeSnapshots). Hence for the same 3 EC2Describe* API's filter support has been modified to included 3 tag related filters: tag-key, tag-value and tag:key.
> 
> 
> Diffs
> -----
> 
>   awsapi/src/com/cloud/bridge/service/core/ec2/EC2InstanceFilterSet.java 6d5255a 
>   awsapi/src/com/cloud/bridge/service/core/ec2/EC2SnapshotFilterSet.java 1c428f0 
>   awsapi/src/com/cloud/bridge/service/core/ec2/EC2VolumeFilterSet.java 95d306f 
> 
> Diff: https://reviews.apache.org/r/5909/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Likitha Shetty
> 
>