diff options
author | Stephen Finucane <stephenfin@redhat.com> | 2023-05-17 12:27:45 +0100 |
---|---|---|
committer | Stephen Finucane <stephenfin@redhat.com> | 2023-05-17 16:50:16 +0100 |
commit | 629eb33c4dcb73d44d1a4c6105e40d28f6cebdfc (patch) | |
tree | 485a8b83d670a19d644eab733528c2e29dc1a1aa /openstackclient/tests/functional/volume/v1/test_qos.py | |
parent | 31ae635ffe0a2c37ab2bda394d2b072d7e5acff9 (diff) | |
download | python-openstackclient-629eb33c4dcb73d44d1a4c6105e40d28f6cebdfc.tar.gz |
volume: Add 'volume qos set --no-property' option
Supporting "--no-property" option will apply user a convenient way to
clean all properties of volume qos in a short command. The patch adds
"--no-property" option in "volume qos set" command and update related
test cases and docs.
Change-Id: I1fb5b4f0a923bbf557a3af3f63809bde9e84ffd4
Diffstat (limited to 'openstackclient/tests/functional/volume/v1/test_qos.py')
-rw-r--r-- | openstackclient/tests/functional/volume/v1/test_qos.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/openstackclient/tests/functional/volume/v1/test_qos.py b/openstackclient/tests/functional/volume/v1/test_qos.py index cabcd19e..5d0aa41f 100644 --- a/openstackclient/tests/functional/volume/v1/test_qos.py +++ b/openstackclient/tests/functional/volume/v1/test_qos.py @@ -52,8 +52,10 @@ class QosTests(common.BaseVolumeTests): name = uuid.uuid4().hex cmd_output = self.openstack( - 'volume qos create ' + '--consumer front-end ' - '--property Alpha=a ' + name, + 'volume qos create ' + + '--consumer front-end ' + + '--property Alpha=a ' + + name, parse_output=True, ) self.addCleanup(self.openstack, 'volume qos delete ' + name) @@ -64,8 +66,9 @@ class QosTests(common.BaseVolumeTests): # Test volume qos set raw_output = self.openstack( 'volume qos set ' - + '--property Alpha=c ' + + '--no-property ' + '--property Beta=b ' + + '--property Charlie=c ' + name, ) self.assertOutput('', raw_output) @@ -76,11 +79,14 @@ class QosTests(common.BaseVolumeTests): parse_output=True, ) self.assertEqual(name, cmd_output['name']) - self.assertEqual({'Alpha': 'c', 'Beta': 'b'}, cmd_output['properties']) + self.assertEqual( + {'Beta': 'b', 'Charlie': 'c'}, + cmd_output['properties'], + ) # Test volume qos unset raw_output = self.openstack( - 'volume qos unset ' + '--property Alpha ' + name, + 'volume qos unset ' + '--property Charlie ' + name, ) self.assertOutput('', raw_output) |