This is a functional specification of the support added for tags related functionality added to CloudStack's EC2 implementation (awsapi). Also some more fidelity task are covered here.
CloudStack supports tags for the following resource types: User Vm | Template | ISO | Volume | Snapshot | Guest Network | LB rule | PF rule | Firewall rule | Security Group | Remote Access VPN | Public IP Address
We can map this support to following AWS EC2 resource types:
A] For Tag Support following new EC2 API's will be supported:
1) ec2-create-tags
CS: CreateTags&ResourceId.1=image:<uuid>&Tag.1.Key=type&Tag.1.Value=linux &Tag.2.Key=inbuilt&Tag.2.Value=true
AWS: ec2-create-tags image:<uuid> --tag type=linux --tag inbuilt=true (CLI)
Parameters
Functionality
2) ec2-describe-tags
CS: DescribeTags&Filter.1.Name=resource-type&Filter.1.Value=image
AWS: ec2-describe-tags --filter resource-type=image (CLI)
Parameters
Functionality
3) ec2-delete-tag
CS: DeleteTags&ResourceId.1=image:<uuid>&Tag.1.Key=type &Tag.2.Key=inbuilt&Tag.2.Value=true
AWS: ec2-delete-tag image:<uuid> --tag type --tag inbuilt=true (CLI)
Parameters
Functionality
4) Changes to existing Describe* EC2 API’s
Following are the Describe APIs whose output has been modified to include the information about the tags associated with the corresponding resource:
DescribeImages, DescribeInstances, DescribeSnapshots, DescribeVolumes
5)Filter support tag-key, tag-value and tag:key
Following existing Describe* EC2 API’s now have filter support for tag-key, tag-value and tag:key filters:
DescribeInstances, DescribeSnapshots, DescribeVolumes
One limitation: For filter tag:key, AWS EC2 API allows an empty value, however CS API cannot filter based on empty values.
B] Fidelity task: Fix dns-name filter for DecsribeInstances API
We plan to add support for the dns-name filter for this EC2 API. We will map the 'name' property of a CS UserVM to the dns-name filter.