Add deleteOnTermination to volume filters
In I0e5bbad355a6879209cfd59dddfa6fbdf817dfbe we forgot to do this. Change-Id: I3871c257eb3af209fec25462e705221c1051a745
This commit is contained in:
parent
c96b1844d0
commit
ce90843e59
|
@ -119,17 +119,20 @@ class VolumeDescriber(common.TaggableItemsDescriber):
|
|||
|
||||
KIND = 'vol'
|
||||
SORT_KEY = 'volumeId'
|
||||
FILTER_MAP = {'availability-zone': 'availabilityZone',
|
||||
'create-time': 'createTime',
|
||||
'encrypted': 'encrypted',
|
||||
'size': 'size',
|
||||
'snapshot-id': 'snapshotId',
|
||||
'status': 'status',
|
||||
'volume-id': 'volumeId',
|
||||
'volume-type': 'volumeType',
|
||||
'attachment.device': ['attachmentSet', 'device'],
|
||||
'attachment.instance-id': ['attachmentSet', 'instanceId'],
|
||||
'attachment.status': ['attachmentSet', 'status']}
|
||||
FILTER_MAP = {
|
||||
'availability-zone': 'availabilityZone',
|
||||
'create-time': 'createTime',
|
||||
'encrypted': 'encrypted',
|
||||
'size': 'size',
|
||||
'snapshot-id': 'snapshotId',
|
||||
'status': 'status',
|
||||
'volume-id': 'volumeId',
|
||||
'volume-type': 'volumeType',
|
||||
'attachment.delete-on-termination':
|
||||
['attachmentSet', 'deleteOnTermination'],
|
||||
'attachment.device': ['attachmentSet', 'device'],
|
||||
'attachment.instance-id': ['attachmentSet', 'instanceId'],
|
||||
'attachment.status': ['attachmentSet', 'status']}
|
||||
|
||||
def format(self, volume, os_volume):
|
||||
return _format_volume(self.context, volume, os_volume,
|
||||
|
|
|
@ -67,6 +67,7 @@ class VolumeTestCase(base.ApiTestCase):
|
|||
('volume-id', fakes.ID_EC2_VOLUME_1),
|
||||
# TODO(ft): support filtering by none/empty value
|
||||
# ('volume-type', ''),
|
||||
('attachment.delete-on-termination', False),
|
||||
('attachment.device', fakes.ROOT_DEVICE_NAME_INSTANCE_2),
|
||||
('attachment.instance-id', fakes.ID_EC2_INSTANCE_2),
|
||||
('attachment.status', 'attached')])
|
||||
|
|
Loading…
Reference in New Issue