summaryrefslogtreecommitdiff
path: root/novaclient/tests/unit/v2/test_shell.py
diff options
context:
space:
mode:
authorDan Smith <dansmith@redhat.com>2017-03-17 07:11:38 -0700
committerMatt Riedemann <mriedem.os@gmail.com>2017-10-03 20:43:47 +0000
commit41aeb89cae68a0e2ce03a248226488d4ba2ea8af (patch)
treef96eab93bd2efa38a78455d00dada8940c115021 /novaclient/tests/unit/v2/test_shell.py
parent5620beb7c8d3ff6a30ddef2140ae3aa1fbde6a98 (diff)
downloadpython-novaclient-newton-eol.tar.gz
Fix aggregate_update name and availability_zone clashnewton-eol6.0.2stable/newton
The name and availability_zone arguments to aggregate update were replaced by optional parameters in change I778ab7ec54a376c60f19dcc89fe62fcab6e59e42. However, the '--name' and 'name' arguments in the parser would conflict, resulting in only the deprecated argument working. Thus, attempting to update the name on an aggregate using --name would end up doing a PUT with no new name provided. Note that there were unit tests for this, but they were not catching this problem. So, this removes those tests and adds functional tests to poke it. Change-Id: Ifef6fdc1a737dd219712a4525d4e34afd3fbd80c Closes-Bug: #1673789 (cherry picked from commit 20f00553d0d8ed791105d5f7fc8798b9ac6a6a53) (cherry picked from commit 983f7211a872a5be9698d7c57fda41020765a64a)
Diffstat (limited to 'novaclient/tests/unit/v2/test_shell.py')
-rw-r--r--novaclient/tests/unit/v2/test_shell.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/novaclient/tests/unit/v2/test_shell.py b/novaclient/tests/unit/v2/test_shell.py
index 34eec493..6e88fc09 100644
--- a/novaclient/tests/unit/v2/test_shell.py
+++ b/novaclient/tests/unit/v2/test_shell.py
@@ -1861,30 +1861,6 @@ class ShellTest(utils.TestCase):
self.assert_called('PUT', '/os-aggregates/1', body, pos=-2)
self.assert_called('GET', '/os-aggregates/1', pos=-1)
- def test_aggregate_update_by_id_legacy(self):
- self.run_command('aggregate-update 1 new_name')
- body = {"aggregate": {"name": "new_name"}}
- self.assert_called('PUT', '/os-aggregates/1', body, pos=-2)
- self.assert_called('GET', '/os-aggregates/1', pos=-1)
-
- def test_aggregate_update_by_name_legacy(self):
- self.run_command('aggregate-update test new_name')
- body = {"aggregate": {"name": "new_name"}}
- self.assert_called('PUT', '/os-aggregates/1', body, pos=-2)
- self.assert_called('GET', '/os-aggregates/1', pos=-1)
-
- def test_aggregate_update_with_availability_zone_by_id_legacy(self):
- self.run_command('aggregate-update 1 foo new_zone')
- body = {"aggregate": {"name": "foo", "availability_zone": "new_zone"}}
- self.assert_called('PUT', '/os-aggregates/1', body, pos=-2)
- self.assert_called('GET', '/os-aggregates/1', pos=-1)
-
- def test_aggregate_update_with_availability_zone_by_name_legacy(self):
- self.run_command('aggregate-update test foo new_zone')
- body = {"aggregate": {"name": "foo", "availability_zone": "new_zone"}}
- self.assert_called('PUT', '/os-aggregates/1', body, pos=-2)
- self.assert_called('GET', '/os-aggregates/1', pos=-1)
-
def test_aggregate_set_metadata_add_by_id(self):
self.run_command('aggregate-set-metadata 3 foo=bar')
body = {"set_metadata": {"metadata": {"foo": "bar"}}}