diff options
Diffstat (limited to 'nova/tests/cells/test_cells_rpcapi.py')
-rw-r--r-- | nova/tests/cells/test_cells_rpcapi.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/nova/tests/cells/test_cells_rpcapi.py b/nova/tests/cells/test_cells_rpcapi.py index 4d58bdb9e..6eeff1730 100644 --- a/nova/tests/cells/test_cells_rpcapi.py +++ b/nova/tests/cells/test_cells_rpcapi.py @@ -425,3 +425,29 @@ class CellsAPITestCase(test.TestCase): self._check_result(call_info, 'validate_console_port', expected_args, version='1.6') self.assertEqual(result, 'fake_response') + + def test_bdm_update_or_create_at_top(self): + fake_bdm = {'id': 2, 'other': 'meow'} + + call_info = self._stub_rpc_method('cast', None) + + self.cells_rpcapi.bdm_update_or_create_at_top( + self.fake_context, fake_bdm, create='fake-create') + + expected_args = {'bdm': fake_bdm, 'create': 'fake-create'} + self._check_result(call_info, 'bdm_update_or_create_at_top', + expected_args, version='1.10') + + def test_bdm_destroy_at_top(self): + call_info = self._stub_rpc_method('cast', None) + + self.cells_rpcapi.bdm_destroy_at_top(self.fake_context, + 'fake-uuid', + device_name='fake-device', + volume_id='fake-vol') + + expected_args = {'instance_uuid': 'fake-uuid', + 'device_name': 'fake-device', + 'volume_id': 'fake-vol'} + self._check_result(call_info, 'bdm_destroy_at_top', + expected_args, version='1.10') |