diff options
| author | sunyajing <yajing.sun@easystack.cn> | 2016-05-28 11:01:22 +0800 |
|---|---|---|
| committer | sunyajing <yajing.sun@easystack.cn> | 2016-05-28 16:38:22 +0800 |
| commit | 3e11661074e1a7e051e0ebff5800f8f1aac85153 (patch) | |
| tree | 8714135039224e6e1cc338cbd75dd038e8022655 /functional | |
| parent | 9da02d14eadc39da6f97b3df095af8b0c452a5b4 (diff) | |
| download | python-openstackclient-3e11661074e1a7e051e0ebff5800f8f1aac85153.tar.gz | |
Add "image unset" command
This patch add a command that supports
unsetting image tags and properties
Change-Id: I6f2cf45a61ff89da6664f3a34ae49fdd85d8c986
Closes-Bug:#1582968
Diffstat (limited to 'functional')
| -rw-r--r-- | functional/tests/image/v2/test_image.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/functional/tests/image/v2/test_image.py b/functional/tests/image/v2/test_image.py index f0ebc116..6a33ad88 100644 --- a/functional/tests/image/v2/test_image.py +++ b/functional/tests/image/v2/test_image.py @@ -65,3 +65,12 @@ class ImageTests(test.TestCase): self.openstack('image set --property a=b --property c=d ' + self.NAME) raw_output = self.openstack('image show ' + self.NAME + opts) self.assertEqual(self.NAME + "\na='b', c='d'\n", raw_output) + + def test_image_unset(self): + opts = self.get_show_opts(["name", "tags", "properties"]) + self.openstack('image set --tag 01 ' + self.NAME) + self.openstack('image unset --tag 01 ' + self.NAME) + # test_image_metadata has set image properties "a" and "c" + self.openstack('image unset --property a --property c ' + self.NAME) + raw_output = self.openstack('image show ' + self.NAME + opts) + self.assertEqual(self.NAME + "\n\n", raw_output) |
