From b7a7ac7b5af0eacb9bbf4144013ea93257043653 Mon Sep 17 00:00:00 2001 From: Eric Harney Date: Sat, 4 May 2019 10:37:40 -0600 Subject: [PATCH] Allow filtering on size for volume list "size" should be a filterable field. Closes-Bug: #1827733 Change-Id: If43f136b28aef0efccd37184c01e8617d62bb46c --- cinder/tests/unit/api/test_common.py | 3 ++- etc/cinder/resource_filters.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cinder/tests/unit/api/test_common.py b/cinder/tests/unit/api/test_common.py index 14b733f7bf8..c169e27ad3d 100644 --- a/cinder/tests/unit/api/test_common.py +++ b/cinder/tests/unit/api/test_common.py @@ -478,7 +478,8 @@ class GeneralFiltersTest(test.TestCase): @ddt.data({'resource': 'volume', 'expected': ["name", "status", "metadata", "bootable", "migration_status", - "availability_zone", "group_id"]}, + "availability_zone", "group_id", + "size"]}, {'resource': 'backup', 'expected': ["name", "status", "volume_id"]}, {'resource': 'snapshot', diff --git a/etc/cinder/resource_filters.json b/etc/cinder/resource_filters.json index b0d1c0ad44b..4b50f878413 100644 --- a/etc/cinder/resource_filters.json +++ b/etc/cinder/resource_filters.json @@ -1,7 +1,7 @@ { "volume": ["name", "status", "metadata", "bootable", "migration_status", "availability_zone", - "group_id"], + "group_id", "size"], "backup": ["name", "status", "volume_id"], "snapshot": ["name", "status", "volume_id", "metadata", "availability_zone"],