From 629eb33c4dcb73d44d1a4c6105e40d28f6cebdfc Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Wed, 17 May 2023 12:27:45 +0100 Subject: 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 --- openstackclient/tests/functional/volume/v3/test_qos.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'openstackclient/tests/functional/volume/v3/test_qos.py') diff --git a/openstackclient/tests/functional/volume/v3/test_qos.py b/openstackclient/tests/functional/volume/v3/test_qos.py index 2a09e549..54dffbc0 100644 --- a/openstackclient/tests/functional/volume/v3/test_qos.py +++ b/openstackclient/tests/functional/volume/v3/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) @@ -65,8 +67,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) @@ -77,11 +80,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) -- cgit v1.2.1