¡@

Home 

OpenStack Study: nova

OpenStack Index

Previous

Next

def conditional_forbid(req):

class LockoutTestCase(test.NoDBTestCase):

    def setUp(self):

    def tearDown(self):

    def _send_bad_attempts(self, access_key, num_attempts=1):

    def _is_locked_out(self, access_key):

    def test_lockout(self):

    def test_timeout(self):

    def test_multiple_keys(self):

    def test_window_timeout(self):

class ExecutorTestCase(test.NoDBTestCase):

    def setUp(self):

    def _execute(self, invoke):

    def _extract_message(self, result):

    def test_instance_not_found(self):

        def not_found(context):

    def test_instance_not_found_none(self):

        def not_found(context):

    def test_snapshot_not_found(self):

        def not_found(context):

    def test_volume_not_found(self):

        def not_found(context):

class FakeResponse(object):

    def __init__(self, status=400):

    def read(self):

class KeystoneAuthTestCase(test.NoDBTestCase):

    def setUp(self):

    def _validate_ec2_error(self, response, http_status, ec2_code):

    def test_no_signature(self):

    def test_no_key_id(self):

    def test_communication_failure(self):

    def test_no_result_data(self):

\OpenStack\nova-2014.1\nova\tests\api\ec2\__init__.py

\OpenStack\nova-2014.1\nova\tests\api\openstack\common.py

def webob_factory(url):

def compare_links(actual, expected):

def compare_media_types(actual, expected):

def compare_tree_to_dict(actual, expected, keys):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_admin_actions.py

class CommonMixin(object):

    def setUp(self):

        def _fake_controller(*args, **kwargs):

    def _make_request(self, url, body):

    def _stub_instance_get(self, uuid=None):

    def _stub_instance_get_failure(self, exc_info, uuid=None):

    def _test_non_existing_instance(self, action, body_map=None):

    def _test_action(self, action, body=None, method=None):

    def _test_invalid_state(self, action, method=None, body_map=None, compute_api_args_map=None):

    def _test_not_implemented_state(self, action, method=None, error_text=None):

    def _test_locked_instance(self, action, method=None):

class AdminActionsTest(CommonMixin, test.NoDBTestCase):

    def test_actions(self):

    def test_actions_raise_conflict_on_invalid_state(self):

    def test_actions_raise_on_not_implemented(self):

    def test_actions_with_non_existed_instance(self):

    def test_actions_with_locked_instance(self):

    def _test_migrate_exception(self, exc_info, expected_result):

    def _test_migrate_live_succeeded(self, param):

    def test_migrate_live_enabled(self):

    def test_migrate_live_enabled_with_string_param(self):

    def test_migrate_live_missing_dict_param(self):

    def test_migrate_live_with_invalid_block_migration(self):

    def test_migrate_live_with_invalid_disk_over_commit(self):

    def _test_migrate_live_failed_with_exception(self, fake_exc, uuid=None):

    def test_migrate_live_compute_service_unavailable(self):

    def test_migrate_live_invalid_hypervisor_type(self):

    def test_migrate_live_unable_to_migrate_to_self(self):

    def test_migrate_live_destination_hypervisor_too_old(self):

    def test_migrate_live_no_valid_host(self):

    def test_migrate_live_invalid_local_storage(self):

    def test_migrate_live_invalid_shared_storage(self):

    def test_migrate_live_migration_pre_check_error(self):

    def test_unlock_not_authorized(self):

class CreateBackupTests(CommonMixin, test.NoDBTestCase):

    def setUp(self):

    def _make_url(self, uuid):

    def test_create_backup_with_metadata(self):

    def test_create_backup_no_name(self):

    def test_create_backup_no_rotation(self):

    def test_create_backup_negative_rotation(self):

    def test_create_backup_no_backup_type(self):

    def test_create_backup_bad_entity(self):

    def test_create_backup_rotation_is_zero(self):

    def test_create_backup_rotation_is_positive(self):

    def test_create_backup_raises_conflict_on_invalid_state(self):

    def test_create_backup_with_non_existed_instance(self):

    def test_create_backup_with_invalid_createBackup(self):

