This Page

Psst... hey. You're reading the latest content, but it might be out of sync with code. You can read Nova 2011.2 docs or all OpenStack docs too.

The nova.tests.scheduler.test_abstract_scheduler Module

Tests For Abstract Scheduler.

class nova.tests.scheduler.test_abstract_scheduler.AbstractSchedulerTestCase(methodName='runTest')

Bases: nova.test.TestCase

Test case for Abstract Scheduler.

test_abstract_scheduler()

Create a nested set of FakeZones, try to build multiple instances and ensure that a select call returns the appropriate build plan.

test_adjust_child_weights()

Make sure the weights returned by child zones are properly adjusted based on the scale/offset in the zone db entries.

test_decrypt_blob()

Test that the decrypt method works.

test_empty_abstract_scheduler()

Ensure empty hosts & child_zones result in NoValidHosts exception.

test_empty_local_hosts()

Create a nested set of FakeZones, try to build multiple instances and ensure that a select call returns the appropriate build plan.

test_provision_resource_from_blob_empty()

Provision a resource locally or remotely given no hints.

test_provision_resource_from_blob_with_child_blob()

Provision a resource locally or remotely when child blob hint passed in.

test_provision_resource_from_blob_with_immediate_child_blob()

Provision a resource locally or remotely when blob hint passed in from an immediate child.

test_provision_resource_from_blob_with_local_blob()

Provision a resource locally or remotely when blob hint passed in.

test_provision_resource_local()

Provision a resource locally or remotely.

test_provision_resource_remote()

Provision a resource locally or remotely.

test_schedule_do_not_schedule_with_hint()

Check the local/child zone routing in the run_instance() call. If the zone_blob hint was passed in, don’t re-schedule.

class nova.tests.scheduler.test_abstract_scheduler.BaseSchedulerTestCase(methodName='runTest')

Bases: nova.test.TestCase

Test case for Base Scheduler.

test_weigh_hosts()

Try to weigh a short list of hosts and make sure enough entries for a larger number instances are returned.

class nova.tests.scheduler.test_abstract_scheduler.FakeAbstractScheduler

Bases: nova.scheduler.abstract_scheduler.AbstractScheduler

class nova.tests.scheduler.test_abstract_scheduler.FakeBaseScheduler

Bases: nova.scheduler.base_scheduler.BaseScheduler

class nova.tests.scheduler.test_abstract_scheduler.FakeEmptyZoneManager

Bases: nova.scheduler.zone_manager.ZoneManager

class nova.tests.scheduler.test_abstract_scheduler.FakeZoneManager

Bases: nova.scheduler.zone_manager.ZoneManager

nova.tests.scheduler.test_abstract_scheduler.fake_ask_child_zone_to_create_instance(context, zone_info, request_spec, kwargs)
nova.tests.scheduler.test_abstract_scheduler.fake_call_zone_method(context, method, specs, zones)
nova.tests.scheduler.test_abstract_scheduler.fake_decrypt_blob_returns_child_info(blob)
nova.tests.scheduler.test_abstract_scheduler.fake_decrypt_blob_returns_local_info(blob)
nova.tests.scheduler.test_abstract_scheduler.fake_empty_call_zone_method(context, method, specs, zones)
nova.tests.scheduler.test_abstract_scheduler.fake_provision_resource(context, item, instance_id, request_spec, kwargs)
nova.tests.scheduler.test_abstract_scheduler.fake_provision_resource_from_blob(context, item, instance_id, request_spec, kwargs)
nova.tests.scheduler.test_abstract_scheduler.fake_provision_resource_locally(context, build_plan, request_spec, kwargs)
nova.tests.scheduler.test_abstract_scheduler.fake_zone_get_all(context)
nova.tests.scheduler.test_abstract_scheduler.fake_zone_manager_service_states(num_hosts)