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.api.openstack.test_servers Module

class nova.tests.api.openstack.test_servers.ServersTest(methodName='runTest')

Bases: nova.test.TestCase

setUp()
tearDown()
test_confirm_resize_server()
test_confirm_resize_server_fails()
test_create_backup_schedules()
test_create_instance()
test_create_instance_no_key_pair()
test_create_instance_no_name()
test_create_instance_nonstring_name()
test_create_instance_v11()
test_create_instance_v11_bad_href()
test_create_instance_whitespace_name()
test_delete_backup_schedules()
test_delete_server_instance()
test_get_all_server_details_v1_0()
test_get_all_server_details_v1_1()
test_get_all_server_details_with_host()

We want to make sure that if two instances are on the same host, then they return the same hostId. If two instances are on different hosts, they should return different hostId’s. In this test, there are 5 instances - 2 on one host and 3 on another.

test_get_all_server_details_xml_v1_0()
test_get_server_addresses_V10()
test_get_server_addresses_private_V10()
test_get_server_addresses_private_xml_V10()
test_get_server_addresses_public_V10()
test_get_server_addresses_public_xml_V10()
test_get_server_addresses_xml_V10()
test_get_server_backup_schedule()
test_get_server_backup_schedules()
test_get_server_by_id()
test_get_server_by_id_v11()
test_get_server_by_id_with_addresses()
test_get_server_by_id_with_addresses_v11()
test_get_server_by_id_with_addresses_xml()
test_get_server_list()
test_get_server_list_v11()
test_get_servers_with_bad_limit()
test_get_servers_with_bad_marker()
test_get_servers_with_bad_offset()
test_get_servers_with_limit()
test_get_servers_with_limit_and_marker()
test_get_servers_with_limit_and_offset()
test_get_servers_with_marker()
test_get_servers_with_offset()
test_resize_bad_flavor_fails()
test_resize_raises_fails()
test_resize_server()
test_resized_server_has_correct_status()
test_revert_resize_server()
test_revert_resize_server_fails()
test_server_actions()
test_server_backup_schedule_deprecated_v11()
test_server_change_password()
test_server_change_password_bad_request_v1_1()
test_server_change_password_empty_string_v1_1()
test_server_change_password_none_v1_1()
test_server_change_password_not_a_string_v1_1()
test_server_change_password_v1_1()
test_server_diagnostics()
test_server_inject_network_info()
test_server_pause()
test_server_reboot()
test_server_rebuild()
test_server_reset_network()
test_server_resume()
test_server_suspend()
test_server_unpause()
test_update_no_body()
test_update_nonstring_name()

Confirm that update is filtering params

test_update_null_name()

Confirm that update is filtering params

test_update_server_adminPass_ignored_v11()
test_update_server_v10()
test_update_whitespace_name()

Confirm that update is filtering params

class nova.tests.api.openstack.test_servers.TestGetKernelRamdiskFromImage(methodName='runTest')

Bases: nova.test.TestCase

If we’re building from an AMI-style image, we need to be able to fetch the kernel and ramdisk associated with the machine image. This information is stored with the image metadata and return via the ImageService.

These tests ensure that we parse the metadata return the ImageService correctly and that we handle failure modes appropriately.

test_ami_kernel_ramdisk_present()

Return IDs if both kernel and ramdisk are present

test_ami_no_kernel()

If an ami is missing a kernel it should raise NotFound

test_ami_no_ramdisk()

If an ami is missing a ramdisk it should raise NotFound

test_not_ami()

Anything other than ami should return no kernel and no ramdisk

test_status_not_active()

We should only allow fetching of kernel and ramdisk information if we have a ‘fully-formed’ image, aka ‘active’

class nova.tests.api.openstack.test_servers.TestServerCreateRequestXMLDeserializer(methodName='runTest')

Bases: unittest.case.TestCase

setUp()
test_canonical_request_from_docs()
test_minimal_request()
test_request_second_personality_node_ignored()
test_request_with_empty_metadata()
test_request_with_empty_metadata_and_personality()
test_request_with_empty_metadata_and_personality_reversed()
test_request_with_empty_personality()
test_request_with_metadata_duplicate_key()
test_request_with_metadata_missing_key()
test_request_with_metadata_missing_value()
test_request_with_one_metadata()
test_request_with_one_personality()
test_request_with_one_personality_empty_contents()
test_request_with_one_personality_empty_contents_variation()
test_request_with_one_personality_missing_path()
test_request_with_two_metadata()
test_request_with_two_metadata_missing_key()
test_request_with_two_metadata_missing_value()
test_request_with_two_personalities()
class nova.tests.api.openstack.test_servers.TestServerInstanceCreation(methodName='runTest')

Bases: nova.test.TestCase

setUp()
tearDown()
test_create_instance_admin_pass_json()
test_create_instance_admin_pass_xml()
test_create_instance_personality_empty_content()
test_create_instance_with_no_personality()
test_create_instance_with_no_personality_xml()
test_create_instance_with_null_personality()
test_create_instance_with_personality()
test_create_instance_with_personality_no_contents()
test_create_instance_with_personality_no_path()
test_create_instance_with_personality_not_a_list()
test_create_instance_with_personality_with_non_b64_content()
test_create_instance_with_personality_xml()
test_create_instance_with_three_personalities()
nova.tests.api.openstack.test_servers.fake_compute_api(cls, req, id)
nova.tests.api.openstack.test_servers.instance_address(context, instance_id)
nova.tests.api.openstack.test_servers.instance_update(context, instance_id, kwargs)
nova.tests.api.openstack.test_servers.return_security_group(context, instance_id, security_group_id)
nova.tests.api.openstack.test_servers.return_server(context, id)
nova.tests.api.openstack.test_servers.return_server_with_addresses(private, public)
nova.tests.api.openstack.test_servers.return_servers(context, user_id=1)
nova.tests.api.openstack.test_servers.stub_instance(id, user_id=1, private_address=None, public_addresses=None, host=None)