From 3e11661074e1a7e051e0ebff5800f8f1aac85153 Mon Sep 17 00:00:00 2001 From: sunyajing Date: Sat, 28 May 2016 11:01:22 +0800 Subject: Add "image unset" command This patch add a command that supports unsetting image tags and properties Change-Id: I6f2cf45a61ff89da6664f3a34ae49fdd85d8c986 Closes-Bug:#1582968 --- functional/tests/image/v2/test_image.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'functional/tests') 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) -- cgit v1.2.1