¡@

Home 

OpenStack Study: nova

OpenStack Index

Previous

Next

    def test_host_startup_notimpl(self):

    def test_host_shutdown_notimpl(self):

    def test_host_reboot_notimpl(self):

    def test_host_status_bad_host(self):

    def test_host_maintenance_bad_host(self):

    def test_host_power_action_bad_host(self):

    def test_bad_status_value(self):

    def test_bad_update_key(self):

    def test_bad_update_key_type(self):

    def test_bad_update_empty(self):

    def test_bad_update_key_and_correct_update_key(self):

    def test_good_update_keys(self):

    def test_show_forbidden(self):

    def test_show_host_not_exist(self):

    def _create_compute_service(self):

    def test_show_no_project(self):

    def test_show_works_correctly(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_hypervisors.py

def fake_compute_node_get_all(context):

def fake_compute_node_search_by_hypervisor(context, hypervisor_re):

def fake_compute_node_get(context, compute_id):

def fake_compute_node_statistics(context):

def fake_instance_get_all_by_host(context, host):

class HypervisorsTest(test.NoDBTestCase):

    def setUp(self):

    def test_view_hypervisor_nodetail_noservers(self):

    def test_view_hypervisor_detail_noservers(self):

    def test_view_hypervisor_servers(self):

    def test_index(self):

    def test_index_non_admin(self):

    def test_detail(self):

    def test_detail_non_admin(self):

    def test_show_noid(self):

    def test_show_non_integer_id(self):

    def test_show_withid(self):

    def test_show_non_admin(self):

    def test_uptime_noid(self):

    def test_uptime_notimplemented(self):

        def fake_get_host_uptime(context, hyp):

    def test_uptime_implemented(self):

        def fake_get_host_uptime(context, hyp):

    def test_uptime_non_integer_id(self):

    def test_uptime_non_admin(self):

    def test_search(self):

    def test_search_non_exist(self):

        def fake_compute_node_search_by_hypervisor_return_empty(context, hypervisor_re):

    def test_search_without_query(self):

    def test_servers(self):

    def test_servers_non_id(self):

    def test_servers_non_admin(self):

    def test_servers_return_empty(self):

        def fake_instance_get_all_by_host_return_empty(context, hypervisor_re):

    def test_servers_with_non_integer_hypervisor_id(self):

    def test_statistics(self):

    def test_statistics_non_admin(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_instance_actions.py

def format_action(action):

def format_event(event):

class InstanceActionsPolicyTest(test.NoDBTestCase):

    def setUp(self):

    def test_list_actions_restricted_by_project(self):

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

    def test_get_action_restricted_by_project(self):

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

class InstanceActionsTest(test.NoDBTestCase):

    def setUp(self):

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

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

    def test_list_actions(self):

        def fake_get_actions(context, uuid):

    def test_get_action_with_events_allowed(self):

        def fake_get_action(context, uuid, request_id):

        def fake_get_events(context, action_id):

    def test_get_action_with_events_not_allowed(self):

        def fake_get_action(context, uuid, request_id):

        def fake_get_events(context, action_id):

    def test_action_not_found(self):

        def fake_no_action(context, uuid, action_id):

    def test_instance_not_found(self):

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

    def test_instance_not_found_in_show(self):

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

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_keypairs.py

def fake_keypair(name):

def db_key_pair_get_all_by_user(self, user_id):

def db_key_pair_create(self, keypair):

def db_key_pair_destroy(context, user_id, name):

def db_key_pair_create_duplicate(context, keypair):

class KeypairsTest(test.TestCase):

    def setUp(self):

    def test_keypair_list(self):

    def test_keypair_create(self):

    def test_keypair_create_without_keypair(self):

    def test_keypair_create_without_name(self):

    def test_keypair_create_with_empty_name(self):

    def test_keypair_create_with_name_too_long(self):

    def test_keypair_create_with_non_alphanumeric_name(self):

    def test_keypair_import(self):

    def test_keypair_import_quota_limit(self):

        def fake_quotas_count(self, context, resource, *args, **kwargs):

    def test_keypair_create_quota_limit(self):

        def fake_quotas_count(self, context, resource, *args, **kwargs):

    def test_keypair_create_duplicate(self):

    def test_keypair_import_bad_key(self):

    def test_keypair_delete(self):

    def test_keypair_get_keypair_not_found(self):

    def test_keypair_delete_not_found(self):

        def db_key_pair_get_not_found(context, user_id, name):

    def test_keypair_show(self):

        def _db_key_pair_get(context, user_id, name):

    def test_keypair_show_not_found(self):

        def _db_key_pair_get(context, user_id, name):

    def test_show_server(self):

    def test_detail_servers(self):

    def test_keypair_create_with_invalid_keypair_body(self):

class KeypairPolicyTest(test.TestCase):

    def setUp(self):

        def _db_key_pair_get(context, user_id, name):

    def test_keypair_list_fail_policy(self):

    def test_keypair_list_pass_policy(self):

    def test_keypair_show_fail_policy(self):

    def test_keypair_show_pass_policy(self):

    def test_keypair_create_fail_policy(self):

    def test_keypair_create_pass_policy(self):

    def test_keypair_delete_fail_policy(self):

    def test_keypair_delete_pass_policy(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_lock_server.py

class LockServerTests(admin_only_action_common.CommonTests):

    def setUp(self):

        def _fake_controller(*args, **kwargs):

    def test_lock_unlock(self):

    def test_lock_unlock_with_non_existed_instance(self):

    def test_unlock_not_authorized(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_migrate_server.py

class MigrateServerTests(admin_only_action_common.CommonTests):

    def setUp(self):

        def _fake_controller(*args, **kwargs):

    def test_migrate(self):

    def test_migrate_with_non_existed_instance(self):

    def test_migrate_raise_conflict_on_invalid_state(self):

    def test_actions_with_locked_instance(self):

    def _test_migrate_exception(self, exc_info, expected_result):

    def test_migrate_too_many_instances(self):

    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_pre_check_error(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_migrations.py

class FakeRequest(object):

class MigrationsTestCase(test.NoDBTestCase):

    def setUp(self):

    def test_index(self):

    def test_index_needs_authorization(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_multinic.py

def compute_api_add_fixed_ip(self, context, instance, network_id):

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

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

class FixedIpTest(test.NoDBTestCase):

    def setUp(self):

    def test_add_fixed_ip(self):

    def test_add_fixed_ip_empty_network_id(self):

    def test_add_fixed_ip_network_id_bigger_than_36(self):

    def test_add_fixed_ip_no_network(self):

    def test_remove_fixed_ip(self):

    def test_remove_fixed_ip_invalid_address(self):

    def test_remove_fixed_ip_no_address(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_multiple_create.py

def fake_gen_uuid():

def return_security_group(context, instance_id, security_group_id):

class ServersControllerCreateTest(test.TestCase):

    def setUp(self):

        def instance_create(context, inst):

        def instance_get(context, instance_id):

        def instance_update(context, uuid, values):

        def server_update(context, instance_uuid, params, update_cells=True, columns_to_join=None):

        def fake_method(*args, **kwargs):

        def project_get_networks(context, user_id):

        def queue_get_for(context, *args):

    def _test_create_extra(self, params, no_image=False, override_controller=None):

    def test_create_instance_with_multiple_create_disabled(self):

        def create(*args, **kwargs):

    def test_multiple_create_with_string_type_min_and_max(self):

        def create(*args, **kwargs):

    def test_create_instance_with_multiple_create_enabled(self):

        def create(*args, **kwargs):

    def test_create_instance_invalid_negative_min(self):

    def test_create_instance_invalid_negative_max(self):

    def test_create_instance_invalid_min_greater_than_max(self):

    def test_create_instance_invalid_alpha_min(self):

    def test_create_instance_invalid_alpha_max(self):

    def test_create_multiple_instances(self):

    def test_create_multiple_instances_pass_disabled(self):

    def _check_admin_password_len(self, server_dict):

    def _check_admin_password_missing(self, server_dict):

    def _create_multiple_instances_resv_id_return(self, resv_id_return):

    def test_create_multiple_instances_with_resv_id_return(self):

    def test_create_multiple_instances_with_string_resv_id_return(self):

    def test_create_multiple_instances_with_multiple_volume_bdm(self):

        def create(*args, **kwargs):

    def test_create_multiple_instances_with_single_volume_bdm(self):

        def create(*args, **kwargs):

    def test_create_multiple_instance_with_non_integer_max_count(self):

    def test_create_multiple_instance_with_non_integer_min_count(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_pause_server.py

class PauseServerTests(admin_only_action_common.CommonTests):

    def setUp(self):

        def _fake_controller(*args, **kwargs):

    def test_pause_unpause(self):

    def test_pause_unpause_with_non_existed_instance(self):

    def test_pause_unpause_raise_conflict_on_invalid_state(self):

    def test_actions_with_locked_instance(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_pci.py

class FakeResponse(wsgi.ResponseObject):

class PciServerControllerTest(test.NoDBTestCase):

    def setUp(self):

    def _create_fake_instance(self):

    def _create_fake_pci_device(self):

        def fake_pci_device_get_by_addr(ctxt, id, addr):

    def test_show(self):

        def fake_get_db_instance(id):

    def test_detail(self):

        def fake_get_db_instance(id):

class PciHypervisorControllerTest(test.NoDBTestCase):

    def setUp(self):

    def test_show(self):

        def fake_get_db_compute_node(id):

    def test_detail(self):

        def fake_get_db_compute_node(id):

class PciControlletest(test.NoDBTestCase):

    def setUp(self):

    def test_show(self):

        def fake_pci_device_get_by_id(context, id):

    def test_show_error_id(self):

        def fake_pci_device_get_by_id(context, id):

    def _fake_compute_node_get_all(self, context):

    def _fake_pci_device_get_all_by_node(self, context, node):

    def test_index(self):

    def test_detail(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_quota_sets.py

class QuotaSetsTest(test.TestCase):

    def setUp(self):

    def _generate_quota_set(self, **kwargs):

    def _generate_detail_quota_set(self, **kwargs):

    def test_format_quota_set(self):

    def test_quotas_defaults(self):

    def test_quotas_show_as_admin(self):

    def test_quotas_show_as_unauthorized_user(self):

    def test_quotas_detail_as_admin(self):

    def test_quotas_detail_as_unauthorized_user(self):

    def test_quotas_update_as_admin(self):

    def test_quotas_update_zero_value_as_admin(self):

    def test_quotas_update_as_user(self):

    def test_quotas_update_invalid_key(self):

    def test_quotas_update_filtered_key(self):

    def test_quotas_update_invalid_limit(self):

    def test_quotas_update_invalid_value_json_fromat_empty_string(self):

    def test_quotas_update_invalid_value_non_int(self):

    def test_quotas_update_without_quota_set(self):

    def test_quotas_delete_as_unauthorized_user(self):

    def test_quotas_delete_as_admin(self):

    def test_quotas_update_exceed_in_used(self):

    def test_quotas_force_update_exceed_in_used(self):

    def test_user_quotas_show_as_admin(self):

    def test_user_quotas_show_as_unauthorized_user(self):

    def test_user_quotas_detail_as_admin(self):

    def test_user_quotas_detail_as_unauthorized_user(self):

    def test_user_quotas_update_as_admin(self):

    def test_user_quotas_update_as_user(self):

    def test_user_quotas_update_exceed_project(self):

    def test_user_quotas_delete_as_unauthorized_user(self):

    def test_user_quotas_delete_as_admin(self):

def fake_get_quotas(self, context, id, user_id=None, usages=False):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_remote_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_type_unavailable(self, _context, _instance, _console_type):

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

def fake_get_rdp_console_type_unavailable(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, expected_attrs=None, want_objects=False):

def fake_get_not_found(self, context, instance_uuid, **kwargs):

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_type_unavailable(self):

    def test_get_vnc_console_not_implemented(self):

    def test_get_spice_console(self):

    def test_get_spice_console_not_implemented(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_type_unavailable(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):

    def test_get_rdp_console_type_unavailable(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_rescue.py

def rescue(self, context, instance, rescue_password=None):

def unrescue(self, context, instance):

class RescueTest(test.NoDBTestCase):

    def setUp(self):

        def fake_compute_get(*args, **kwargs):

    def test_rescue_with_preset_password(self):

    def test_rescue_generates_password(self):

    def test_rescue_with_none(self):

    def test_rescue_with_empty_dict(self):

    def test_rescue_disable_password(self):

    def test_rescue_of_rescued_instance(self):

        def fake_rescue(*args, **kwargs):

    def test_unrescue(self):

    def test_unrescue_of_active_instance(self):

        def fake_unrescue(*args, **kwargs):

    def test_rescue_raises_unrescuable(self):

        def fake_rescue(*args, **kwargs):

    def test_rescue_with_invalid_property(self):

    def test_rescue_raises_not_implemented(self, rescue_mock):

        def fake_rescue(*args, **kwargs):

    def test_unrescue_raises_not_implemented(self, unrescue_mock):

        def fake_unrescue(*args, **kwargs):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_scheduler_hints.py

def fake_gen_uuid():

def return_security_group(context, instance_id, security_group_id):

class SchedulerHintsTestCase(test.TestCase):

    def setUp(self):

    def test_create_server_without_hints(self):

        def fake_create(*args, **kwargs):

    def test_create_server_with_hints(self):

        def fake_create(*args, **kwargs):

    def test_create_server_bad_hints(self):

class ServersControllerCreateTest(test.TestCase):

    def setUp(self):

        def instance_create(context, inst):

        def instance_get(context, instance_id):

        def instance_update(context, uuid, values):

        def server_update(context, instance_uuid, params):

        def fake_method(*args, **kwargs):

        def project_get_networks(context, user_id):

        def queue_get_for(context, *args):

    def _test_create_extra(self, params, no_image=False, override_controller=None):

    def test_create_instance_with_scheduler_hints_disabled(self):

        def create(*args, **kwargs):

    def test_create_instance_with_scheduler_hints_enabled(self):

        def create(*args, **kwargs):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_security_groups.py

def fake_gen_uuid():

def return_security_group(context, instance_id, security_group_id):

def fake_compute_get_all(*args, **kwargs):

def fake_compute_get(*args, **kwargs):

def fake_compute_create(*args, **kwargs):

def fake_get_instance_security_groups(*args, **kwargs):

def fake_get_instances_security_groups_bindings(inst, context, servers):

class SecurityGroupsOutputTest(test.TestCase):

    def setUp(self):

    def _make_request(self, url, body=None):

    def _encode_body(self, body):

    def _get_server(self, body):

    def _get_servers(self, body):

    def _get_groups(self, server):

    def test_create(self):

    def test_show(self):

    def test_detail(self):

    def test_no_instance_passthrough_404(self):

        def fake_compute_get(*args, **kwargs):

class ServersControllerCreateTest(test.TestCase):

    def setUp(self):

        def instance_create(context, inst):

        def instance_get(context, instance_id):

        def instance_update(context, uuid, values):

        def server_update(context, instance_uuid, params):

        def fake_method(*args, **kwargs):

        def project_get_networks(context, user_id):

        def queue_get_for(context, *args):

    def _test_create_extra(self, params, no_image=False, override_controller=None):

    def test_create_instance_with_security_group_enabled(self):

        def sec_group_get(ctx, proj, name):

        def create(*args, **kwargs):

    def test_create_instance_with_security_group_disabled(self):

        def create(*args, **kwargs):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_servers.py

def fake_gen_uuid():

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

def instance_update_and_get_original(context, instance_uuid, values, update_cells=True, columns_to_join=None, ):

def instance_update(context, instance_uuid, values, update_cells=True):

def fake_compute_api(cls, req, id):

def fake_start_stop_not_ready(self, context, instance):

def fake_start_stop_invalid_state(self, context, instance):

def fake_instance_get_by_uuid_not_found(context, uuid, columns_to_join, use_slave=False):

class MockSetAdminPassword(object):

    def __init__(self):

    def __call__(self, context, instance_id, password):

class Base64ValidationTest(test.TestCase):

    def setUp(self):

    def test_decode_base64(self):

    def test_decode_base64_binary(self):

    def test_decode_base64_whitespace(self):

    def test_decode_base64_invalid(self):

    def test_decode_base64_illegal_bytes(self):

class NeutronV2Subclass(neutron_api.API):

class ControllerTest(test.TestCase):

    def setUp(self):

class ServersControllerTest(ControllerTest):

    def setUp(self):

    def test_requested_networks_prefix(self):

    def test_requested_networks_neutronv2_enabled_with_port(self):

    def test_requested_networks_neutronv2_enabled_with_network(self):

    def test_requested_networks_neutronv2_enabled_with_network_and_port(self):

    def test_requested_networks_neutronv2_enabled_conflict_on_fixed_ip(self):

    def test_requested_networks_neutronv2_disabled_with_port(self):

    def test_requested_networks_api_enabled_with_v2_subclass(self):

    def test_requested_networks_neutronv2_subclass_with_port(self):

    def test_get_server_by_uuid(self):

    def test_get_server_joins_pci_devices(self):

        def fake_get(_self, *args, **kwargs):

    def test_unique_host_id(self):

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

    def _get_server_data_dict(self, uuid, image_bookmark, flavor_bookmark, status="ACTIVE", progress=100):

    def test_get_server_by_id(self):

    def test_get_server_with_active_status_by_id(self):

    def test_get_server_with_id_image_ref_by_id(self):

    def test_get_server_addresses_from_cache(self):

        def _ip(ip):

    def test_get_server_addresses_nonexistent_network(self):

    def test_get_server_addresses_nonexistent_server(self):

        def fake_instance_get(*args, **kwargs):

    def test_get_server_list_empty(self):

    def test_get_server_list_with_reservation_id(self):

    def test_get_server_list_with_reservation_id_empty(self):

    def test_get_server_list_with_reservation_id_details(self):

    def test_get_server_list(self):

    def test_get_servers_with_limit(self):

    def test_get_servers_with_limit_bad_value(self):

    def test_get_server_details_empty(self):

    def test_get_server_details_with_limit(self):

    def test_get_server_details_with_limit_bad_value(self):

    def test_get_server_details_with_limit_and_other_params(self):

    def test_get_servers_with_too_big_limit(self):

    def test_get_servers_with_bad_limit(self):

    def test_get_servers_with_marker(self):

    def test_get_servers_with_limit_and_marker(self):

    def test_get_servers_with_bad_marker(self):

    def test_get_servers_with_bad_option(self):

        def fake_get_all(compute_self, context, search_opts=None, sort_key=None, sort_dir='desc', limit=None, marker=None, want_objects=False, expected_attrs=[]):

    def test_get_servers_allows_image(self):

        def fake_get_all(compute_self, context, search_opts=None, sort_key=None, sort_dir='desc', limit=None, marker=None, want_objects=False, expected_attrs=[]):

    def test_tenant_id_filter_converts_to_project_id_for_admin(self):

        def fake_get_all(context, filters=None, sort_key=None, sort_dir='desc', limit=None, marker=None, columns_to_join=None, use_slave=False, expected_attrs=[]):

    def test_tenant_id_filter_no_admin_context(self):

        def fake_get_all(context, filters=None, sort_key=None, sort_dir='desc', limit=None, marker=None, columns_to_join=None, use_slave=False, expected_attrs=[]):

    def test_tenant_id_filter_implies_all_tenants(self):

        def fake_get_all(context, filters=None, sort_key=None, sort_dir='desc', limit=None, marker=None, columns_to_join=None, use_slave=False, expected_attrs=[]):

    def test_all_tenants_param_normal(self):

        def fake_get_all(context, filters=None, sort_key=None, sort_dir='desc', limit=None, marker=None, columns_to_join=None, use_slave=False, expected_attrs=[]):

    def test_all_tenants_param_one(self):

        def fake_get_all(context, filters=None, sort_key=None, sort_dir='desc', limit=None, marker=None, columns_to_join=None, use_slave=False, expected_attrs=[]):

    def test_all_tenants_param_zero(self):

        def fake_get_all(context, filters=None, sort_key=None, sort_dir='desc', limit=None, marker=None, columns_to_join=None, use_slave=False, expected_attrs=[]):

    def test_all_tenants_param_false(self):

        def fake_get_all(context, filters=None, sort_key=None, sort_dir='desc', limit=None, marker=None, columns_to_join=None, use_slave=False, expected_attrs=[]):

    def test_all_tenants_param_invalid(self):

        def fake_get_all(context, filters=None, sort_key=None, sort_dir='desc', limit=None, marker=None, columns_to_join=None, expected_attrs=[]):

    def test_admin_restricted_tenant(self):

        def fake_get_all(context, filters=None, sort_key=None, sort_dir='desc', limit=None, marker=None, columns_to_join=None, use_slave=False, expected_attrs=[]):

    def test_all_tenants_pass_policy(self):

        def fake_get_all(context, filters=None, sort_key=None, sort_dir='desc', limit=None, marker=None, columns_to_join=None, use_slave=False, expected_attrs=[]):

    def test_all_tenants_fail_policy(self):

        def fake_get_all(context, filters=None, sort_key=None, sort_dir='desc', limit=None, marker=None, columns_to_join=None):

    def test_get_servers_allows_flavor(self):

        def fake_get_all(compute_self, context, search_opts=None, sort_key=None, sort_dir='desc', limit=None, marker=None, want_objects=False, expected_attrs=[]):

    def test_get_servers_with_bad_flavor(self):

    def test_get_server_details_with_bad_flavor(self):

    def test_get_servers_allows_status(self):

        def fake_get_all(compute_self, context, search_opts=None, sort_key=None, sort_dir='desc', limit=None, marker=None, want_objects=False, expected_attrs=[]):

    def test_get_servers_allows_task_status(self):

        def fake_get_all(compute_self, context, search_opts=None, sort_key=None, sort_dir='desc', limit=None, marker=None, want_objects=False, expected_attrs=[]):

    def test_get_servers_resize_status(self):

        def fake_get_all(compute_self, context, search_opts=None, sort_key=None, sort_dir='desc', limit=None, marker=None, want_objects=False, expected_attrs=[]):

    def test_get_servers_invalid_status(self):

    def test_get_servers_deleted_status_as_user(self):

    def test_get_servers_deleted_status_as_admin(self):

        def fake_get_all(compute_self, context, search_opts=None, sort_key=None, sort_dir='desc', limit=None, marker=None, want_objects=False, expected_attrs=[]):

    def test_get_servers_allows_name(self):

        def fake_get_all(compute_self, context, search_opts=None, sort_key=None, sort_dir='desc', limit=None, marker=None, want_objects=False, expected_attrs=[]):

    def test_get_servers_allows_changes_since(self):

        def fake_get_all(compute_self, context, search_opts=None, sort_key=None, sort_dir='desc', limit=None, marker=None, want_objects=False, expected_attrs=[]):

    def test_get_servers_allows_changes_since_bad_value(self):

    def test_get_servers_admin_filters_as_user(self):

        def fake_get_all(compute_self, context, search_opts=None, sort_key=None, sort_dir='desc', limit=None, marker=None, want_objects=False, expected_attrs=[]):

    def test_get_servers_admin_options_as_admin(self):

        def fake_get_all(compute_self, context, search_opts=None, sort_key=None, sort_dir='desc', limit=None, marker=None, want_objects=False, expected_attrs=[]):

    def test_get_servers_allows_ip(self):

        def fake_get_all(compute_self, context, search_opts=None, sort_key=None, sort_dir='desc', limit=None, marker=None, want_objects=False, expected_attrs=[]):

    def test_get_servers_admin_allows_ip6(self):

        def fake_get_all(compute_self, context, search_opts=None, sort_key=None, sort_dir='desc', limit=None, marker=None, want_objects=False, expected_attrs=[]):

    def test_get_all_server_details(self):

    def test_get_all_server_details_with_host(self):

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

    def test_get_servers_joins_pci_devices(self):

        def fake_get_all(compute_self, context, search_opts=None, sort_key=None, sort_dir='desc', limit=None, marker=None, want_objects=False, expected_attrs=[]):

class ServersControllerDeleteTest(ControllerTest):

    def setUp(self):

        def instance_destroy_mock(*args, **kwargs):

    def _create_delete_request(self, uuid):

    def _delete_server_instance(self, uuid=FAKE_UUID):

    def test_delete_server_instance(self):

    def test_delete_server_instance_not_found(self):

    def test_delete_server_instance_while_building(self):

    def test_delete_locked_server(self):

    def test_delete_server_instance_while_resize(self):

    def test_delete_server_instance_if_not_launched(self):

        def instance_destroy_mock(*args, **kwargs):

class ServersControllerRebuildInstanceTest(ControllerTest):

    def setUp(self):

    def test_rebuild_instance_with_blank_metadata_key(self):

    def test_rebuild_instance_with_metadata_key_too_long(self):

    def test_rebuild_instance_with_metadata_value_too_long(self):

    def test_rebuild_instance_fails_when_min_ram_too_small(self):

        def fake_get_image(self, context, image_href):

    def test_rebuild_instance_fails_when_min_disk_too_small(self):

        def fake_get_image(self, context, image_href):

    def test_rebuild_instance_image_too_large(self):

        def fake_get_image(self, context, image_href):

    def test_rebuild_instance_name_all_blank(self):

        def fake_get_image(self, context, image_href):

    def test_rebuild_instance_with_deleted_image(self):

        def fake_get_image(self, context, image_href):

    def test_start(self):

    def test_start_policy_failed(self):

    def test_start_not_ready(self):

    def test_start_locked_server(self):

    def test_start_invalid(self):

    def test_stop(self):

    def test_stop_policy_failed(self):

    def test_stop_not_ready(self):

    def test_stop_locked_server(self):

    def test_stop_invalid_state(self):

    def test_start_with_bogus_id(self):

    def test_stop_with_bogus_id(self):

class ServersControllerUpdateTest(ControllerTest):

    def _get_request(self, body=None, options=None):

    def test_update_server_all_attributes(self):

    def test_update_server_name(self):

    def test_update_server_name_too_long(self):

    def test_update_server_name_all_blank_spaces(self):

    def test_update_server_adminPass_ignored(self):

        def server_update(context, id, params):

    def test_update_server_not_found(self):

        def fake_get(*args, **kwargs):

    def test_update_server_not_found_on_update(self):

        def fake_update(*args, **kwargs):

    def test_update_server_policy_fail(self):

class ServerStatusTest(test.TestCase):

    def setUp(self):

    def _get_with_state(self, vm_state, task_state=None):

    def test_active(self):

    def test_reboot(self):

    def test_reboot_hard(self):

    def test_reboot_resize_policy_fail(self):

        def fake_get_server(context, req, id):

    def test_rebuild(self):

    def test_rebuild_error(self):

    def test_resize(self):

    def test_confirm_resize_policy_fail(self):

        def fake_get_server(context, req, id):

    def test_verify_resize(self):

    def test_revert_resize(self):

    def test_revert_resize_policy_fail(self):

        def fake_get_server(context, req, id):

    def test_password_update(self):

    def test_stopped(self):

class ServersControllerCreateTest(test.TestCase):

    def setUp(self):

        def instance_create(context, inst):

        def instance_get(context, instance_id):

        def instance_update(context, uuid, values):

        def server_update(context, instance_uuid, params, update_cells=True):

        def server_update_and_get_original( context, instance_uuid, params, update_cells=False, columns_to_join=None):

        def fake_method(*args, **kwargs):

        def project_get_networks(context, user_id):

        def queue_get_for(context, *args):

    def _check_admin_password_len(self, server_dict):

    def _check_admin_password_missing(self, server_dict):

    def _test_create_instance(self, flavor=2):

    def test_create_instance_private_flavor(self):

    def test_create_server_bad_image_href(self):

    def test_create_server_with_deleted_image(self):

    def test_create_server_image_too_large(self):

    def test_create_instance_image_ref_is_bookmark(self):

    def test_create_instance_image_ref_is_invalid(self):

    def test_create_instance_no_key_pair(self):

    def _test_create_extra(self, params, no_image=False):

    def test_create_instance_with_port_with_no_fixed_ips(self):

        def fake_create(*args, **kwargs):

    def test_create_instance_with_network_with_no_subnet(self):

        def fake_create(*args, **kwargs):

    def test_create_instance_with_non_unique_secgroup_name(self):

        def fake_create(*args, **kwargs):

    def test_create_instance_with_networks_disabled_neutronv2(self):

        def create(*args, **kwargs):

    def test_create_instance_with_networks_disabled(self):

        def create(*args, **kwargs):

    def test_create_instance_with_pass_disabled(self):

    def test_create_instance_name_too_long(self):

    def test_create_instance_name_all_blank_spaces(self):

    def test_create_instance(self):

    def test_create_instance_extension_create_exception(self):

        def fake_keypair_server_create(self, server_dict, create_kwargs):

    def test_create_instance_pass_disabled(self):

    def test_create_instance_too_much_metadata(self):

    def test_create_instance_metadata_key_too_long(self):

    def test_create_instance_metadata_value_too_long(self):

    def test_create_instance_metadata_key_blank(self):

    def test_create_instance_metadata_not_dict(self):

    def test_create_instance_metadata_key_not_string(self):

    def test_create_instance_metadata_value_not_string(self):

    def test_create_user_data_malformed_bad_request(self):

    def test_create_instance_invalid_key_name(self):

    def test_create_instance_valid_key_name(self):

    def test_create_instance_invalid_flavor_href(self):

    def test_create_instance_invalid_flavor_id_int(self):

    def test_create_instance_bad_flavor_href(self):

    def test_create_instance_bad_href(self):

    def test_create_instance_local_href(self):

    def test_create_instance_admin_password(self):

    def test_create_instance_admin_password_pass_disabled(self):

    def test_create_instance_admin_password_empty(self):

    def test_create_location(self):

    def _do_test_create_instance_above_quota(self, resource, allowed, quota, expected_msg):

    def test_create_instance_above_quota_instances(self):

    def test_create_instance_above_quota_ram(self):

    def test_create_instance_above_quota_cores(self):

    def test_create_instance_with_neutronv2_port_in_use(self):

        def fake_create(*args, **kwargs):

    def test_create_multiple_instance_with_neutronv2_port(self):

        def fake_create(*args, **kwargs):

    def test_create_instance_with_neturonv2_not_found_network(self):

        def fake_create(*args, **kwargs):

    def test_create_instance_with_neutronv2_port_not_found(self):

        def fake_create(*args, **kwargs):

class ServersViewBuilderTest(test.TestCase):

    def setUp(self):

        def nw_info(*args, **kwargs):

        def floaters(*args, **kwargs):

    def test_get_flavor_valid_instance_type(self):

    def test_build_server(self):

    def test_build_server_with_project_id(self):

    def test_build_server_detail(self):

    def test_build_server_no_image(self):

    def test_build_server_detail_with_fault(self):

    def test_build_server_detail_with_fault_that_has_been_deleted(self):

    def test_build_server_detail_with_fault_no_details_not_admin(self):

    def test_build_server_detail_with_fault_admin(self):

    def test_build_server_detail_with_fault_no_details_admin(self):

    def test_build_server_detail_with_fault_but_active(self):

    def test_build_server_detail_active_status(self):

    def test_build_server_detail_with_metadata(self):

class ServersAllExtensionsTestCase(test.TestCase):

    def setUp(self):

    def test_create_missing_server(self):

        def fake_create(*args, **kwargs):

    def test_update_missing_server(self):

        def fake_update(*args, **kwargs):

class ServersInvalidRequestTestCase(test.TestCase):

    def setUp(self):

    def _invalid_server_create(self, body):

    def test_create_server_no_body(self):

    def test_create_server_missing_server(self):

    def test_create_server_malformed_entity(self):

    def _unprocessable_server_update(self, body):

    def test_update_server_no_body(self):

    def test_update_server_missing_server(self):

    def test_create_update_malformed_entity(self):

class FakeExt(extensions.V3APIExtensionBase):

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

    def get_controller_extensions(self):

    def get_resources(self):

class TestServersExtensionPoint(test.NoDBTestCase):

    def setUp(self):

    def _test_load_extension_point(self, name):

    def test_load_update_extension_point(self):

    def test_load_rebuild_extension_point(self):

    def test_load_create_extension_point(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_server_actions.py

def return_server_not_found(*arg, **kwarg):

def instance_update_and_get_original(context, instance_uuid, values, update_cells=True, columns_to_join=None, ):

def instance_update(context, instance_uuid, kwargs, update_cells=True):

class MockSetAdminPassword(object):

    def __init__(self):

    def __call__(self, context, instance, password):

class ServerActionsControllerTest(test.TestCase):

    def setUp(self):

    def _make_request(self, url, body):

    def _stub_instance_get(self, uuid=None):

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

    def test_actions_with_locked_instance(self):

    def test_reboot_hard(self):

    def test_reboot_soft(self):

    def test_reboot_incorrect_type(self):

    def test_reboot_missing_type(self):

    def test_reboot_none(self):

    def test_reboot_not_found(self):

    def test_reboot_raises_conflict_on_invalid_state(self):

        def fake_reboot(*args, **kwargs):

    def test_reboot_soft_with_soft_in_progress_raises_conflict(self):

    def test_reboot_hard_with_soft_in_progress_does_not_raise(self):

    def test_reboot_hard_with_hard_in_progress_raises_conflict(self):

    def test_rebuild_accepted_minimum(self):

    def test_rebuild_instance_with_image_uuid(self):

        def rebuild(self2, context, instance, image_href, *args, **kwargs):

    def test_rebuild_instance_with_image_href_uses_uuid(self):

        def rebuild(self2, context, instance, image_href, *args, **kwargs):

    def test_rebuild_accepted_minimum_pass_disabled(self):

    def test_rebuild_raises_conflict_on_invalid_state(self):

        def fake_rebuild(*args, **kwargs):

    def test_rebuild_accepted_with_metadata(self):

    def test_rebuild_accepted_with_bad_metadata(self):

    def test_rebuild_with_too_large_metadata(self):

    def test_rebuild_bad_entity(self):

    def test_rebuild_admin_password(self):

    def test_rebuild_admin_password_pass_disabled(self):

    def test_rebuild_server_not_found(self):

        def server_not_found(self, instance_id, columns_to_join=None, use_slave=False):

    def test_rebuild_with_bad_image(self):

    def test_rebuild_when_kernel_not_exists(self):

        def return_image_meta(*args, **kwargs):

    def test_rebuild_proper_kernel_ram(self):

        def wrap_get(*args, **kwargs):

        def fake_save(context, **kwargs):

        def return_image_meta(*args, **kwargs):

    def _test_rebuild_preserve_ephemeral(self, value=None):

    def test_rebuild_preserve_ephemeral_true(self):

    def test_rebuild_preserve_ephemeral_false(self):

    def test_rebuild_preserve_ephemeral_default(self):

    def test_resize_server(self):

        def resize_mock(*args):

    def test_resize_server_no_flavor(self):

    def test_resize_server_no_flavor_ref(self):

    def test_resize_with_server_not_found(self):

    def test_resize_with_image_exceptions(self):

        def _fake_resize(obj, context, instance, flavor_id):

    def test_resize_with_too_many_instances(self):

        def fake_resize(*args, **kwargs):

    def test_resize_raises_conflict_on_invalid_state(self):

        def fake_resize(*args, **kwargs):

    def test_confirm_resize_server(self):

        def cr_mock(*args):

    def test_confirm_resize_migration_not_found(self):

        def confirm_resize_mock(*args):

    def test_confirm_resize_raises_conflict_on_invalid_state(self):

        def fake_confirm_resize(*args, **kwargs):

    def test_revert_resize_migration_not_found(self):

        def revert_resize_mock(*args):

    def test_revert_resize_server_not_found(self):

    def test_revert_resize_server(self):

        def revert_mock(*args):

    def test_revert_resize_raises_conflict_on_invalid_state(self):

        def fake_revert_resize(*args, **kwargs):

    def test_create_image(self):

    def test_create_image_name_too_long(self):

    def _do_test_create_volume_backed_image(self, extra_properties):

        def _fake_id(x):

        def fake_block_device_mapping_get_all_by_instance(context, inst_id, use_slave=False):

    def test_create_volume_backed_image_no_metadata(self):

    def test_create_volume_backed_image_with_metadata(self):

    def test_create_volume_backed_image_with_metadata_from_volume(self):

        def _fake_id(x):

        def fake_block_device_mapping_get_all_by_instance(context, inst_id, use_slave=False):

    def test_create_image_snapshots_disabled(self):

    def test_create_image_with_metadata(self):

    def test_create_image_with_too_much_metadata(self):

    def test_create_image_no_name(self):

    def test_create_image_blank_name(self):

    def test_create_image_bad_metadata(self):

    def test_create_image_raises_conflict_on_invalid_state(self):

        def snapshot(*args, **kwargs):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_server_diagnostics.py

def fake_get_diagnostics(self, _context, instance_uuid):

def fake_instance_get(self, _context, instance_uuid, want_objects=False):

def fake_instance_get_instance_not_found(self, _context, instance_uuid, want_objects=False):

class ServerDiagnosticsTest(test.NoDBTestCase):

    def setUp(self):

    def test_get_diagnostics(self):

    def test_get_diagnostics_with_non_existed_instance(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_server_external_events.py

def fake_get_by_uuid(cls, context, uuid):

class ServerExternalEventsTest(test.NoDBTestCase):

    def setUp(self):

    def _create_req(self, body):

    def _assert_call(self, req, body, expected_uuids, expected_events):

    def test_create(self):

    def test_create_one_bad_instance(self):

    def test_create_no_good_instances(self):

    def test_create_bad_status(self):

    def test_create_extra_gorp(self):

    def test_create_bad_events(self):

    def test_create_bad_body(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_server_metadata.py

def return_create_instance_metadata_max(context, server_id, metadata, delete):

def return_create_instance_metadata(context, server_id, metadata, delete):

def fake_instance_save(inst, **kwargs):

def return_server_metadata(context, server_id):

def return_empty_server_metadata(context, server_id):

def delete_server_metadata(context, server_id, key):

def stub_server_metadata():

def stub_max_server_metadata():

def return_server(context, server_id, columns_to_join=None):

def return_server_by_uuid(context, server_uuid, columns_to_join=None, use_slave=False):

def return_server_nonexistent(context, server_id, columns_to_join=None, use_slave=False):

def fake_change_instance_metadata(self, context, instance, diff):

class BaseTest(test.TestCase):

    def setUp(self):

class ServerMetaDataTest(BaseTest):

    def test_index(self):

    def test_index_nonexistent_server(self):

    def test_index_no_data(self):

    def test_show(self):

    def test_show_nonexistent_server(self):

    def test_show_meta_not_found(self):

    def test_delete(self):

    def test_delete_nonexistent_server(self):

    def test_delete_meta_not_found(self):

    def test_create(self):

    def test_create_empty_body(self):

    def test_create_item_empty_key(self):

    def test_create_item_non_dict(self):

    def test_create_item_key_too_long(self):

    def test_create_nonexistent_server(self):

    def test_update_metadata(self):

    def test_update_all(self):

    def test_update_all_empty_container(self):

    def test_update_all_malformed_container(self):

    def test_update_all_malformed_data(self):

    def test_update_all_nonexistent_server(self):

    def test_update_item(self):

    def test_update_item_nonexistent_server(self):

    def test_update_item_empty_body(self):

    def test_update_item_empty_key(self):

    def test_update_item_key_too_long(self):

    def test_update_item_value_too_long(self):

    def test_update_item_too_many_keys(self):

    def test_update_item_body_uri_mismatch(self):

    def test_update_item_non_dict(self):

    def test_too_many_metadata_items_on_create(self):

    def test_create_item_value_too_long(self):

    def test_too_many_metadata_items_on_update_item(self):

    def test_invalid_metadata_items_on_update_item(self):

class BadStateServerMetaDataTest(BaseTest):

    def setUp(self):

    def test_invalid_state_on_delete(self):

    def test_invalid_state_on_update_metadata(self):

    def _return_server_in_build(self, context, server_id, columns_to_join=None):

    def _return_server_in_build_by_uuid(self, context, server_uuid, columns_to_join=None, use_slave=False):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_server_password.py

class ServerPasswordTest(test.TestCase):

    def setUp(self):

        def fake_extract_password(instance):

        def fake_convert_password(context, password):

    def _make_request(self, url, method='GET'):

    def _get_pass(self, body):

    def test_get_password(self):

    def test_reset_password(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_server_usage.py

def fake_compute_get(*args, **kwargs):

def fake_compute_get_all(*args, **kwargs):

class ServerUsageTest(test.TestCase):

    def setUp(self):

    def _make_request(self, url):

    def _get_server(self, body):

    def _get_servers(self, body):

    def assertServerUsage(self, server, launched_at, terminated_at):

    def test_show(self):

    def test_detail(self):

    def test_no_instance_passthrough_404(self):

        def fake_compute_get(*args, **kwargs):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_services.py

class FakeRequest(object):

class FakeRequestWithService(object):

class FakeRequestWithHost(object):

class FakeRequestWithHostService(object):

    def service_get_all(context, filters=None, set_zones=False):

def fake_db_api_service_get_all(context, disabled=None):

def fake_db_service_get_by_host_binary(services):

    def service_get_by_host_binary(context, host, binary):

def fake_service_get_by_host_binary(context, host, binary):

def _service_get_by_id(services, value):

def fake_db_service_update(services):

    def service_update(context, service_id, values):

def fake_service_update(context, service_id, values):

def fake_utcnow():

def fake_utcnow_ts():

class ServicesTest(test.TestCase):

    def setUp(self):

    def test_services_list(self):

    def test_service_list_with_host(self):

    def test_service_list_with_service(self):

    def test_service_list_with_host_service(self):

    def test_services_enable(self):

        def _service_update(context, service_id, values):

    def test_services_enable_with_invalid_host(self):

    def test_services_enable_with_invalid_binary(self):

    def test_services_with_exception(self):

        def dummy_is_up(self, dummy):

    def test_services_disable(self):

    def test_services_disable_with_invalid_host(self):

    def test_services_disable_with_invalid_binary(self):

    def test_services_disable_log_reason(self):

    def test_mandatory_reason_field(self):

    def test_invalid_reason_field(self):

    def test_services_delete(self):

    def test_services_delete_not_found(self):

class ServicesCellsTest(test.TestCase):

    def setUp(self):

    def test_services_detail(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\plugins\v3\test_shelve.py

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

def fake_auth_context(context):

class ShelvePolicyTest(test.NoDBTestCase):

    def setUp(self):

    def test_shelve_restricted_by_role(self):

    def test_shelve_allowed(self):

    def test_shelve_locked_server(self):

    def test_unshelve_restricted_by_role(self):

    def test_unshelve_allowed(self):

OpenStack Index

Previous

Next