class ResetStateTests(test.NoDBTestCase):

    def setUp(self):

    def test_no_state(self):

    def test_bad_state(self):

    def test_no_instance(self):

    def _setup_mock(self, expected):

        def check_state(admin_state_reset=True):

    def test_reset_active(self):

    def test_reset_error(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_agents.py

def fake_agent_build_get_all(context, hypervisor):

def fake_agent_build_update(context, agent_build_id, values):

def fake_agent_build_destroy(context, agent_update_id):

def fake_agent_build_create(context, values):

class FakeRequest(object):

class FakeRequestWithHypervisor(object):

class AgentsTest(test.NoDBTestCase):

    def setUp(self):

    def test_agents_create(self):

    def _test_agents_create_with_invalid_length(self, key):

    def test_agents_create_with_invalid_length_hypervisor(self):

    def test_agents_create_with_invalid_length_os(self):

    def test_agents_create_with_invalid_length_architecture(self):

    def test_agents_create_with_invalid_length_version(self):

    def test_agents_create_with_invalid_length_url(self):

    def test_agents_create_with_invalid_length_md5hash(self):

    def test_agents_delete(self):

    def test_agents_list(self):

    def test_agents_list_with_hypervisor(self):

    def test_agents_update(self):

    def _test_agents_update_with_invalid_length(self, key):

    def test_agents_update_with_invalid_length_version(self):

    def test_agents_update_with_invalid_length_url(self):

    def test_agents_update_with_invalid_length_md5hash(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_aggregates.py

class FakeRequest(object):

class AggregateTestCase(test.NoDBTestCase):

    def setUp(self):

    def test_index(self):

        def stub_list_aggregates(context):

    def test_index_no_admin(self):

    def test_create(self):

        def stub_create_aggregate(context, name, availability_zone):

    def test_create_no_admin(self):

    def test_create_with_duplicate_aggregate_name(self):

        def stub_create_aggregate(context, name, availability_zone):

    def test_create_with_incorrect_availability_zone(self):

        def stub_create_aggregate(context, name, availability_zone):

    def test_create_with_no_aggregate(self):

    def test_create_with_no_name(self):

    def test_create_with_no_availability_zone(self):

        def stub_create_aggregate(context, name, availability_zone):

    def test_create_with_null_name(self):

    def test_create_with_name_too_long(self):

    def test_create_with_extra_invalid_arg(self):

    def test_show(self):

        def stub_get_aggregate(context, id):

    def test_show_no_admin(self):

    def test_show_with_invalid_id(self):

        def stub_get_aggregate(context, id):

    def test_update(self):

        def stub_update_aggregate(context, aggregate, values):

    def test_update_no_admin(self):

    def test_update_with_only_name(self):

        def stub_update_aggregate(context, aggregate, values):

    def test_update_with_only_availability_zone(self):

        def stub_update_aggregate(context, aggregate, values):

    def test_update_with_no_updates(self):

    def test_update_with_no_update_key(self):

    def test_update_with_wrong_updates(self):

    def test_update_with_null_name(self):

    def test_update_with_name_too_long(self):

    def test_update_with_bad_aggregate(self):

        def stub_update_aggregate(context, aggregate, metadata):

    def test_update_with_duplicated_name(self):

        def stub_update_aggregate(context, aggregate, metadata):

    def test_invalid_action(self):

    def test_add_host(self):

        def stub_add_host_to_aggregate(context, aggregate, host):

    def test_add_host_no_admin(self):

    def test_add_host_with_already_added_host(self):

        def stub_add_host_to_aggregate(context, aggregate, host):

    def test_add_host_with_bad_aggregate(self):

        def stub_add_host_to_aggregate(context, aggregate, host):

    def test_add_host_with_bad_host(self):

        def stub_add_host_to_aggregate(context, aggregate, host):

    def test_add_host_with_missing_host(self):

    def test_add_host_raises_key_error(self):

        def stub_add_host_to_aggregate(context, aggregate, host):

    def test_remove_host(self):

        def stub_remove_host_from_aggregate(context, aggregate, host):

    def test_remove_host_no_admin(self):

    def test_remove_host_with_bad_aggregate(self):

        def stub_remove_host_from_aggregate(context, aggregate, host):

    def test_remove_host_with_host_not_in_aggregate(self):

        def stub_remove_host_from_aggregate(context, aggregate, host):

    def test_remove_host_with_bad_host(self):

        def stub_remove_host_from_aggregate(context, aggregate, host):

    def test_remove_host_with_missing_host(self):

    def test_remove_host_with_extra_param(self):

    def test_set_metadata(self):

        def stub_update_aggregate(context, aggregate, values):

    def test_set_metadata_no_admin(self):

    def test_set_metadata_with_bad_aggregate(self):

        def stub_update_aggregate(context, aggregate, metadata):

    def test_set_metadata_with_missing_metadata(self):

    def test_set_metadata_with_extra_params(self):

    def test_delete_aggregate(self):

        def stub_delete_aggregate(context, aggregate):

    def test_delete_aggregate_no_admin(self):

    def test_delete_aggregate_with_bad_aggregate(self):

        def stub_delete_aggregate(context, aggregate):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_attach_interfaces.py

def fake_list_ports(self, *args, **kwargs):

def fake_show_port(self, context, port_id, **kwargs):

def fake_attach_interface(self, context, instance, network_id, port_id, requested_ip='192.168.1.3'):

def fake_detach_interface(self, context, instance, port_id):

def fake_get_instance(self, context, intance_id, want_objects=False):

class InterfaceAttachTests(test.NoDBTestCase):

    def setUp(self):

    def test_show(self):

    def test_show_invalid(self):

    def test_delete(self):

    def test_delete_interface_not_found(self):

    def test_attach_interface_without_network_id(self):

    def test_attach_interface_with_network_id(self):

    def test_attach_interface_with_port_and_network_id(self):

    def test_attach_interface_with_invalid_data(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_availability_zone.py

def fake_service_get_all(context, disabled=None):

 def __fake_service(binary, availability_zone, created_at, updated_at, host, disabled):

def fake_service_is_up(self, service):

def fake_set_availability_zones(context, services):

def fake_get_availability_zones(context):

class AvailabilityZoneApiTest(test.NoDBTestCase):

    def setUp(self):

    def test_filtered_availability_zones(self):

    def test_availability_zone_index(self):

    def test_availability_zone_detail(self):

        def _formatZone(zone_dict):

        def _assertZone(zone, name, status):

    def test_availability_zone_detail_no_services(self):

class AvailabilityZoneSerializerTest(test.NoDBTestCase):

    def test_availability_zone_index_detail_serializer(self):

        def _verify_zone(zone_dict, tree):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_baremetal_nodes.py

class FakeRequest(object):

    def __init__(self, context):

def fake_node(**updates):

def fake_node_ext_status(**updates):

def fake_interface(**updates):

class BareMetalNodesTest(test.NoDBTestCase):

    def setUp(self):

    def _test_create(self, node, ext_status=False):

    def _test_show(self, node, ext_status=False):

    def _test_show_no_interfaces(self, ext_status=False):

    def _test_index(self, ext_status=False):

    def test_create(self):

    def test_create_ext_status(self):

    def test_create_with_prov_mac_address(self):

    def test_create_with_invalid_prov_mac_address(self):

    def test_delete(self):

    def test_delete_node_not_found(self):

    def test_index(self):

    def test_index_ext_status(self):

    def test_show(self):

    def test_show_ext_status(self):

    def test_show_no_interfaces(self):

    def test_show_no_interfaces_ext_status(self):

    def test_add_interface(self):

    def test_add_interface_invalid_address(self):

    def test_remove_interface(self):

    def test_remove_interface_by_address(self):

    def test_remove_interface_no_id_no_address(self):

    def test_add_interface_node_not_found(self):

    def test_remove_interface_node_not_found(self):

    def test_is_valid_mac(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_cells.py

class BaseCellsTest(test.NoDBTestCase):

    def setUp(self):

        def fake_cell_get(_self, context, cell_name):

        def fake_cell_create(_self, context, values):

        def fake_cell_update(_self, context, cell_id, values):

        def fake_cells_api_get_all_cell_info(*args):

    def _get_all_cell_info(self, *args):

        def insecure_transport_url(url):

class CellsTest(BaseCellsTest):

    def setUp(self):

    def _get_request(self, resource):

    def test_index(self):

    def test_detail(self):

    def test_show_bogus_cell_raises(self):

    def test_get_cell_by_name(self):

    def test_cell_delete(self):

        def fake_cell_delete(inst, context, cell_name):

    def test_delete_bogus_cell_raises(self):

        def fake_cell_delete(inst, context, cell_name):

    def test_cell_create_parent(self):

    def test_cell_create_child(self):

    def test_cell_create_no_name_raises(self):

    def test_cell_create_name_empty_string_raises(self):

    def test_cell_create_name_with_bang_raises(self):

    def test_cell_create_name_with_dot_raises(self):

    def test_cell_create_name_with_invalid_type_raises(self):

    def test_cell_update(self):

    def test_cell_update_empty_name_raises(self):

    def test_cell_update_invalid_type_raises(self):

    def test_cell_update_without_type_specified(self):

    def test_cell_update_with_type_specified(self):

    def test_cell_info(self):

    def test_show_capacities(self):

    def test_show_capacity_fails_with_non_admin_context(self):

    def test_show_capacities_for_invalid_cell(self):

    def test_show_capacities_for_cell(self):

    def test_sync_instances(self):

        def sync_instances(self, context, **kwargs):

    def test_cells_disabled(self):

class TestCellsXMLSerializer(BaseCellsTest):

    def test_multiple_cells(self):

    def test_single_cell_with_caps(self):

    def test_single_cell_without_caps(self):

class TestCellsXMLDeserializer(test.NoDBTestCase):

    def test_cell_deserializer(self):

    def test_with_corrupt_xml(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_certificates.py

class CertificatesTest(test.NoDBTestCase):

    def setUp(self):

    def test_translate_certificate_view(self):

    def test_certificates_show_root(self):

    def test_certificates_create_certificate(self):

class CertificatesSerializerTest(test.NoDBTestCase):

    def test_index_serializer(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_cloudpipe.py

def fake_vpn_instance():

def compute_api_get_all_empty(context, search_opts=None):

def compute_api_get_all(context, search_opts=None):

def utils_vpn_ping(addr, port, timoeout=0.05, session_id=None):

class CloudpipeTest(test.NoDBTestCase):

    def setUp(self):

    def test_cloudpipe_list_no_network(self):

        def fake_get_nw_info_for_instance(instance):

    def test_cloudpipe_list(self):

        def network_api_get(context, network_id):

        def fake_get_nw_info_for_instance(instance):

    def test_cloudpipe_create(self):

        def launch_vpn_instance(context):

    def test_cloudpipe_create_no_networks(self):

        def launch_vpn_instance(context):

    def test_cloudpipe_create_already_running(self):

        def launch_vpn_instance(*args, **kwargs):

class CloudpipesXMLSerializerTest(test.NoDBTestCase):

    def test_default_serializer(self):

    def test_index_serializer(self):

    def test_deserializer(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_cloudpipe_update.py

def fake_project_get_networks(context, project_id, associate=True):

def fake_network_update(context, network_id, values):

class CloudpipeUpdateTest(test.NoDBTestCase):

    def setUp(self):

    def test_cloudpipe_configure_project(self):

    def test_cloudpipe_configure_project_bad_url(self):

    def test_cloudpipe_configure_project_bad_data(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_config_drive.py

class ConfigDriveTest(test.TestCase):

    def setUp(self):

    def test_show(self):

    def test_detail_servers(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_consoles.py

def fake_get_vnc_console(self, _context, _instance, _console_type):

def fake_get_spice_console(self, _context, _instance, _console_type):

def fake_get_rdp_console(self, _context, _instance, _console_type):

def fake_get_vnc_console_invalid_type(self, _context, _instance, _console_type):

def fake_get_spice_console_invalid_type(self, _context, _instance, _console_type):

def fake_get_rdp_console_invalid_type(self, _context, _instance, _console_type):

def fake_get_vnc_console_not_ready(self, _context, instance, _console_type):

def fake_get_spice_console_not_ready(self, _context, instance, _console_type):

def fake_get_rdp_console_not_ready(self, _context, instance, _console_type):

def fake_get_vnc_console_not_found(self, _context, instance, _console_type):

def fake_get_spice_console_not_found(self, _context, instance, _console_type):

def fake_get_rdp_console_not_found(self, _context, instance, _console_type):

def fake_get(self, context, instance_uuid, want_objects=False):

def fake_get_not_found(self, context, instance_uuid, want_objects=False):

class ConsolesExtensionTest(test.NoDBTestCase):

    def setUp(self):

    def test_get_vnc_console(self):

    def test_get_vnc_console_not_ready(self):

    def test_get_vnc_console_no_type(self):

    def test_get_vnc_console_no_instance(self):

    def test_get_vnc_console_no_instance_on_console_get(self):

    def test_get_vnc_console_invalid_type(self):

    def test_get_vnc_console_not_implemented(self):

    def test_get_spice_console(self):

    def test_get_spice_console_not_ready(self):

    def test_get_spice_console_no_type(self):

    def test_get_spice_console_no_instance(self):

    def test_get_spice_console_no_instance_on_console_get(self):

    def test_get_spice_console_invalid_type(self):

    def test_get_spice_console_not_implemented(self):

    def test_get_rdp_console(self):

    def test_get_rdp_console_not_ready(self):

    def test_get_rdp_console_no_type(self):

    def test_get_rdp_console_no_instance(self):

    def test_get_rdp_console_no_instance_on_console_get(self):

    def test_get_rdp_console_invalid_type(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_console_auth_tokens.py

def _fake_check_token(self, context, token):

def _fake_check_token_not_found(self, context, token):

def _fake_check_token_unauthorized(self, context, token):

class ConsoleAuthTokensExtensionTest(test.TestCase):

    def setUp(self):

    def _get_admin_context(self):

    def _create_request(self):

    def test_get_console_connect_info(self):

    def test_get_console_connect_info_token_not_found(self):

    def test_get_console_connect_info_unauthorized_console_type(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_console_output.py

def fake_get_console_output(self, _context, _instance, tail_length):

def fake_get_console_output_not_ready(self, _context, _instance, tail_length):

def fake_get_console_output_all_characters(self, _ctx, _instance, _tail_len):

def fake_get(self, context, instance_uuid):

def fake_get_not_found(*args, **kwargs):

class ConsoleOutputExtensionTest(test.NoDBTestCase):

    def setUp(self):

    def test_get_text_console_instance_action(self):

    def test_get_console_output_with_tail(self):

    def test_get_console_output_with_length_as_str(self):

    def test_get_console_output_filtered_characters(self):

    def test_get_console_output_with_non_integer_length(self):

    def test_get_text_console_no_instance(self):

    def test_get_text_console_no_instance_on_get_output(self):

    def test_get_text_console_bad_body(self):

    def test_get_console_output_not_ready(self):

    def test_get_console_output_with_length_as_float(self):

    def test_not_implemented(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_createserverext.py

def return_security_group_non_existing(context, project_id, group_name):

def return_security_group_get_by_name(context, project_id, group_name):

def return_security_group_get(context, security_group_id, session):

def return_instance_add_security_group(context, instance_id, security_group_id):

class CreateserverextTest(test.TestCase):

    def setUp(self):

        def create(*args, **kwargs):

    def _make_stub_method(self, canned_return):

        def stub_method(*args, **kwargs):

    def _create_security_group_request_dict(self, security_groups):

    def _create_networks_request_dict(self, networks):

    def _create_user_data_request_dict(self, user_data):

    def _get_create_request_json(self, body_dict):

    def _format_xml_request_body(self, body_dict):

    def _get_create_request_xml(self, body_dict):

    def _create_instance_with_networks_json(self, networks):

    def _create_instance_with_user_data_json(self, networks):

    def _create_instance_with_networks_xml(self, networks):

    def test_create_instance_with_no_networks(self):

    def test_create_instance_with_no_networks_xml(self):

    def test_create_instance_with_one_network(self):

    def test_create_instance_with_one_network_xml(self):

    def test_create_instance_with_two_networks(self):

    def test_create_instance_with_two_networks_xml(self):

    def test_create_instance_with_duplicate_networks(self):

    def test_create_instance_with_duplicate_networks_xml(self):

    def test_create_instance_with_network_no_id(self):

    def test_create_instance_with_network_no_id_xml(self):

    def test_create_instance_with_network_invalid_id(self):

    def test_create_instance_with_network_invalid_id_xml(self):

    def test_create_instance_with_network_empty_fixed_ip(self):

    def test_create_instance_with_network_non_string_fixed_ip(self):

    def test_create_instance_with_network_empty_fixed_ip_xml(self):

    def test_create_instance_with_network_no_fixed_ip(self):

    def test_create_instance_with_network_no_fixed_ip_xml(self):

    def test_create_instance_with_userdata(self):

    def test_create_instance_with_userdata_none(self):

    def test_create_instance_with_userdata_with_non_b64_content(self):

    def test_create_instance_with_security_group_json(self):

    def test_get_server_by_id_verify_security_groups_json(self):

    def test_get_server_by_id_verify_security_groups_xml(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_deferred_delete.py

class FakeRequest(object):

    def __init__(self, context):

class DeferredDeleteExtensionTest(test.NoDBTestCase):

    def setUp(self):

    def test_force_delete(self):

    def test_force_delete_instance_not_found(self):

    def test_force_delete_raises_conflict_on_invalid_state(self):

    def test_restore(self):

    def test_restore_raises_conflict_on_invalid_state(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_disk_config.py

def instance_addresses(context, instance_id):

class DiskConfigTestCase(test.TestCase):

    def setUp(self):

        def fake_instance_get(context, id_):

        def fake_instance_get_by_uuid(context, uuid, columns_to_join=None, use_slave=False):

        def fake_instance_get_all(context, *args, **kwargs):

        def fake_instance_create(context, inst_, session=None):

    def _setup_fake_image_service(self):

    def tearDown(self):

    def assertDiskConfig(self, dict_, value):

    def test_show_server(self):

    def test_detail_servers(self):

    def test_show_image(self):

    def test_detail_image(self):

    def test_create_server_override_auto(self):

    def test_create_server_override_manual(self):

    def test_create_server_detect_from_image(self):

    def test_create_server_detect_from_image_disabled_goes_to_manual(self):

    def test_create_server_errors_when_disabled_and_auto(self):

    def test_create_server_when_disabled_and_manual(self):

    def test_update_server_invalid_disk_config(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_evacuate.py

def fake_compute_api(*args, **kwargs):

def fake_compute_api_get(self, context, instance_id):

def fake_service_get_by_compute_host(self, context, host):

class EvacuateTest(test.NoDBTestCase):

    def setUp(self):

    def _get_admin_context(self, user_id='fake', project_id='fake'):

    def test_evacuate_with_valid_instance(self):

    def test_evacuate_with_underscore_in_hostname(self):

    def test_evacuate_with_invalid_instance(self):

    def test_evacuate_with_active_service(self):

        def fake_evacuate(*args, **kwargs):

    def test_evacuate_instance_with_no_target(self):

    def test_evacuate_instance_without_on_shared_storage(self):

    def test_evacuate_instance_with_bad_target(self):

    def test_evacuate_instance_with_target(self):

        def fake_update(inst, context, instance, task_state, expected_task_state):

    def test_evacuate_shared_and_pass(self):

        def fake_update(inst, context, instance, task_state, expected_task_state):

    def test_evacuate_not_shared_pass_generated(self):

        def fake_update(inst, context, instance, task_state, expected_task_state):

    def test_evacuate_shared(self):

        def fake_update(inst, context, instance, task_state, expected_task_state):

    def test_not_admin(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_extended_availability_zone.py

def fake_compute_get_az(*args, **kwargs):

def fake_compute_get_empty(*args, **kwargs):

def fake_compute_get(*args, **kwargs):

def fake_compute_get_all(*args, **kwargs):

def fake_get_host_availability_zone(context, host):

def fake_get_no_host_availability_zone(context, host):

class ExtendedAvailabilityZoneTest(test.TestCase):

    def setUp(self):

    def _make_request(self, url):

    def _get_server(self, body):

    def _get_servers(self, body):

    def assertAvailabilityZone(self, server, az):

    def test_show_no_host_az(self):

    def test_show_empty_host_az(self):

    def test_show(self):

    def test_detail(self):

    def test_no_instance_passthrough_404(self):

        def fake_compute_get(*args, **kwargs):

class ExtendedAvailabilityZoneXmlTest(ExtendedAvailabilityZoneTest):

    def _get_server(self, body):

    def _get_servers(self, body):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_extended_hypervisors.py

class ExtendedHypervisorsTest(test_hypervisors.HypervisorsTest):

    def setUp(self):

    def test_view_hypervisor_detail_noservers(self):

    def test_detail(self):

    def test_show_withid(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_extended_ips.py

def fake_compute_get(*args, **kwargs):

def fake_compute_get_all(*args, **kwargs):

class ExtendedIpsTest(test.TestCase):

    def setUp(self):

    def _make_request(self, url):

    def _get_server(self, body):

    def _get_servers(self, body):

    def _get_ips(self, server):

    def assertServerStates(self, server):

    def test_show(self):

    def test_detail(self):

class ExtendedIpsXmlTest(ExtendedIpsTest):

    def _get_server(self, body):

    def _get_servers(self, body):

    def _get_ips(self, server):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_extended_ips_mac.py

def fake_compute_get(*args, **kwargs):

def fake_compute_get_all(*args, **kwargs):

class ExtendedIpsMacTest(test.TestCase):

    def setUp(self):

    def _make_request(self, url):

    def _get_server(self, body):

    def _get_servers(self, body):

    def _get_ips(self, server):

    def assertServerStates(self, server):

    def test_show(self):

    def test_detail(self):

class ExtendedIpsMacXmlTest(ExtendedIpsMacTest):

    def _get_server(self, body):

    def _get_servers(self, body):

    def _get_ips(self, server):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_extended_server_attributes.py

def fake_compute_get(*args, **kwargs):

def fake_compute_get_all(*args, **kwargs):

class ExtendedServerAttributesTest(test.TestCase):

    def setUp(self):

    def _make_request(self, url):

    def _get_server(self, body):

    def _get_servers(self, body):

    def assertServerAttributes(self, server, host, node, instance_name):

    def test_show(self):

    def test_detail(self):

    def test_no_instance_passthrough_404(self):

        def fake_compute_get(*args, **kwargs):

class ExtendedServerAttributesXmlTest(ExtendedServerAttributesTest):

    def _get_server(self, body):

    def _get_servers(self, body):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_extended_status.py

def fake_compute_get(*args, **kwargs):

def fake_compute_get_all(*args, **kwargs):

class ExtendedStatusTest(test.TestCase):

    def setUp(self):

    def _make_request(self, url):

    def _get_server(self, body):

    def _get_servers(self, body):

    def assertServerStates(self, server, vm_state, power_state, task_state):

    def test_show(self):

    def test_detail(self):

    def test_no_instance_passthrough_404(self):

        def fake_compute_get(*args, **kwargs):

class ExtendedStatusXmlTest(ExtendedStatusTest):

    def _get_server(self, body):

    def _get_servers(self, body):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_extended_virtual_interfaces_net.py

def compute_api_get(self, context, instance_id, expected_attrs=None, want_objects=False):

def get_vifs_by_instance(self, context, instance_id):

def get_vif_by_mac_address(self, context, mac_address):

class ExtendedServerVIFNetTest(test.NoDBTestCase):

    def setUp(self):

    def _make_request(self, url):

    def _get_vifs(self, body):

    def _get_net_id(self, vifs):

    def assertVIFs(self, vifs):

    def test_get_extend_virtual_interfaces_list(self):

class ExtendedServerVIFNetSerializerTest(ExtendedServerVIFNetTest):

    def setUp(self):

    def _get_vifs(self, body):

    def _get_net_id(self, vifs):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_extended_volumes.py

def fake_compute_get(*args, **kwargs):

def fake_compute_get_all(*args, **kwargs):

def fake_bdms_get_all_by_instance(*args, **kwargs):

class ExtendedVolumesTest(test.TestCase):

    def setUp(self):

    def _make_request(self, url):

    def _get_server(self, body):

    def _get_servers(self, body):

    def test_show(self):

    def test_detail(self):

class ExtendedVolumesXmlTest(ExtendedVolumesTest):

    def _get_server(self, body):

    def _get_servers(self, body):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_fixed_ips.py

def fake_fixed_ip_get_by_address(context, address):

def fake_fixed_ip_get_by_address_detailed(context, address):

def fake_fixed_ip_update(context, address, values):

class FakeModel(object):

    def __init__(self, values):

    def __getattr__(self, name):

    def __getitem__(self, key):

    def __repr__(self):

def fake_network_get_all(context):

class FixedIpTest(test.NoDBTestCase):

    def setUp(self):

    def test_fixed_ips_get(self):

    def test_fixed_ips_get_bad_ip_fail(self):

    def test_fixed_ips_get_invalid_ip_address(self):

    def test_fixed_ips_get_deleted_ip_fail(self):

    def test_fixed_ip_reserve(self):

    def test_fixed_ip_reserve_bad_ip(self):

    def test_fixed_ip_reserve_invalid_ip_address(self):

    def test_fixed_ip_reserve_deleted_ip(self):

    def test_fixed_ip_unreserve(self):

    def test_fixed_ip_unreserve_bad_ip(self):

    def test_fixed_ip_unreserve_invalid_ip_address(self):

    def test_fixed_ip_unreserve_deleted_ip(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_flavorextradata.py

def fake_get_flavor_by_flavor_id(flavorid, ctxt=None):

def fake_get_all_flavors_sorted_list(context=None, inactive=False, filters=None, sort_key='flavorid', sort_dir='asc', limit=None, marker=None):

class FlavorextradataTest(test.NoDBTestCase):

    def setUp(self):

    def _verify_flavor_response(self, flavor, expected):

    def test_show(self):

    def test_detail(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_flavors_extra_specs.py

def return_create_flavor_extra_specs(context, flavor_id, extra_specs):

def return_flavor_extra_specs(context, flavor_id):

def return_flavor_extra_specs_item(context, flavor_id, key):

def return_empty_flavor_extra_specs(context, flavor_id):

def delete_flavor_extra_specs(context, flavor_id, key):

def stub_flavor_extra_specs():

class FlavorsExtraSpecsTest(test.TestCase):

    def setUp(self):

    def test_index(self):

    def test_index_no_data(self):

    def test_show(self):

    def test_show_spec_not_found(self):

    def test_delete(self):

    def test_delete_no_admin(self):

    def test_delete_spec_not_found(self):

    def test_create(self):

    def test_create_no_admin(self):

    def test_create_empty_body(self):

    def test_create_invalid_specs_key(self, mock_flavor_extra_specs):

    def test_create_valid_specs_key(self, mock_flavor_extra_specs):

    def test_update_item(self):

    def test_update_item_no_admin(self):

    def test_update_item_empty_body(self):

    def test_update_item_too_many_keys(self):

    def test_update_item_body_uri_mismatch(self):

class FlavorsExtraSpecsXMLSerializerTest(test.TestCase):

    def test_serializer(self):

    def test_show_update_serializer(self):

    def test_serializer_with_colon_tagname(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_flavor_access.py

def generate_flavor(flavorid, ispublic):

def fake_get_flavor_access_by_flavor_id(context, flavorid):

def fake_get_flavor_by_flavor_id(context, flavorid, read_deleted=None):

def _has_flavor_access(flavorid, projectid):

def fake_get_all_flavors_sorted_list(context, inactive=False, filters=None, sort_key='flavorid', sort_dir='asc', limit=None, marker=None):

class FakeRequest(object):

    def get_db_flavor(self, flavor_id):

class FakeResponse(object):

    def attach(self, **kwargs):

class FlavorAccessTest(test.NoDBTestCase):

    def setUp(self):

    def _verify_flavor_list(self, result, expected):

    def test_list_flavor_access_public(self):

    def test_list_flavor_access_private(self):

    def test_list_with_no_context(self):

        def fake_authorize(context, target=None, action=None):

    def test_list_flavor_with_admin_default_proj1(self):

    def test_list_flavor_with_admin_default_proj2(self):

    def test_list_flavor_with_admin_ispublic_true(self):

    def test_list_flavor_with_admin_ispublic_false(self):

    def test_list_flavor_with_admin_ispublic_false_proj2(self):

    def test_list_flavor_with_admin_ispublic_none(self):

    def test_list_flavor_with_no_admin_default(self):

    def test_list_flavor_with_no_admin_ispublic_true(self):

    def test_list_flavor_with_no_admin_ispublic_false(self):

    def test_list_flavor_with_no_admin_ispublic_none(self):

    def test_show(self):

    def test_detail(self):

    def test_create(self):

    def test_add_tenant_access(self):

        def stub_add_flavor_access(context, flavorid, projectid):

    def test_add_tenant_access_with_no_admin_user(self):

    def test_add_tenant_access_with_already_added_access(self):

        def stub_add_flavor_access(context, flavorid, projectid):

    def test_remove_tenant_access_with_bad_access(self):

        def stub_remove_flavor_access(context, flavorid, projectid):

    def test_remove_tenant_access_with_no_admin_user(self):

class FlavorAccessSerializerTest(test.NoDBTestCase):

    def test_serializer_empty(self):

    def test_serializer(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_flavor_disabled.py

def fake_flavor_get_by_flavor_id(flavorid, ctxt=None):

def fake_get_all_flavors_sorted_list(context=None, inactive=False, filters=None, sort_key='flavorid', sort_dir='asc', limit=None, marker=None):

class FlavorDisabledTest(test.NoDBTestCase):

    def setUp(self):

    def _make_request(self, url):

    def _get_flavor(self, body):

    def _get_flavors(self, body):

    def assertFlavorDisabled(self, flavor, disabled):

    def test_show(self):

    def test_detail(self):

class FlavorDisabledXmlTest(FlavorDisabledTest):

    def _get_flavor(self, body):

    def _get_flavors(self, body):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_flavor_manage.py

def fake_get_flavor_by_flavor_id(flavorid, ctxt=None, read_deleted='yes'):

def fake_destroy(flavorname):

def fake_create(context, kwargs):

class FlavorManageTest(test.NoDBTestCase):

    def setUp(self):

    def test_delete(self):

    def test_create(self):

    def test_create_invalid_name(self):

    def test_create_flavor_name_is_whitespace(self):

    def test_create_flavor_name_with_leading_trailing_whitespace(self):

    def test_create_public_default(self):

    def test_create_without_flavorid(self):

    def test_create_without_flavorname(self):

    def test_create_empty_body(self):

    def test_create_no_body(self):

    def test_create_invalid_format_body(self):

    def test_create_invalid_flavorid(self):

    def test_create_check_flavor_id_length(self):

    def test_create_with_leading_trailing_whitespaces_in_flavor_id(self):

    def test_flavor_exists_exception_returns_409(self):

        def fake_create(name, memory_mb, vcpus, root_gb, ephemeral_gb, flavorid, swap, rxtx_factor, is_public):

    def test_invalid_memory_mb(self):

class FakeRequest(object):

class PrivateFlavorManageTest(test.TestCase):

    def setUp(self):

    def test_create_private_flavor_should_not_grant_flavor_access(self):

    def test_create_public_flavor_should_not_create_flavor_access(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_flavor_rxtx.py

def fake_flavor_get_by_flavor_id(flavorid, ctxt=None):

def fake_get_all_flavors_sorted_list(context=None, inactive=False, filters=None, sort_key='flavorid', sort_dir='asc', limit=None, marker=None):

class FlavorRxtxTest(test.NoDBTestCase):

    def setUp(self):

    def _make_request(self, url):

    def _get_flavor(self, body):

    def _get_flavors(self, body):

    def assertFlavorRxtx(self, flavor, rxtx):

    def test_show(self):

    def test_detail(self):

class FlavorRxtxXmlTest(FlavorRxtxTest):

    def _get_flavor(self, body):

    def _get_flavors(self, body):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_flavor_swap.py

def fake_flavor_get_by_flavor_id(flavorid, ctxt=None):

def fake_get_all_flavors_sorted_list(context=None, inactive=False, filters=None, sort_key='flavorid', sort_dir='asc', limit=None, marker=None):

class FlavorSwapTest(test.NoDBTestCase):

    def setUp(self):

    def _make_request(self, url):

    def _get_flavor(self, body):

    def _get_flavors(self, body):

    def assertFlavorSwap(self, flavor, swap):

    def test_show(self):

    def test_detail(self):

class FlavorSwapXmlTest(FlavorSwapTest):

    def _get_flavor(self, body):

    def _get_flavors(self, body):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_floating_ips.py

def network_api_get_floating_ip(self, context, id):

def network_api_get_floating_ip_by_address(self, context, address):

def network_api_get_floating_ips_by_project(self, context):

def compute_api_get(self, context, instance_id, expected_attrs=None, want_objects=False):

def network_api_allocate(self, context):

def network_api_release(self, context, address):

def compute_api_associate(self, context, instance_id, address):

def network_api_associate(self, context, floating_address, fixed_address):

def network_api_disassociate(self, context, instance, floating_address):

def fake_instance_get(context, instance_id):

def stub_nw_info(stubs):

 def get_nw_info_for_instance(instance):

def get_instance_by_floating_ip_addr(self, context, address):

class FloatingIpTest(test.TestCase):

    def _create_floating_ips(self, floating_ips=None):

        def make_ip_dict(ip):

    def _delete_floating_ip(self):

    def setUp(self):

    def tearDown(self):

    def test_translate_floating_ip_view(self):

    def test_translate_floating_ip_view_dict(self):

    def test_floating_ips_list(self):

    def test_floating_ip_release_nonexisting(self):

        def fake_get_floating_ip(*args, **kwargs):

    def test_floating_ip_release_race_cond(self):

        def fake_get_floating_ip(*args, **kwargs):

        def fake_get_instance_by_floating_ip_addr(*args, **kwargs):

        def fake_disassociate_floating_ip(*args, **kwargs):

    def test_floating_ip_show(self):

    def test_floating_ip_show_not_found(self):

        def fake_get_floating_ip(*args, **kwargs):

    def test_show_associated_floating_ip(self):

        def get_floating_ip(self, context, id):

    def test_recreation_of_floating_ip(self):

    def test_floating_ip_in_bulk_creation(self):

    def test_fail_floating_ip_in_bulk_creation(self):

    def test_floating_ip_allocate_no_free_ips(self):

        def fake_allocate(*args, **kwargs):

    def test_floating_ip_allocate_no_free_ips_pool(self):

        def fake_allocate(*args, **kwargs):

    def test_floating_ip_allocate(self):

        def fake1(*args, **kwargs):

        def fake2(*args, **kwargs):

    def test_floating_ip_release(self):

    def test_floating_ip_associate(self):

        def fake_associate_floating_ip(*args, **kwargs):

    def test_floating_ip_associate_invalid_instance(self):

        def fake_get(self, context, id, expected_attrs=None, want_objects=False):

    def test_not_extended_floating_ip_associate_fixed(self):

        def fake_associate_floating_ip(*args, **kwargs):

    def test_associate_not_allocated_floating_ip_to_instance(self):

        def fake_associate_floating_ip(self, context, instance, floating_address, fixed_address, affect_auto_assigned=False):

    def test_floating_ip_disassociate(self):

        def get_instance_by_floating_ip_addr(self, context, address):

    def test_floating_ip_disassociate_missing(self):

    def test_floating_ip_associate_non_existent_ip(self):

        def fake_network_api_associate(self, context, instance, floating_address=None, fixed_address=None):

    def test_floating_ip_disassociate_non_existent_ip(self):

        def network_api_get_floating_ip_by_address(self, context, floating_address):

    def test_floating_ip_disassociate_wrong_instance_uuid(self):

        def get_instance_by_floating_ip_addr(self, context, address):

    def test_floating_ip_disassociate_wrong_instance_id(self):

        def get_instance_by_floating_ip_addr(self, context, address):

    def test_floating_ip_disassociate_auto_assigned(self):

        def fake_get_floating_ip_addr_auto_assigned(self, context, address):

        def get_instance_by_floating_ip_addr(self, context, address):

        def network_api_disassociate(self, context, instance, floating_address):

    def test_floating_ip_disassociate_map_authorization_exc(self):

        def fake_get_floating_ip_addr_auto_assigned(self, context, address):

        def get_instance_by_floating_ip_addr(self, context, address):

        def network_api_disassociate(self, context, instance, address):

    def test_bad_address_param_in_remove_floating_ip(self):

    def test_missing_dict_param_in_remove_floating_ip(self):

    def test_missing_dict_param_in_add_floating_ip(self):

class ExtendedFloatingIpTest(test.TestCase):

    def _create_floating_ips(self, floating_ips=None):

        def make_ip_dict(ip):

    def _delete_floating_ip(self):

    def setUp(self):

    def tearDown(self):

    def test_extended_floating_ip_associate_fixed(self):

        def fake_associate_floating_ip(*args, **kwargs):

    def test_extended_floating_ip_associate_fixed_not_allocated(self):

        def fake_associate_floating_ip(*args, **kwargs):

class FloatingIpSerializerTest(test.TestCase):

    def test_default_serializer(self):

    def test_index_serializer(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_floating_ip_bulk.py

class FloatingIPBulk(test.TestCase):

    def setUp(self):

    def _setup_floating_ips(self, ip_range):

    def test_create_ips(self):

    def test_create_ips_pool(self):

    def test_list_ips(self):

    def test_list_ip_by_host(self):

    def test_delete_ips(self):

    def test_create_duplicate_fail(self):

    def test_create_bad_cidr_fail(self):

    def test_create_invalid_cidr_fail(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\contrib\test_floating_ip_dns.py

def _quote_domain(domain):

def network_api_get_floating_ip(self, context, id):

def network_get_dns_domains(self, context):

def network_get_dns_entries_by_address(self, context, address, domain):

def network_get_dns_entries_by_name(self, context, address, domain):

def network_add_dns_entry(self, context, address, name, dns_type, domain):

def network_modify_dns_entry(self, context, address, name, domain):

def network_create_private_dns_domain(self, context, domain, avail_zone):

def network_create_public_dns_domain(self, context, domain, project):

OpenStack Index

Previous

Next