Merge pull request #1448 from grahamlyons/fix-ebs-tagging

Change `'image'` for `'volume'` when getting tags
This commit is contained in:
Steve Pulec 2018-03-06 22:16:59 -05:00 committed by GitHub
commit 924c99bcea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ class ElasticBlockStore(BaseResponse):
zone = self._get_param('AvailabilityZone')
snapshot_id = self._get_param('SnapshotId')
tags = self._parse_tag_specification("TagSpecification")
volume_tags = tags.get('image', {})
volume_tags = tags.get('volume', {})
encrypted = self._get_param('Encrypted', if_none=False)
if self.is_not_dryrun('CreateVolume'):
volume = self.ec2_backend.create_volume(

View File

@ -397,7 +397,7 @@ def test_create_volume_with_tags():
Size=40,
TagSpecifications=[
{
'ResourceType': 'image',
'ResourceType': 'volume',
'Tags': [
{
'Key': 'TEST_TAG',