add filters 'encrypted' and 'volume-type' to volumes
Change-Id: I2b0a18a30c56206ffe5652cb33f350bf8e764016
This commit is contained in:
parent
97e72e40d0
commit
fdeb9c290b
@ -111,10 +111,12 @@ class VolumeDescriber(common.TaggableItemsDescriber):
|
||||
KIND = 'vol'
|
||||
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']}
|
||||
|
@ -56,11 +56,14 @@ class VolumeTestCase(base.ApiTestCase):
|
||||
'DescribeVolumes', 'volumeSet',
|
||||
[('availability-zone', fakes.NAME_AVAILABILITY_ZONE),
|
||||
('create-time', fakes.TIME_CREATE_VOLUME_2),
|
||||
('encrypted', False),
|
||||
# TODO(ft): declare a constant for the volume size in fakes
|
||||
('size', 1),
|
||||
('snapshot-id', fakes.ID_EC2_SNAPSHOT_1),
|
||||
('status', 'available'),
|
||||
('volume-id', fakes.ID_EC2_VOLUME_1),
|
||||
# TODO(ft): support filtering by none/empty value
|
||||
# ('volume-type', ''),
|
||||
('attachment.device', fakes.ROOT_DEVICE_NAME_INSTANCE_2),
|
||||
('attachment.instance-id', fakes.ID_EC2_INSTANCE_2),
|
||||
('attachment.status', 'attached')])
|
||||
|
Loading…
Reference in New Issue
Block a user