Cells: Update set_admin_password for objects

Cells code was calling the compute/api set_admin_password method with an
old-world style instance and failing on the task_state attribute access.
This adds set_admin_password to the list of methods handled via the
cells RPC redirect method which is objects compatible.

Change-Id: I12e212260ed62dc9380202de31fda928a9498dcb
Closes-Bug: #1335315
This commit is contained in:
Andrew Laski
2014-06-27 16:23:27 -04:00
parent 4b4cf81350
commit 825321cd7a
8 changed files with 49 additions and 10 deletions

View File

@@ -798,3 +798,11 @@ class CellsManagerClassTestCase(test.NoDBTestCase):
image_id='fake-id',
backup_type='backup-type',
rotation='rotation')
def test_set_admin_password(self):
with mock.patch.object(self.msg_runner,
'set_admin_password') as set_admin_password:
self.cells_manager.set_admin_password(self.ctxt,
instance='fake-instance', new_pass='fake-password')
set_admin_password.assert_called_once_with(self.ctxt,
'fake-instance', 'fake-password')