[openstack-dev] blueprint ec2-tags-api

Stephen Gran stephen.gran at guardian.co.uk
Fri Mar 22 13:49:46 UTC 2013


Hi,

On 31/01/13 22:30, Vishvananda Ishaya wrote:
>
> On Jan 31, 2013, at 12:17 PM, Stephen Gran<stephen.gran at guardian.co.uk>  wrote:
>
>> Hello,
>>
>> At work we use the EC2 tags API quite heavily for all sorts of things,
>> so I've been tasked with getting it implemented for openstack.
>>
>> As some background, the EC2 API offers 3 API calls: CreateTags,
>> DeleteTags and DescribeTags, as well as a way to filter a search for a
>> resource by tags (by passing {"filter": [{"tag:key": "value"}]} or
>> {"filter": [{"tag-key": "value"}]} as parameters to an API call like
>> DescribeInstances or DescribeSecurityGroups.
>>
>> The API references are here:
>> http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-CreateTags.html
>> http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DeleteTags.html
>> http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeTags.html
>> http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeInstances.html
>> (and other Describe* resource searches)
>>
>> The part of this that seems awkward to overlay onto openstack's database
>> schema is that tags can be applied to multiple resource types - eg, when
>> a stack is cloudformed, all the instances, load balancers, security
>> groups, etc are tagged with the cloudformation name.
>>
>> I can see two ways of implementing this:
>>
>> 1) Reuse the existing instance-metadata table and start creating
>> security-group metadata tables and so on.  This approach has the
>> downside that resources that are served by cinder or quantum will be
>> awkward - we'd have to add equivalent API calls to them and call their
>> API.
>
> It seems like the openstack api needs to grow support for metadata on all objects, so
> I think adding api calls is the right long term goal.
>
> Thanks for bringing this up. I'm leaning towards 1 even though it will be more work.

This is awaiting review at https://review.openstack.org/#/c/23256/ (and 
a related one at https://review.openstack.org/#/c/23258/).  I'd 
appreciate people giving them the once over.

These patches only expose the existing metadata in nova via the EC2 API 
and allow filtering on tags in searches.  I think I've left it 
extensible so that other types of metadata can be easily added later.

Cheers,
-- 
Stephen Gran
Senior Systems Integrator - guardian.co.uk
Please consider the environment before printing this email.
------------------------------------------------------------------
Visit guardian.co.uk - website of the year
 
www.guardian.co.uk    www.observer.co.uk     www.guardiannews.com 
 
On your mobile, visit m.guardian.co.uk or download the Guardian
iPhone app www.guardian.co.uk/iphone and iPad edition www.guardian.co.uk/iPad 
 
Save up to 32% by subscribing to the Guardian and Observer - choose the papers you want and get full digital access. 
Visit guardian.co.uk/subscribe
 
---------------------------------------------------------------------
This e-mail and all attachments are confidential and may also
be privileged. If you are not the named recipient, please notify
the sender and delete the e-mail and all attachments immediately.
Do not disclose the contents to another person. You may not use
the information for any purpose, or store, or copy, it in any way.
 
Guardian News & Media Limited is not liable for any computer
viruses or other material transmitted with or as part of this
e-mail. You should employ virus checking software.
 
Guardian News & Media Limited
 
A member of Guardian Media Group plc
Registered Office
PO Box 68164
Kings Place
90 York Way
London
N1P 2AP
 
Registered in England Number 908396




More information about the OpenStack-dev mailing list