summaryrefslogtreecommitdiff
path: root/functional
diff options
context:
space:
mode:
authorsunyajing <yajing.sun@easystack.cn>2016-05-28 11:01:22 +0800
committersunyajing <yajing.sun@easystack.cn>2016-05-28 16:38:22 +0800
commit3e11661074e1a7e051e0ebff5800f8f1aac85153 (patch)
tree8714135039224e6e1cc338cbd75dd038e8022655 /functional
parent9da02d14eadc39da6f97b3df095af8b0c452a5b4 (diff)
downloadpython-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.py9
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)