From 17356fe56c0502de0b9cdee2e54ecf62f806b76f Mon Sep 17 00:00:00 2001 From: Peter Van Bouwel Date: Sun, 9 Nov 2014 12:21:19 +0100 Subject: [PATCH] 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. --- moto/ec2/models.py | 4 ++++ moto/ec2/responses/elastic_block_store.py | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/moto/ec2/models.py b/moto/ec2/models.py index 377699164..df89be4ce 100644 --- a/moto/ec2/models.py +++ b/moto/ec2/models.py @@ -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): diff --git a/moto/ec2/responses/elastic_block_store.py b/moto/ec2/responses/elastic_block_store.py index 868cf2215..93009294b 100644 --- a/moto/ec2/responses/elastic_block_store.py +++ b/moto/ec2/responses/elastic_block_store.py @@ -132,6 +132,16 @@ DESCRIBE_VOLUMES_RESPONSE = """