diff options
| author | Huanxuan Ao <huanxuan.ao@easystack.cn> | 2016-06-28 14:39:00 +0800 |
|---|---|---|
| committer | Huanxuan Ao <huanxuan.ao@easystack.cn> | 2016-06-29 19:16:35 +0800 |
| commit | dbed97a24df2fb74e4989fb15c912252f8a8bb07 (patch) | |
| tree | b1a5bbc4881e23dafc9290c37bf7cc8644134a8b /functional/tests/compute | |
| parent | 9e47688e5eb2d3e4ee8fe0e15d49b34fe7c5512d (diff) | |
| download | python-openstackclient-dbed97a24df2fb74e4989fb15c912252f8a8bb07.tar.gz | |
Add "--property" option to "flavor create" command
Add "--property" option to "flavor create" command to support
adding properties to a new falvor.
Change-Id: I4f06b364375d5a81584fe41122d48e9568fa712a
Closes-Bug: #1596798
Diffstat (limited to 'functional/tests/compute')
| -rw-r--r-- | functional/tests/compute/v2/test_flavor.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/functional/tests/compute/v2/test_flavor.py b/functional/tests/compute/v2/test_flavor.py index 2bb075bd..6edb1fdf 100644 --- a/functional/tests/compute/v2/test_flavor.py +++ b/functional/tests/compute/v2/test_flavor.py @@ -25,7 +25,8 @@ class FlavorTests(test.TestCase): @classmethod def setUpClass(cls): opts = cls.get_show_opts(cls.FIELDS) - raw_output = cls.openstack('flavor create ' + cls.NAME + opts) + raw_output = cls.openstack( + 'flavor create --property a=b --property c=d ' + cls.NAME + opts) expected = cls.NAME + '\n' cls.assertOutput(expected, raw_output) @@ -47,19 +48,22 @@ class FlavorTests(test.TestCase): def test_flavor_properties(self): opts = self.get_show_opts(['properties']) + # check the properties we added in create command. + raw_output = self.openstack('flavor show ' + self.NAME + opts) + self.assertEqual("a='b', c='d'\n", raw_output) raw_output = self.openstack( - 'flavor set --property a=b --property c=d ' + self.NAME + 'flavor set --property e=f --property g=h ' + self.NAME ) self.assertEqual('', raw_output) raw_output = self.openstack('flavor show ' + self.NAME + opts) - self.assertEqual("a='b', c='d'\n", raw_output) + self.assertEqual("a='b', c='d', e='f', g='h'\n", raw_output) raw_output = self.openstack( - 'flavor unset --property a ' + self.NAME + 'flavor unset --property a --property c ' + self.NAME ) self.assertEqual('', raw_output) raw_output = self.openstack('flavor show ' + self.NAME + opts) - self.assertEqual("c='d'\n", raw_output) + self.assertEqual("e='f', g='h'\n", raw_output) |
