Implement EC2 API for Tags
The EC2 API allows end users to 'tag' resources with arbitrary key-value pairs. This facility is also used by internal AWS tools such as autoscaling and cloudformation to group resources spawned by them. The openstack EC2 API implementation does not offer the tags related API calls DescribeTags, CreateTags, DeleteTags or the ability to filter resource searches by tags ("filter": [{ "tag:key": "value"}]} and {"filter": [{"tag-key": "value"}]}.
The difficulty I see is that tags can be applied to many resource types, including ones handled by Quantum and Glance and so on. It is not clear to me if reusing the instance-metadata table (and creating a 'security-
Blueprint information
- Status:
- Complete
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- Stephen Gran
- Direction:
- Needs approval
- Assignee:
- Stephen Gran
- Definition:
- Approved
- Series goal:
- None
- Implementation:
- Implemented
- Milestone target:
- None
- Started by
- Stephen Gran
- Completed by
- Stephen Gran
Related branches
Related bugs
Sprints
Whiteboard
After discussion on the mailing list, it was decided to implement this as a table per resource type, with data being stored local to the service implementing it and API calls from the EC2 API.
Create lookup table in ec2utils that turns resource ids like 'ami-XXXX' and 'sg-XXXX' into a tuple of resource type, resource id
Create CRUD methods in EC2 API (CreateTags, DeleteTags, DescribeTags) that uses lookup table to determine which API to call out out to
Call out to Nova Compute API for tags related to instances
Add stubs for calling out to other APIs that returns a sensible error for now
Gerrit topic: https:/
Addressed by: https:/
Add CRUD methods for tags to the EC2 API.
Gerrit topic: https:/
Work Items
Work items:
Lookup table in ec2utils: TODO
CRUD methods: TODO
Compute API callout: TODO
Stubs for other APIs: TODO