This Page

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

The nova.tests.test_scheduler Module

Tests For Scheduler

class nova.tests.test_scheduler.DynamicNovaClientTest(methodName='runTest')

Bases: nova.test.TestCase

test_issue_novaclient_command_found()
test_issue_novaclient_command_not_found()
class nova.tests.test_scheduler.FakeEmptyServerCollection

Bases: object

find(name)
get(f)
class nova.tests.test_scheduler.FakeNovaClient(collection)

Bases: object

class nova.tests.test_scheduler.FakeRerouteCompute(method_name)

Bases: nova.scheduler.api.reroute_compute

get_collection_context_and_id(args, kwargs)
unmarshall_result(zone_responses)
class nova.tests.test_scheduler.FakeResource(attribute_dict)

Bases: object

pause()
class nova.tests.test_scheduler.FakeServerCollection

Bases: object

find(name)
get(instance_id)
class nova.tests.test_scheduler.FakeZone(api_url, username, password)

Bases: object

class nova.tests.test_scheduler.SchedulerTestCase(methodName='runTest')

Bases: nova.test.TestCase

Test case for scheduler

setUp()
test_fallback()
test_named_method()
test_show_host_resources_host_not_exit()

A host given as an argument does not exists.

test_show_host_resources_no_project()

No instance are running on the given host.

test_show_host_resources_works_correctly()

Show_host_resources() works correctly as expected.

class nova.tests.test_scheduler.SimpleDriverTestCase(methodName='runTest')

Bases: nova.test.TestCase

Test case for simple driver

setUp()
tearDown()
test_doesnt_report_disabled_hosts_as_up()

Ensures driver doesn’t find hosts before they are enabled

test_least_busy_host_gets_instance()

Ensures the host with less cores gets the next one

test_least_busy_host_gets_volume()

Ensures the host with less gigabytes gets the next one

test_live_migration_common_check_checking_cpuinfo_fail()

Raise excetion when original host doen’t have compatible cpu.

test_live_migration_common_check_service_different_hypervisor()

Original host and dest host has different hypervisor type.

test_live_migration_common_check_service_different_version()

Original host and dest host has different hypervisor version.

test_live_migration_common_check_service_orig_not_exists()

Destination host does not exist.

test_live_migration_dest_check_not_alive()

Confirms exception raises in case dest host does not exist.

test_live_migration_dest_check_service_lack_memory()

Confirms exception raises when dest doesn’t have enough memory.

test_live_migration_dest_check_service_same_host()

Confirms exceptioin raises in case dest and src is same host.

test_live_migration_dest_check_service_works_correctly()

Confirms method finishes with no error.

test_live_migration_src_check_compute_node_not_alive()

Confirms src-compute node is alive.

test_live_migration_src_check_instance_not_running()

The instance given by instance_id is not running.

test_live_migration_src_check_volume_node_not_alive()

Raise exception when volume node is not alive.

test_live_migration_src_check_works_correctly()

Confirms this method finishes with no error.

test_reports_enabled_hosts_as_up()

Ensures driver can find the hosts that are up

test_scheduler_live_migration_with_volume()

scheduler_live_migration() works correctly as expected.

Also, checks instance state is changed from ‘running’ -> ‘migrating’.

test_specific_host_gets_instance()

Ensures if you set availability_zone it launches on that zone

test_too_many_cores()

Ensures we don’t go over max cores

test_too_many_gigabytes()

Ensures we don’t go over max gigabytes

test_will_schedule_on_disabled_host_if_specified()
test_wont_sechedule_if_specified_host_is_down()
class nova.tests.test_scheduler.TestDriver

Bases: nova.scheduler.driver.Scheduler

Scheduler Driver for Tests

schedule(context, topic, *args, **kwargs)
schedule_named_method(context, topic, num)
class nova.tests.test_scheduler.ZoneRedirectTest(methodName='runTest')

Bases: nova.test.TestCase

setUp()
tearDown()
test_get_collection_context_and_id()
test_routing_flags()
test_trap_found_locally()
test_trap_not_found_locally()
test_unmarshal_single_server()
class nova.tests.test_scheduler.ZoneSchedulerTestCase(methodName='runTest')

Bases: nova.test.TestCase

Test case for zone scheduler

setUp()
test_with_two_zones()
nova.tests.test_scheduler.found_instance(self, context, instance)
nova.tests.test_scheduler.go_boom(self, context, instance)
nova.tests.test_scheduler.zone_get_all(context)