summaryrefslogtreecommitdiff
path: root/openstackclient/tests
diff options
context:
space:
mode:
authorHuanxuan Ao <huanxuan.ao@easystack.cn>2016-06-27 16:59:51 +0800
committerHuanxuan Ao <huanxuan.ao@easystack.cn>2016-06-27 16:59:51 +0800
commitfc719f998ce5f826d42f49aecf4f437e6d07857a (patch)
tree6885cc6194dba61685847c49fa9526469bb621d8 /openstackclient/tests
parent21ac9230e80202b9a736960ace369f0a20af837f (diff)
downloadpython-openstackclient-fc719f998ce5f826d42f49aecf4f437e6d07857a.tar.gz
Add "--force" option to "backup create" command in volumev2
Cinder V2 API supports creating volume backup with "--force" option. However, OSC doesn't support this argument. So this patch add the "--force" option to allow users to back up a in-use volume. Change-Id: I326f8d6172b2830da4cf1317348af50142cc5490 Closes-Bug: #1596443
Diffstat (limited to 'openstackclient/tests')
-rw-r--r--openstackclient/tests/volume/v2/test_backup.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/openstackclient/tests/volume/v2/test_backup.py b/openstackclient/tests/volume/v2/test_backup.py
index 8a151a91..ba0f1c18 100644
--- a/openstackclient/tests/volume/v2/test_backup.py
+++ b/openstackclient/tests/volume/v2/test_backup.py
@@ -72,12 +72,14 @@ class TestBackupCreate(TestBackup):
"--name", self.new_backup.name,
"--description", self.new_backup.description,
"--container", self.new_backup.container,
+ "--force",
self.new_backup.volume_id,
]
verifylist = [
("name", self.new_backup.name),
("description", self.new_backup.description),
("container", self.new_backup.container),
+ ("force", True),
("volume", self.new_backup.volume_id),
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
@@ -88,7 +90,8 @@ class TestBackupCreate(TestBackup):
self.new_backup.volume_id,
container=self.new_backup.container,
name=self.new_backup.name,
- description=self.new_backup.description
+ description=self.new_backup.description,
+ force=True,
)
self.assertEqual(self.columns, columns)
self.assertEqual(self.data, data)
@@ -112,7 +115,8 @@ class TestBackupCreate(TestBackup):
self.new_backup.volume_id,
container=self.new_backup.container,
name=None,
- description=self.new_backup.description
+ description=self.new_backup.description,
+ force=False,
)
self.assertEqual(self.columns, columns)
self.assertEqual(self.data, data)