Typo in exception name - CellsUpdateProhibited

Change-Id: Ia96cf5c2ac1ce36c6499dc85b2884e68023c6ec3
This commit is contained in:
Davanum Srinivas
2014-09-26 07:49:14 -04:00
parent 3b43f769c5
commit f9da9e1f85
2 changed files with 11 additions and 4 deletions

View File

@@ -485,10 +485,10 @@ class CellStateManagerFile(CellStateManager):
self._update_our_capacity()
def cell_create(self, ctxt, values):
raise exception.CellsUpdateProhibited()
raise exception.CellsUpdateUnsupported()
def cell_update(self, ctxt, cell_name, values):
raise exception.CellsUpdateProhibited()
raise exception.CellsUpdateUnsupported()
def cell_delete(self, ctxt, cell_name):
raise exception.CellsUpdateProhibited()
raise exception.CellsUpdateUnsupported()

View File

@@ -89,8 +89,15 @@ class TestCellsStateManager(test.TestCase):
mock_find_file.return_value = "/etc/nova/cells.json"
mock_read_cached_file.return_value = (False, six.StringIO({}))
self.flags(cells_config='cells.json', group='cells')
self.assertIsInstance(state.CellStateManager(),
manager = state.CellStateManager()
self.assertIsInstance(manager,
state.CellStateManagerFile)
self.assertRaises(exception.CellsUpdateUnsupported,
manager.cell_create, None, None)
self.assertRaises(exception.CellsUpdateUnsupported,
manager.cell_update, None, None, None)
self.assertRaises(exception.CellsUpdateUnsupported,
manager.cell_delete, None, None)
def test_dbmanager_returned(self):
self.assertIsInstance(state.CellStateManager(),