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:
parent
53fdf330ee
commit
17356fe56c
@ -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):
|
||||
|
@ -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 %}
|
||||
|
Loading…
Reference in New Issue
Block a user