Extend the DESCRIBE_VOLUMES_RESPONSE to include the tagSet as documented by AWS on http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-ItemType-DescribeVolumesSetItemResponseType.html . This is needed to pass the test that was added in previous commit.

This commit is contained in:
Peter Van Bouwel 2014-11-09 12:21:19 +01:00
parent 53fdf330ee
commit 17356fe56c
2 changed files with 14 additions and 0 deletions

View File

@ -1255,6 +1255,10 @@ class Volume(object):
else:
return 'available'
def get_tags(self):
tags = ec2_backend.describe_tags(filters={'resource-id': [self.id]})
return tags
class Snapshot(object):
def __init__(self, snapshot_id, volume, description):

View File

@ -132,6 +132,16 @@ DESCRIBE_VOLUMES_RESPONSE = """<DescribeVolumesResponse xmlns="http://ec2.amazon
</item>
{% endif %}
</attachmentSet>
<tagSet>
{% for tag in volume.get_tags() %}
<item>
<resourceId>{{ tag.resource_id }}</resourceId>
<resourceType>{{ tag.resource_type }}</resourceType>
<key>{{ tag.key }}</key>
<value>{{ tag.value }}</value>
</item>
{% endfor %}
</tagSet>
<volumeType>standard</volumeType>
</item>
{% endfor %}