Module Expr Str Import alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore BinOpMult Num Num ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore ListLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad Call NameLoad Num BinOpMult Num NameLoad Num Call NameLoad Num BinOpMult Num NameLoad Num Call NameLoad Num BinOpMult Num NameLoad Num Assign NameStore ListLoad TupleLoad Num Lambda arguments args NameParam defaults AttributeLoad NameLoad attr TupleLoad Num Lambda arguments args NameParam defaults AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Assign NameStore ListLoad Num Num Num Expr Call AttributeLoad NameLoad attr 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 ClassDef bases body Pass decorator_list Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Num Assign NameStore Dict Assign NameStore ListLoad Assign NameStore ListLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr keyword ListLoad Str keyword Num Assign NameStore Num Assign NameStore Dict Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore ListComp Call NameLoad keyword Num keyword NameLoad comprehension TupleStore NameStore NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr keyword ListLoad Str keyword Num Assign NameStore Num Assign NameStore Dict Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore ListComp Call NameLoad keyword Num keyword NameLoad comprehension TupleStore NameStore NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr keyword ListLoad Str keyword Num Assign NameStore Num Assign NameStore Dict Str Num Assign NameStore Dict Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr Assign NameStore ListComp TupleLoad NameLoad SubscriptLoad NameLoad Index Str comprehension TupleStore NameStore NameStore NameLoad CompareIn Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad NameLoad Assign NameStore ListLoad For TupleStore NameStore TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Assign NameStore BinOpAdd Num BinOpMult Num NameLoad Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad decorator_list decorator_list
N/A N/A 
Tests For Least Cost Scheduler
 N/A copy nova test nova.scheduler least_cost nova.tests.scheduler test_abstract_scheduler N/A MB N/A 1024 1024 FakeHost N/A object N/A __init__ N/A N/A self host_id free_ram io N/A N/A N/A N/A self id host_id N/A N/A self free_ram free_ram N/A N/A self io io N/A N/A WeightedSumTestCase N/A N/A test TestCase N/A test_empty_domain N/A N/A self N/A N/A N/A domain N/A N/A weighted_fns N/A N/A result N/A N/A least_cost weighted_sum domain weighted_fns N/A expected N/A N/A N/A N/A self assertEqual expected result N/A test_basic_costing N/A N/A self N/A N/A N/A hosts N/A N/A FakeHost 1 N/A 512 MB 100 N/A FakeHost 2 N/A 256 MB 400 N/A FakeHost 3 N/A 512 MB 100 N/A weighted_fns N/A N/A 1 N/A N/A N/A h N/A N/A h free_ram N/A 2 N/A N/A N/A h N/A N/A h io N/A costs N/A N/A least_cost weighted_sum domain hosts weighted_fns weighted_fns N/A expected N/A 1.5 2.5 1.5 N/A N/A N/A self assertEqual expected costs N/A N/A LeastCostSchedulerTestCase N/A N/A test TestCase N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A super LeastCostSchedulerTestCase self setUp FakeZoneManager N/A N/A N/A N/A N/A zone_manager N/A FakeZoneManager N/A states N/A N/A test_abstract_scheduler fake_zone_manager_service_states num_hosts 10 N/A N/A zone_manager service_states states N/A N/A self sched N/A N/A least_cost LeastCostScheduler N/A N/A N/A self sched zone_manager zone_manager N/A tearDown N/A N/A self N/A N/A N/A N/A N/A N/A super LeastCostSchedulerTestCase self tearDown N/A assertWeights N/A N/A self expected num request_spec hosts N/A N/A N/A weighted N/A N/A N/A self sched weigh_hosts compute request_spec hosts N/A N/A N/A self assertDictListMatch weighted expected approx_equal True N/A test_no_hosts N/A N/A self N/A N/A N/A num 1 N/A request_spec N/A N/A hosts N/A N/A expected N/A N/A N/A N/A self assertWeights expected num request_spec hosts N/A test_noop_cost_fn N/A N/A self N/A N/A N/A N/A N/A self flags least_cost_scheduler_cost_functions N/A nova.scheduler.least_cost.noop_cost_fn noop_cost_fn_weight 1 N/A num 1 N/A request_spec N/A N/A hosts N/A N/A N/A self sched filter_hosts num request_spec N/A expected N/A N/A dict weight 1 hostname hostname N/A N/A hostname caps hosts N/A N/A N/A self assertWeights expected num request_spec hosts N/A test_cost_fn_weights N/A N/A self N/A N/A N/A N/A N/A self flags least_cost_scheduler_cost_functions N/A nova.scheduler.least_cost.noop_cost_fn noop_cost_fn_weight 2 N/A num 1 N/A request_spec N/A N/A hosts N/A N/A N/A self sched filter_hosts num request_spec N/A expected N/A N/A dict weight 2 hostname hostname N/A N/A hostname caps hosts N/A N/A N/A self assertWeights expected num request_spec hosts N/A test_compute_fill_first_cost_fn N/A N/A self N/A N/A N/A N/A N/A self flags least_cost_scheduler_cost_functions N/A nova.scheduler.least_cost.compute_fill_first_cost_fn compute_fill_first_cost_fn_weight 1 N/A num 1 N/A instance_type N/A memory_mb 1024 N/A request_spec N/A instance_type instance_type N/A svc_states N/A N/A N/A N/A N/A self sched zone_manager service_states iteritems N/A all_hosts N/A N/A host N/A services N/A compute N/A N/A host services svc_states N/A compute services N/A hosts N/A N/A N/A self sched filter_hosts compute request_spec all_hosts N/A expected N/A N/A N/A idx N/A hostname services N/A enumerate hosts N/A N/A caps N/A N/A copy deepcopy N/A services N/A compute N/A weight N/A 0.1 N/A 0.1 idx N/A wtd_dict N/A dict hostname hostname weight weight capabilities caps N/A N/A N/A expected append wtd_dict N/A N/A N/A self assertWeights expected num request_spec hosts N/A N/A