summaryrefslogtreecommitdiff
path: root/functional
diff options
context:
space:
mode:
authorXi Yang <yang.xi@99cloud.net>2016-01-18 15:47:23 +0800
committerHuanxuan Ao <huanxuan.ao@easystack.cn>2016-08-03 12:19:16 +0800
commit20ae54045cef136a8d0665aab0d45698e12ed21c (patch)
treed50a920f55d5dd93c3b78db41345f1908e36c556 /functional
parenteaee74bba253bf04471055bbe51db6aad2975a7a (diff)
downloadpython-openstackclient-20ae54045cef136a8d0665aab0d45698e12ed21c.tar.gz
Add support of setting volume's state
OSC does not support to set volume's state, this patch is going to add this functionality. Closes-Bug:#1535213 Change-Id: I5bc1c7e81b8ba61c37f4bfd209fc86c5857fb050 Co-Authored-By: Huanxuan Ao <huanxuan.ao@easystack.cn>
Diffstat (limited to 'functional')
-rw-r--r--functional/tests/volume/v2/test_volume.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/functional/tests/volume/v2/test_volume.py b/functional/tests/volume/v2/test_volume.py
index 019f0c6f..02324a1e 100644
--- a/functional/tests/volume/v2/test_volume.py
+++ b/functional/tests/volume/v2/test_volume.py
@@ -43,9 +43,16 @@ class VolumeTests(common.BaseVolumeTests):
'volume set --name ' + cls.OTHER_NAME + ' ' + cls.NAME)
cls.assertOutput('', raw_output)
+ # Set volume state
+ cls.openstack('volume set --state error ' + cls.OTHER_NAME)
+ opts = cls.get_opts(["status"])
+ raw_output_status = cls.openstack(
+ 'volume show ' + cls.OTHER_NAME + opts)
+
# Delete test volume
raw_output = cls.openstack('volume delete ' + cls.OTHER_NAME)
cls.assertOutput('', raw_output)
+ cls.assertOutput('error\n', raw_output_status)
def test_volume_list(self):
opts = self.get_opts(self.HEADERS)