Extend the DESCRIBE_SNAPSHOTS_RESPONSE to include the tagSet as documented by AWS. Also refactor the names of the tests I introduced in previous commits to be more descriptive. Finally some code cleanup, removing the get_tags method from classes and instead inherit from the TaggedEC2Resource class.

This commit is contained in:
Peter Van Bouwel 2014-11-09 15:00:40 +01:00
commit 2f1f993793
3 changed files with 36 additions and 14 deletions

View file

@ -197,6 +197,14 @@ DESCRIBE_SNAPSHOTS_RESPONSE = """<DescribeSnapshotsResponse xmlns="http://ec2.am
<volumeSize>{{ snapshot.volume.size }}</volumeSize>
<description>{{ snapshot.description }}</description>
<tagSet>
{% for tag in snapshot.get_tags() %}
<item>
<resourceId>{{ tag.resource_id }}</resourceId>
<resourceType>{{ tag.resource_type }}</resourceType>
<key>{{ tag.key }}</key>
<value>{{ tag.value }}</value>
</item>
{% endfor %}
</tagSet>
</item>
{% endfor %}