diff options
| author | Huanxuan Ao <huanxuan.ao@easystack.cn> | 2016-07-06 16:54:13 +0800 |
|---|---|---|
| committer | Huanxuan Ao <huanxuan.ao@easystack.cn> | 2016-07-06 20:46:31 +0800 |
| commit | 3222ffc157b6e686249fb2e3d4375c89384bfb97 (patch) | |
| tree | 60ebbd508ff6d2dd6457f6dc9e4ac68b3b7cee8e /openstackclient/tests/volume | |
| parent | 4ce7dd53e8bbd70a97a667c7b39078d73495ec1f (diff) | |
| download | python-openstackclient-3222ffc157b6e686249fb2e3d4375c89384bfb97.tar.gz | |
Add "--property" option to "snapshot create" command in volumev2
Add "--property" option to "snapshot create" command
in volumev2 (v2 only) to support adding properties to
a new snapshot.
Change-Id: Ie0e90c9ccc2ac89b3b7b0ac89751fd864aada9a4
Closes-Bug: #1597192
Diffstat (limited to 'openstackclient/tests/volume')
| -rw-r--r-- | openstackclient/tests/volume/v2/test_snapshot.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/openstackclient/tests/volume/v2/test_snapshot.py b/openstackclient/tests/volume/v2/test_snapshot.py index ef199cbc..2e9bcc82 100644 --- a/openstackclient/tests/volume/v2/test_snapshot.py +++ b/openstackclient/tests/volume/v2/test_snapshot.py @@ -70,12 +70,15 @@ class TestSnapshotCreate(TestSnapshot): "--name", self.new_snapshot.name, "--description", self.new_snapshot.description, "--force", + '--property', 'Alpha=a', + '--property', 'Beta=b', self.new_snapshot.volume_id, ] verifylist = [ ("name", self.new_snapshot.name), ("description", self.new_snapshot.description), ("force", True), + ('property', {'Alpha': 'a', 'Beta': 'b'}), ("volume", self.new_snapshot.volume_id), ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) @@ -86,7 +89,8 @@ class TestSnapshotCreate(TestSnapshot): self.new_snapshot.volume_id, force=True, name=self.new_snapshot.name, - description=self.new_snapshot.description + description=self.new_snapshot.description, + metadata={'Alpha': 'a', 'Beta': 'b'}, ) self.assertEqual(self.columns, columns) self.assertEqual(self.data, data) @@ -110,7 +114,8 @@ class TestSnapshotCreate(TestSnapshot): self.new_snapshot.volume_id, force=True, name=None, - description=self.new_snapshot.description + description=self.new_snapshot.description, + metadata=None, ) self.assertEqual(self.columns, columns) self.assertEqual(self.data, data) |
