The nova.tests.cells.fakes Module

Fakes For Cells tests.

class CellStubInfo(test_case, cell_name, db_entries)

Bases: object

class FakeCellState(cell_name, is_me=False)

Bases: nova.cells.state.CellState

send_message(message)
class FakeCellStateManager(*args, **kwargs)

Bases: nova.cells.state.CellStateManager

class FakeCellsDriver

Bases: nova.cells.driver.BaseCellsDriver

class FakeCellsManager(*args, **kwargs)

Bases: nova.cells.manager.CellsManager

class FakeDBApi(cell_db_entries)

Bases: object

Cells uses a different DB in each cell. This means in order to stub out things differently per cell, I need to create a fake DBApi object that is instantiated by each fake cell.

cell_get_all(ctxt)
compute_node_get_all(ctxt)
instance_get_all_by_filters(ctxt, *args, **kwargs)
instance_get_by_uuid(ctxt, instance_uuid)
get_cell_state(cur_cell_name, tgt_cell_name)
get_cells_manager(cell_name)
get_message_runner(cell_name)
get_state_manager(cell_name)
init(test_case)
stub_bcast_method(test_case, cell_name, method_name, method)
stub_bcast_methods(test_case, method_name, method)
stub_tgt_method(test_case, cell_name, method_name, method)

Previous topic

The nova.tests.baremetal.test_volume_driver Module

Next topic

The nova.tests.cells.test_cells_manager Module

This Page