The nova.tests.api.openstack.compute.contrib.test_hosts Module

class FakeRequest

Bases: object

GET = {}
environ = {'nova.context': <nova.context.RequestContext object at 0x13c32f90>}
class FakeRequestWithNovaZone

Bases: object

GET = {'zone': 'nova'}
environ = {'nova.context': <nova.context.RequestContext object at 0x10f13610>}
class HostSerializerTest(*args, **kwargs)

Bases: nova.test.TestCase

setUp()
test_action_serializer()
test_corrupt_xml()
test_index_serializer()
test_update_deserializer()
test_update_serializer_with_maintainance_mode()
test_update_serializer_with_maintainance_mode_and_status()
test_update_serializer_with_status()
class HostTestCase(*args, **kwargs)

Bases: nova.test.TestCase

Test Case for hosts.

setUp()
test_bad_status_value()
test_bad_update_key()
test_bad_update_key_and_correct_update_key()
test_disable_host()
test_disable_host_notimpl()
test_disable_maintenance()
test_enable_host()
test_enable_maintenance()
test_enable_maintenance_notimpl()
test_good_update_keys()
test_host_maintenance_bad_host()
test_host_power_action_bad_host()
test_host_reboot()
test_host_reboot_notimpl()
test_host_shutdown()
test_host_shutdown_notimpl()
test_host_startup()
test_host_startup_notimpl()
test_host_status_bad_host()
test_list_hosts()

Verify that the compute hosts are returned.

test_list_hosts_with_zone()
test_show_forbidden()
test_show_host_not_exist()
test_show_no_project()

No instances are running on the given host.

test_show_works_correctly()

show() works correctly as expected.

stub_host_power_action(context, host_name, action)
stub_service_get_all(context, disabled=None)
stub_service_get_by_host_and_topic(context, host_name, topic)
stub_set_host_enabled(context, host_name, enabled)

Simulates three possible behaviours for VM drivers or compute drivers when enabling or disabling a host.

‘enabled’ means new instances can go to this host ‘disabled’ means they can’t

stub_set_host_maintenance(context, host_name, mode)

Previous topic

The nova.tests.api.openstack.compute.contrib.test_hide_server_addresses Module

Next topic

The nova.tests.api.openstack.compute.contrib.test_hypervisors Module

This Page