diff options
author | Brian Elliott <bdelliott@gmail.com> | 2013-10-17 21:56:41 +0000 |
---|---|---|
committer | Brian Elliott <bdelliott@gmail.com> | 2013-10-17 21:56:41 +0000 |
commit | 034df6e875d6c0b590f3cfb802574c2f982fd534 (patch) | |
tree | c640d00555ae94a40b2d766e03aea5826f2e54f8 /nova | |
parent | 9fb39ab5ea477bb383d767f6838981ea9f4307d1 (diff) | |
download | nova-034df6e875d6c0b590f3cfb802574c2f982fd534.tar.gz |
Make cells 'flavorid' for resizes
Cells should use 'flavorid' (not 'id') for resizes.
bug 1241222
Change-Id: I57b997425f183f25d3ca032c7d8c35c1f49e3afc
Diffstat (limited to 'nova')
-rw-r--r-- | nova/cells/messaging.py | 2 | ||||
-rw-r--r-- | nova/tests/cells/test_cells_messaging.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/nova/cells/messaging.py b/nova/cells/messaging.py index 410084503a..76b5177c4c 100644 --- a/nova/cells/messaging.py +++ b/nova/cells/messaging.py @@ -875,7 +875,7 @@ class _TargetedMessageMethods(_BaseMessageMethods): extra_instance_updates): """Resize an instance via compute_api.resize().""" self._call_compute_api_with_obj(message.ctxt, instance, 'resize', - flavor_id=flavor['id'], + flavor_id=flavor['flavorid'], **extra_instance_updates) def live_migrate_instance(self, message, instance, block_migration, diff --git a/nova/tests/cells/test_cells_messaging.py b/nova/tests/cells/test_cells_messaging.py index afa7d65daf..38c8592a7b 100644 --- a/nova/tests/cells/test_cells_messaging.py +++ b/nova/tests/cells/test_cells_messaging.py @@ -1247,9 +1247,9 @@ class CellsTargetedMethodsTestCase(test.TestCase): self._test_instance_action_method('unpause', (), {}, (), {}, False) def test_resize_instance(self): - kwargs = dict(flavor=dict(id=42), + kwargs = dict(flavor=dict(id=42, flavorid='orangemocchafrappuccino'), extra_instance_updates=dict(cow='moo')) - expected_kwargs = dict(flavor_id=42, cow='moo') + expected_kwargs = dict(flavor_id='orangemocchafrappuccino', cow='moo') self._test_instance_action_method('resize', (), kwargs, (), expected_kwargs, False) |