Module Expr Str Import alias Import alias Import alias ImportFrom alias ImportFrom alias identifier ImportFrom alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore ListLoad TupleLoad Str Num Num Num Num TupleLoad Str Num Num Num Num TupleLoad Str Num Num Num Num TupleLoad Str Num Num Num Num Assign NameStore ListLoad TupleLoad Str Num Num Num Num TupleLoad Str Num Num Num Num TupleLoad Str Num Num Num Num TupleLoad Str Num Num Num Num Assign NameStore ListLoad TupleLoad Str Num TupleLoad Str Num TupleLoad Str Num TupleLoad Str Num Assign NameStore ListLoad TupleLoad Num Num Num TupleLoad Num Num Num TupleLoad Num Num Num TupleLoad Num Num Num FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list Return ListComp Call NameLoad NameLoad comprehension NameStore NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpSub NameLoad Call AttributeLoad NameLoad attr keyword NameLoad Return Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list Return ListComp Call NameLoad NameLoad comprehension NameStore NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Return ListComp Call NameLoad NameLoad comprehension NameStore NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Return ListComp Call NameLoad NameLoad comprehension NameStore NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return ListLoad decorator_list FunctionDef arguments args NameParam defaults body FunctionDef arguments args NameParam NameParam NameParam defaults body Return Dict Str Str Str NameLoad NameLoad NameLoad decorator_list Return ListComp Call NameLoad NameLoad comprehension NameStore NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr ListLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr TupleLoad NameLoad Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad GeneratorExp SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Assign NameStore BinOpMult Num Call NameLoad GeneratorExp SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Expr Call AttributeLoad NameLoad attr Num SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Expr Call AttributeLoad NameLoad attr Num SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Assign NameStore BinOpFloorDiv NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Assign NameStore BinOpMult Num Num Assign NameStore Num Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad GeneratorExp SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Assign NameStore BinOpMult Num Call NameLoad GeneratorExp SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Expr Call AttributeLoad NameLoad attr Num SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Expr Call AttributeLoad NameLoad attr Num SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Expr Call AttributeLoad NameLoad attr Num SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Assign NameStore BinOpMult Num Num Expr Call AttributeLoad NameLoad attr Num SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad GeneratorExp SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Assign NameStore BinOpMult Num Call NameLoad GeneratorExp SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Expr Call AttributeLoad NameLoad attr Num SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Expr Call AttributeLoad NameLoad attr Num SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Assign NameStore Num Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Assign NameStore BinOpMult Num Num Assign NameStore Num Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword Str Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad GeneratorExp SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Assign NameStore BinOpMult Num Call NameLoad GeneratorExp SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Expr Call AttributeLoad NameLoad attr Num SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Expr Call AttributeLoad NameLoad attr Num SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Assign NameStore Num Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Assign NameStore BinOpMult Num Num Assign NameStore Num Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Call NameLoad NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad GeneratorExp SubscriptLoad NameLoad Index Num comprehension NameStore SubscriptLoad NameLoad Slice Num Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Assign NameStore Call NameLoad GeneratorExp SubscriptLoad NameLoad Index Num comprehension NameStore SubscriptLoad NameLoad Slice Num Assign NameStore BinOpMult Num NameLoad Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword Str Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam defaults body ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad Call AttributeLoad NameLoad attr ListLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list decorator_list Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Dict Str Num Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad NameLoad attr keyword Str Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Dict Str Str NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Dict Str Num NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr Dict Str Num NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr keyword Str decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad Str NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad FunctionDef arguments args NameParam defaults vararg kwarg body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad Num Num Num NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad keyword Num keyword Num keyword Num NameLoad Return Str decorator_list Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Num Num Num keyword Num keyword Num keyword Num Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr ListLoad TupleLoad Str NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad FunctionDef arguments args NameParam defaults vararg kwarg body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad Num Num Num NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad keyword Num keyword Num keyword Num NameLoad Return Str decorator_list Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Num Num Num keyword Num keyword Num keyword Num Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr ListLoad TupleLoad Str NameLoad AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A 
Tests For CellStateManager
 N/A datetime N/A time N/A mock oslo_config cfg oslo_db exception db_exc oslo_utils timeutils N/A six nova.cells state nova.db.sqlalchemy models nova exception nova objects nova test nova utils N/A FAKE_COMPUTES N/A N/A host1 1024 100 0 0 N/A host2 1024 100 -1 -1 N/A host3 1024 100 1024 100 N/A host4 1024 100 300 30 N/A FAKE_COMPUTES_N_TO_ONE N/A N/A host1 1024 100 0 0 N/A host1 1024 100 -1 -1 N/A host2 1024 100 1024 100 N/A host2 1024 100 300 30 N/A FAKE_SERVICES N/A N/A host1 0 N/A host2 0 N/A host3 0 N/A host4 3600 N/A FAKE_ITYPES N/A N/A 0 0 0 N/A 50 12 13 N/A 50 2 4 N/A 10 20 5 _create_fake_node N/A N/A host total_mem total_disk free_mem free_disk N/A N/A N/A N/A N/A objects ComputeNode host host memory_mb total_mem local_gb total_disk free_ram_mb free_mem free_disk_gb free_disk N/A _fake_service_get_all_by_binary N/A N/A cls context binary N/A N/A _node N/A N/A host total_mem total_disk free_mem free_disk N/A N/A N/A now N/A N/A timeutils utcnow N/A N/A N/A objects Service host host disabled False forced_down False last_seen_up now N/A N/A N/A N/A _node fake N/A fake FAKE_COMPUTES N/A classmethod _fake_service_get_all_by_binary_nodedown N/A N/A cls context binary N/A N/A _service N/A N/A host noupdate_sec N/A N/A N/A now N/A N/A timeutils utcnow N/A last_seen N/A now N/A N/A datetime timedelta seconds noupdate_sec N/A N/A N/A objects Service host host disabled False forced_down False last_seen_up last_seen binary binary N/A N/A N/A N/A _service fake N/A fake FAKE_SERVICES N/A classmethod _fake_compute_node_get_all N/A N/A cls context N/A N/A N/A N/A N/A _create_fake_node fake N/A fake FAKE_COMPUTES N/A classmethod _fake_compute_node_n_to_one_get_all N/A N/A cls context N/A N/A N/A N/A N/A _create_fake_node fake N/A fake FAKE_COMPUTES_N_TO_ONE N/A classmethod _fake_cell_get_all N/A N/A context N/A N/A N/A N/A N/A _fake_instance_type_all N/A N/A context N/A N/A _type N/A N/A mem root eph N/A N/A N/A N/A root_gb ephemeral_gb memory_mb root eph mem N/A N/A N/A N/A _type fake N/A fake FAKE_ITYPES N/A TestCellsStateManager N/A N/A test NoDBTestCase N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A super TestCellsStateManager self setUp N/A N/A N/A N/A self stubs Set N/A objects ComputeNodeList get_all _fake_compute_node_get_all N/A N/A N/A N/A self stubs Set N/A objects ServiceList get_by_binary _fake_service_get_all_by_binary N/A N/A N/A self stub_out nova.db.flavor_get_all _fake_instance_type_all N/A N/A N/A self stub_out nova.db.cell_get_all _fake_cell_get_all N/A test_cells_config_not_found N/A N/A self N/A N/A N/A N/A N/A self flags cells_config no_such_file_exists.conf group cells N/A e N/A N/A self assertRaises N/A cfg ConfigFilesNotFoundError N/A state CellStateManager N/A N/A N/A self assertEqual N/A no_such_file_exists.conf N/A e config_files N/A test_filemanager_returned N/A N/A self mock_read_cached_file mock_find_file N/A N/A N/A N/A mock_find_file return_value /etc/nova/cells.json N/A N/A mock_read_cached_file return_value N/A False N/A N/A six StringIO {} N/A N/A N/A self flags cells_config cells.json group cells N/A manager N/A N/A state CellStateManager N/A N/A N/A self assertIsInstance manager N/A state CellStateManagerFile N/A N/A N/A self assertRaises N/A exception CellsUpdateUnsupported N/A manager cell_create None None N/A N/A N/A self assertRaises N/A exception CellsUpdateUnsupported N/A manager cell_update None None None N/A N/A N/A self assertRaises N/A exception CellsUpdateUnsupported N/A manager cell_delete None None N/A N/A N/A N/A mock patch object N/A cfg ConfigOpts find_file N/A N/A N/A mock patch object utils read_cached_file test_dbmanager_returned N/A N/A self N/A N/A N/A N/A N/A self assertIsInstance N/A N/A state CellStateManager N/A state CellStateManagerDB N/A test_capacity_no_reserve N/A N/A self N/A N/A N/A cap N/A N/A self _capacity 0.0 N/A cell_free_ram N/A sum N/A N/A compute N/A 3 N/A compute FAKE_COMPUTES N/A N/A N/A self assertEqual cell_free_ram N/A N/A cap N/A ram_free N/A total_mb N/A cell_free_disk N/A 1024 N/A sum N/A N/A compute N/A 4 N/A compute FAKE_COMPUTES N/A N/A N/A self assertEqual cell_free_disk N/A N/A cap N/A disk_free N/A total_mb N/A N/A N/A self assertEqual 0 N/A N/A N/A cap N/A ram_free N/A units_by_mb N/A 0 N/A N/A N/A self assertEqual 0 N/A N/A N/A cap N/A disk_free N/A units_by_mb N/A 0 N/A units N/A cell_free_ram 50 N/A N/A N/A self assertEqual units N/A N/A N/A cap N/A ram_free N/A units_by_mb N/A 50 N/A sz N/A 25 1024 N/A units 5 N/A N/A N/A self assertEqual units N/A N/A N/A cap N/A disk_free N/A units_by_mb N/A N/A str sz N/A test_capacity_full_reserve N/A N/A self N/A N/A N/A cap N/A N/A self _capacity 100.0 N/A cell_free_ram N/A sum N/A N/A compute N/A 3 N/A compute FAKE_COMPUTES N/A N/A N/A self assertEqual cell_free_ram N/A N/A cap N/A ram_free N/A total_mb N/A cell_free_disk N/A 1024 N/A sum N/A N/A compute N/A 4 N/A compute FAKE_COMPUTES N/A N/A N/A self assertEqual cell_free_disk N/A N/A cap N/A disk_free N/A total_mb N/A N/A N/A self assertEqual 0 N/A N/A N/A cap N/A ram_free N/A units_by_mb N/A 0 N/A N/A N/A self assertEqual 0 N/A N/A N/A cap N/A disk_free N/A units_by_mb N/A 0 N/A N/A N/A self assertEqual 0 N/A N/A N/A cap N/A ram_free N/A units_by_mb N/A 50 N/A sz N/A 25 1024 N/A N/A N/A self assertEqual 0 N/A N/A N/A cap N/A disk_free N/A units_by_mb N/A N/A str sz N/A test_capacity_part_reserve N/A N/A self N/A N/A N/A cap N/A N/A self _capacity 50.0 N/A cell_free_ram N/A sum N/A N/A compute N/A 3 N/A compute FAKE_COMPUTES N/A N/A N/A self assertEqual cell_free_ram N/A N/A cap N/A ram_free N/A total_mb N/A cell_free_disk N/A 1024 N/A sum N/A N/A compute N/A 4 N/A compute FAKE_COMPUTES N/A N/A N/A self assertEqual cell_free_disk N/A N/A cap N/A disk_free N/A total_mb N/A N/A N/A self assertEqual 0 N/A N/A N/A cap N/A ram_free N/A units_by_mb N/A 0 N/A N/A N/A self assertEqual 0 N/A N/A N/A cap N/A disk_free N/A units_by_mb N/A 0 N/A units 10 N/A N/A N/A self assertEqual units N/A N/A N/A cap N/A ram_free N/A units_by_mb N/A 50 N/A sz N/A 25 1024 N/A units 2 N/A N/A N/A self assertEqual units N/A N/A N/A cap N/A disk_free N/A units_by_mb N/A N/A str sz N/A _get_state_manager N/A N/A self reserve_percent N/A 0.0 N/A N/A N/A N/A self flags reserve_percent reserve_percent group cells N/A N/A N/A state CellStateManager N/A _capacity N/A N/A self reserve_percent N/A N/A N/A state_manager N/A N/A self _get_state_manager reserve_percent N/A my_state N/A N/A state_manager get_my_state N/A N/A my_state capacities N/A N/A TestCellsStateManagerNToOne N/A TestCellsStateManager N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A super TestCellsStateManagerNToOne self setUp N/A N/A N/A N/A self stubs Set N/A objects ComputeNodeList get_all _fake_compute_node_n_to_one_get_all N/A test_capacity_part_reserve N/A N/A self N/A N/A N/A cap N/A N/A self _capacity 50.0 N/A cell_free_ram N/A sum N/A N/A compute N/A 3 N/A compute FAKE_COMPUTES_N_TO_ONE N/A N/A N/A self assertEqual cell_free_ram N/A N/A cap N/A ram_free N/A total_mb N/A cell_free_disk N/A 1024 N/A sum N/A N/A compute N/A 4 N/A compute FAKE_COMPUTES_N_TO_ONE N/A N/A N/A self assertEqual cell_free_disk N/A N/A cap N/A disk_free N/A total_mb N/A N/A N/A self assertEqual 0 N/A N/A N/A cap N/A ram_free N/A units_by_mb N/A 0 N/A N/A N/A self assertEqual 0 N/A N/A N/A cap N/A disk_free N/A units_by_mb N/A 0 N/A units 6 N/A N/A N/A self assertEqual units N/A N/A N/A cap N/A ram_free N/A units_by_mb N/A 50 N/A sz N/A 25 1024 N/A units 1 N/A N/A N/A self assertEqual units N/A N/A N/A cap N/A disk_free N/A units_by_mb N/A N/A str sz N/A N/A TestCellsStateManagerNodeDown N/A N/A test NoDBTestCase N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A super TestCellsStateManagerNodeDown self setUp N/A N/A N/A self stub_out nova.objects.ComputeNodeList.get_all _fake_compute_node_get_all N/A N/A N/A self stub_out nova.objects.ServiceList.get_by_binary _fake_service_get_all_by_binary_nodedown N/A N/A N/A self stub_out nova.db.flavor_get_all _fake_instance_type_all N/A N/A N/A self stub_out nova.db.cell_get_all _fake_cell_get_all N/A test_capacity_no_reserve_nodedown N/A N/A self N/A N/A N/A cap N/A N/A self _capacity 0.0 N/A cell_free_ram N/A sum N/A N/A compute N/A 3 N/A compute N/A FAKE_COMPUTES N/A -1 N/A N/A N/A self assertEqual cell_free_ram N/A N/A cap N/A ram_free N/A total_mb N/A free_disk N/A sum N/A N/A compute N/A 4 N/A compute N/A FAKE_COMPUTES N/A -1 N/A cell_free_disk N/A 1024 free_disk N/A N/A N/A self assertEqual cell_free_disk N/A N/A cap N/A disk_free N/A total_mb N/A _get_state_manager N/A N/A self reserve_percent N/A 0.0 N/A N/A N/A N/A self flags reserve_percent reserve_percent group cells N/A N/A N/A state CellStateManager N/A _capacity N/A N/A self reserve_percent N/A N/A N/A state_manager N/A N/A self _get_state_manager reserve_percent N/A my_state N/A N/A state_manager get_my_state N/A N/A my_state capacities N/A N/A TestCellStateManagerException N/A N/A test NoDBTestCase N/A test_init_db_error N/A N/A self mock_sleep N/A N/A TestCellStateManagerDB N/A N/A state CellStateManagerDB N/A __init__ N/A N/A self N/A N/A N/A N/A self _cell_data_sync N/A N/A mock Mock N/A N/A N/A self _cell_data_sync side_effect N/A N/A N/A db_exc DBError N/A N/A N/A N/A N/A super TestCellStateManagerDB self __init__ N/A N/A N/A test N/A TestCellStateManagerDB N/A N/A N/A mock_sleep assert_called_once_with 30 N/A N/A N/A self assertEqual 2 N/A N/A test _cell_data_sync call_count N/A N/A N/A N/A mock patch object time sleep N/A TestCellsGetCapacity N/A TestCellsStateManager N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A super TestCellsGetCapacity self setUp N/A N/A self capacities N/A ram_free 1234 N/A N/A self state_manager N/A N/A self _get_state_manager N/A cell N/A N/A models Cell name cell_name N/A other_cell N/A N/A models Cell name other_cell_name N/A N/A cell capacities N/A self capacities N/A N/A other_cell capacities N/A self capacities N/A N/A N/A N/A self stubs Set N/A self state_manager child_cells N/A cell_name other_cell_name cell other_cell N/A test_get_cell_capacity_for_all_cells N/A N/A self N/A N/A N/A N/A N/A N/A self stubs Set N/A N/A self state_manager my_cell_state capacities N/A self capacities N/A capacities N/A N/A N/A self state_manager get_capacities N/A N/A N/A self assertEqual N/A ram_free 3702 capacities N/A test_get_cell_capacity_for_the_parent_cell N/A N/A self N/A N/A N/A N/A N/A N/A self stubs Set N/A N/A self state_manager my_cell_state capacities N/A self capacities N/A capacities N/A N/A N/A self state_manager get_capacities N/A N/A N/A self state_manager my_cell_state name N/A N/A N/A self assertEqual N/A ram_free 3702 capacities N/A test_get_cell_capacity_for_a_cell N/A N/A self N/A N/A N/A N/A N/A self assertEqual N/A self capacities N/A N/A N/A self state_manager get_capacities cell_name cell_name N/A test_get_cell_capacity_for_non_existing_cell N/A N/A self N/A N/A N/A N/A N/A self assertRaises N/A exception CellNotFound N/A N/A self state_manager get_capacities cell_name invalid_cell_name N/A N/A FakeCellStateManager N/A object N/A __init__ N/A N/A self N/A N/A N/A N/A self called N/A N/A _cell_data_sync N/A N/A self force N/A False N/A N/A N/A N/A N/A self called append N/A _cell_data_sync force N/A N/A TestSyncDecorators N/A N/A test NoDBTestCase N/A test_sync_before N/A N/A self N/A N/A N/A manager N/A FakeCellStateManager test N/A N/A inst N/A args kwargs N/A N/A N/A N/A self assertEqual manager inst N/A N/A N/A self assertEqual N/A 1 2 3 args N/A N/A N/A self assertEqual N/A dict a 4 b 5 c 6 kwargs N/A result N/A N/A wrapper N/A N/A state sync_before test N/A result N/A wrapper manager 1 2 3 a 4 b 5 c 6 N/A N/A N/A self assertEqual result result N/A N/A N/A self assertEqual N/A N/A _cell_data_sync False N/A manager called N/A test_sync_after N/A N/A self N/A N/A N/A manager N/A FakeCellStateManager test N/A N/A inst N/A args kwargs N/A N/A N/A N/A self assertEqual manager inst N/A N/A N/A self assertEqual N/A 1 2 3 args N/A N/A N/A self assertEqual N/A dict a 4 b 5 c 6 kwargs N/A result N/A N/A wrapper N/A N/A state sync_after test N/A result N/A wrapper manager 1 2 3 a 4 b 5 c 6 N/A N/A N/A self assertEqual result result N/A N/A N/A self assertEqual N/A N/A _cell_data_sync True N/A manager called N/A N/A