@

Home 

OpenStack Study: nova

OpenStack Index

Previous

Next

    def test_unshelve_locked_server(self):

    def test_shelve_offload_restricted_by_role(self):

    def test_shelve_offload_allowed(self):

    def test_shelve_offload_locked_server(self):

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

class SuspendServerTests(admin_only_action_common.CommonTests):

    def setUp(self):

        def _fake_controller(*args, **kwargs):

    def test_suspend_resume(self):

    def test_suspend_resume_with_non_existed_instance(self):

    def test_suspend_resume_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_user_data.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):

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

        def create(*args, **kwargs):

    def test_create_instance_with_user_data_enabled(self):

        def create(*args, **kwargs):

    def test_create_instance_with_user_data(self):

    def test_create_instance_with_bad_user_data(self):

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

class VersionsTest(test.NoDBTestCase):

    def test_get_version_list_302(self):

    def test_get_version_3_detail(self):

    def test_get_version_3_versions_v3_detail(self):

    def test_get_version_3_versions_v2_detail(self):

    def test_get_version_3_versions_invalid(self):

    def test_get_version_3_detail_content_type(self):

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

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

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\test_api.py

class APITest(test.NoDBTestCase):

    def _wsgi_app(self, inner_app):

    def test_malformed_json(self):

    def test_malformed_xml(self):

    def test_vendor_content_type_json(self):

    def test_vendor_content_type_xml(self):

    def test_exceptions_are_converted_to_faults_webob_exc(self):

        def raise_webob_exc(req):

    def test_exceptions_are_converted_to_faults_api_fault(self):

        def raise_api_fault(req):

    def test_exceptions_are_converted_to_faults_exception(self):

        def fail(req):

    def test_exceptions_are_converted_to_faults_exception_xml(self):

        def fail(req):

    def _do_test_exception_safety_reflected_in_faults(self, expose):

        def fail(req):

    def test_safe_exceptions_are_described_in_faults(self):

    def test_unsafe_exceptions_are_not_described_in_faults(self):

    def _do_test_exception_mapping(self, exception_type, msg):

        def fail(req):

    def test_quota_error_mapping(self):

    def test_non_nova_notfound_exception_mapping(self):

    def test_non_nova_exception_mapping(self):

    def test_exception_with_none_code_throws_500(self):

        def fail(req):

    def test_request_id_in_response(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\test_auth.py

class TestNoAuthMiddleware(test.NoDBTestCase):

    def setUp(self):

    def test_authorize_user(self):

    def test_authorize_user_trailing_slash(self):

    def test_auth_token_no_empty_headers(self):

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

class FakeInstanceDB(object):

    def __init__(self):

    def return_server_by_id(self, context, id):

    def return_server_by_uuid(self, context, uuid):

    def _add_server(self, id=None, uuid=None):

def stub_instance(id, user_id='fake', project_id='fake', host=None, vm_state=None, task_state=None, reservation_id="", uuid=FAKE_UUID, image_ref="10", flavor_id="1", name=None, key_name='', access_ipv4=None, access_ipv6=None, progress=0):

class ConsolesControllerTest(test.NoDBTestCase):

    def setUp(self):

    def test_create_console(self):

        def fake_create_console(cons_self, context, instance_id):

    def test_show_console(self):

        def fake_get_console(cons_self, context, instance_id, console_id):

    def test_show_console_unknown_console(self):

        def fake_get_console(cons_self, context, instance_id, console_id):

    def test_show_console_unknown_instance(self):

        def fake_get_console(cons_self, context, instance_id, console_id):

    def test_list_consoles(self):

        def fake_get_consoles(cons_self, context, instance_id):

    def test_delete_console(self):

        def fake_get_console(cons_self, context, instance_id, console_id):

        def fake_delete_console(cons_self, context, instance_id, console_id):

    def test_delete_console_unknown_console(self):

        def fake_delete_console(cons_self, context, instance_id, console_id):

    def test_delete_console_unknown_instance(self):

        def fake_delete_console(cons_self, context, instance_id, console_id):

class TestConsolesXMLSerializer(test.NoDBTestCase):

    def test_show(self):

    def test_index(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\test_extensions.py

class StubController(object):

    def __init__(self, body):

    def index(self, req):

    def create(self, req, body):

    def show(self, req, id):

class StubActionController(wsgi.Controller):

    def __init__(self, body):

    def _action_foo(self, req, id, body):

class StubControllerExtension(base_extensions.ExtensionDescriptor):

    def __init__(self):

class StubEarlyExtensionController(wsgi.Controller):

    def __init__(self, body):

    def index(self, req):

    def _action_foo(self, req, id, body):

class StubLateExtensionController(wsgi.Controller):

    def __init__(self, body):

    def index(self, req, resp_obj):

    def _action_foo(self, req, resp_obj, id, body):

class StubExtensionManager(object):

    def __init__(self, resource_ext=None, action_ext=None, request_ext=None, controller_ext=None):

    def get_resources(self):

    def get_actions(self):

    def get_request_extensions(self):

    def get_controller_extensions(self):

class ExtensionTestCase(test.TestCase):

    def setUp(self):

    def test_extension_authorizer_throws_exception_if_policy_fails(self):

    def test_core_authorizer_throws_exception_if_policy_fails(self):

class ExtensionControllerTest(ExtensionTestCase):

    def setUp(self):

    def test_list_extensions_json(self):

    def test_get_extension_json(self):

    def test_get_non_existing_extension_json(self):

    def test_list_extensions_xml(self):

    def test_get_extension_xml(self):

class ResourceExtensionTest(ExtensionTestCase):

    def test_no_extension_present(self):

    def test_get_resources(self):

    def test_get_resources_with_controller(self):

    def test_bad_request(self):

    def test_non_exist_resource(self):

class InvalidExtension(object):

class ExtensionManagerTest(ExtensionTestCase):

    def test_get_resources(self):

    def test_invalid_extensions(self):

class ActionExtensionTest(ExtensionTestCase):

    def _send_server_action_request(self, url, body):

    def test_extended_action(self):

    def test_invalid_action(self):

    def test_non_exist_action(self):

    def test_failed_action(self):

class RequestExtensionTest(ExtensionTestCase):

    def test_get_resources_with_stub_mgr(self):

    def test_get_resources_with_mgr(self):

class ControllerExtensionTest(ExtensionTestCase):

    def test_controller_extension_early(self):

    def test_controller_extension_late(self):

    def test_controller_extension_late_inherited_resource(self):

    def test_controller_action_extension_early(self):

    def test_controller_action_extension_late(self):

class ExtensionsXMLSerializerTest(test.TestCase):

    def test_serialize_extension(self):

    def test_serialize_extensions(self):

class ExtensionControllerIdFormatTest(test.TestCase):

    def _bounce_id(self, test_id):

    def test_id_with_xml_format(self):

    def test_id_with_json_format(self):

    def test_id_with_bad_format(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\test_flavors.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):

 def reject_min(db_attr, filter_attr):

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

def return_flavor_not_found(flavor_id, ctxt=None):

class FlavorsTest(test.TestCase):

    def setUp(self):

    def test_get_flavor_by_invalid_id(self):

    def test_get_flavor_by_id(self):

    def test_get_flavor_with_custom_link_prefix(self):

    def test_get_flavor_list(self):

    def test_get_flavor_list_with_marker(self):

    def test_get_flavor_list_with_invalid_marker(self):

    def test_get_flavor_detail_with_limit(self):

    def test_get_flavor_with_limit(self):

    def test_get_flavor_list_detail(self):

    def test_get_empty_flavor_list(self):

    def test_get_flavor_list_filter_min_ram(self):

    def test_get_flavor_list_filter_invalid_min_ram(self):

    def test_get_flavor_list_filter_min_disk(self):

    def test_get_flavor_list_filter_invalid_min_disk(self):

    def test_get_flavor_list_detail_min_ram_and_min_disk(self):

class FlavorsXMLSerializationTest(test.TestCase):

    def test_xml_declaration(self):

    def test_show(self):

    def test_show_handles_integers(self):

    def test_detail(self):

    def test_index(self):

    def test_index_empty(self):

class DisabledFlavorsWithRealDBTest(test.TestCase):

    def setUp(self):

    def tearDown(self):

    def _create_disabled_instance_type(self):

    def test_index_should_not_list_disabled_flavors_to_user(self):

    def test_index_should_list_disabled_flavors_to_admin(self):

    def test_show_should_include_disabled_flavor_for_user(self):

    def test_show_should_include_disabled_flavor_for_admin(self):

class ParseIsPublicTest(test.TestCase):

    def setUp(self):

    def assertPublic(self, expected, is_public):

    def test_None(self):

    def test_truthy(self):

    def test_falsey(self):

    def test_string_none(self):

    def test_other(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\test_images.py

class ImagesControllerTest(test.NoDBTestCase):

    def setUp(self):

    def test_get_image(self):

    def test_get_image_with_custom_prefix(self):

    def test_get_image_404(self):

    def test_get_image_details(self):

    def test_get_image_details_with_limit(self):

    def test_get_image_details_with_limit_and_page_size(self):

    def _detail_request(self, filters, request):

    def test_image_detail_filter_with_name(self):

    def test_image_detail_filter_with_status(self):

    def test_image_detail_filter_with_property(self):

    def test_image_detail_filter_server_href(self):

    def test_image_detail_filter_server_uuid(self):

    def test_image_detail_filter_changes_since(self):

    def test_image_detail_filter_with_type(self):

    def test_image_detail_filter_not_supported(self):

    def test_image_detail_no_filters(self):

    def test_image_detail_invalid_marker(self):

    def test_generate_alternate_link(self):

    def test_delete_image(self):

    def test_delete_deleted_image(self):

    def test_delete_image_not_found(self):

class ImageXMLSerializationTest(test.NoDBTestCase):

    def test_xml_declaration(self):

    def test_show(self):

    def test_show_zero_metadata(self):

    def test_show_image_no_metadata_key(self):

    def test_show_no_server(self):

    def test_show_with_min_ram(self):

    def test_show_with_min_disk(self):

    def test_index(self):

    def test_index_with_links(self):

    def test_index_zero_images(self):

    def test_detail(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\test_image_metadata.py

class ImageMetaDataTest(test.TestCase):

    def setUp(self):

    def test_index(self):

    def test_show(self):

    def test_show_not_found(self):

    def test_show_image_not_found(self):

    def test_create(self):

    def test_create_image_not_found(self):

    def test_update_all(self):

    def test_update_all_image_not_found(self):

    def test_update_item(self):

    def test_update_item_image_not_found(self):

    def test_update_item_bad_body(self):

    def test_update_item_too_many_keys(self):

    def test_update_item_body_uri_mismatch(self):

    def test_delete(self):

    def test_delete_not_found(self):

    def test_delete_image_not_found(self):

    def test_too_many_metadata_items_on_create(self):

    def test_too_many_metadata_items_on_put(self):

    def test_image_not_authorized_update(self):

    def test_image_not_authorized_update_all(self):

    def test_image_not_authorized_create(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\test_limits.py

class BaseLimitTestSuite(test.NoDBTestCase):

    def setUp(self):

        def stub_get_project_quotas(context, project_id, usages=True):

    def _get_time(self):

class LimitsControllerTest(BaseLimitTestSuite):

    def setUp(self):

    def _get_index_request(self, accept_header="application/json"):

    def _populate_limits(self, request):

    def test_empty_index_json(self):

    def test_index_json(self):

    def _populate_limits_diff_regex(self, request):

    def test_index_diff_regex(self):

    def _test_index_absolute_limits_json(self, expected):

    def test_index_ignores_extra_absolute_limits_json(self):

    def test_index_absolute_ram_json(self):

    def test_index_absolute_cores_json(self):

    def test_index_absolute_instances_json(self):

    def test_index_absolute_metadata_json(self):

    def test_index_absolute_injected_files(self):

    def test_index_absolute_security_groups(self):

    def test_limit_create(self):

    def test_limit_delete(self):

    def test_limit_detail(self):

    def test_limit_show(self):

    def test_limit_update(self):

class MockLimiter(limits.Limiter):

class LimitMiddlewareTest(BaseLimitTestSuite):

    def _empty_app(self, request):

    def setUp(self):

    def test_limit_class(self):

    def test_good_request(self):

    def test_limited_request_json(self):

    def test_limited_request_xml(self):

class LimitTest(BaseLimitTestSuite):

    def test_GET_no_delay(self):

    def test_GET_delay(self):

class ParseLimitsTest(BaseLimitTestSuite):

    def test_invalid(self):

    def test_bad_rule(self):

    def test_missing_arg(self):

    def test_bad_value(self):

    def test_bad_unit(self):

    def test_multiple_rules(self):

class LimiterTest(BaseLimitTestSuite):

    def setUp(self):

    def _check(self, num, verb, url, username=None):

    def _check_sum(self, num, verb, url, username=None):

    def test_no_delay_GET(self):

    def test_no_delay_PUT(self):

    def test_delay_PUT(self):

    def test_delay_POST(self):

    def test_delay_GET(self):

    def test_delay_PUT_servers(self):

    def test_delay_PUT_wait(self):

    def test_multiple_delays(self):

    def test_user_limit(self):

    def test_multiple_users(self):

class WsgiLimiterTest(BaseLimitTestSuite):

    def setUp(self):

    def _request_data(self, verb, path):

    def _request(self, verb, url, username=None):

    def test_invalid_methods(self):

    def test_good_url(self):

    def test_escaping(self):

    def test_response_to_delays(self):

    def test_response_to_delays_usernames(self):

class FakeHttplibSocket(object):

    def __init__(self, response_string):

    def makefile(self, _mode, _other):

class FakeHttplibConnection(object):

    def __init__(self, app, host):

    def request(self, method, path, body="", headers=None):

    def getresponse(self):

        def __init__(self, wrapped):

        def __call__(self, connection_host, *args, **kwargs):

class WsgiLimiterProxyTest(BaseLimitTestSuite):

    def setUp(self):

    def test_200(self):

    def test_403(self):

    def tearDown(self):

class LimitsViewBuilderTest(test.NoDBTestCase):

    def setUp(self):

    def test_build_limits(self):

    def test_build_limits_empty_limits(self):

class LimitsXMLSerializationTest(test.NoDBTestCase):

    def test_xml_declaration(self):

    def test_index(self):

    def test_index_no_limits(self):

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

def fake_gen_uuid():

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

def return_security_group(context, instance_id, security_group_id):

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):

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_can_check_loaded_extensions(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_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_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):

    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):

    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):

    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):

    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):

    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):

    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):

    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):

    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):

    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):

    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):

    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):

    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):

    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):

    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):

    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):

    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):

    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):

    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):

    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):

    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):

    def test_get_all_server_details(self):

    def test_get_all_server_details_with_host(self):

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

class ServersControllerUpdateTest(ControllerTest):

    def _get_request(self, body=None, content_type='json', options=None):

    def test_update_server_all_attributes(self):

    def test_update_server_invalid_xml_raises_lookup(self):

    def test_update_server_invalid_xml_raises_expat(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_access_ipv4(self):

    def test_update_server_access_ipv4_bad_format(self):

    def test_update_server_access_ipv4_none(self):

    def test_update_server_access_ipv4_blank(self):

    def test_update_server_access_ipv6(self):

    def test_update_server_access_ipv6_bad_format(self):

    def test_update_server_access_ipv6_none(self):

    def test_update_server_access_ipv6_blank(self):

    def test_update_server_personality(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 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_locked_server(self):

    def test_delete_server_instance_while_building(self):

    def test_delete_server_instance_while_deleting_host_up(self):

        def fake_get_by_compute_host(cls, context, host):

    def test_delete_server_instance_while_deleting_host_down(self):

        def fake_get_by_compute_host(cls, context, host):

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

        def fake_get_image(self, context, image_href):

    def test_rebuild_instance_with_access_ipv6_bad_format(self):

class ServerStatusTest(test.TestCase):

    def setUp(self):

        def _fake_get_server(context, req, id):

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

    def _req_with_policy_fail(self, policy_rule_name):

    def test_active(self):

    def test_reboot(self):

    def test_reboot_hard(self):

    def test_reboot_resize_policy_fail(self):

    def test_rebuild(self):

    def test_rebuild_error(self):

    def test_resize(self):

    def test_confirm_resize_policy_fail(self):

    def test_verify_resize(self):

    def test_revert_resize(self):

    def test_revert_resize_policy_fail(self):

    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=False):

        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_pass_len(self, server_dict):

    def _check_admin_pass_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_invalid_networks_parameter(self):

    def test_create_server_with_deleted_image(self):

    def test_create_server_image_too_large(self):

    def test_create_instance_invalid_negative_min(self):

    def test_create_instance_invalid_negative_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 test_create_multiple_instances_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):

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

        def sec_group_get(ctx, proj, name):

        def create(*args, **kwargs):

    def test_create_instance_with_non_unique_secgroup_name(self):

        def fake_create(*args, **kwargs):

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

    def test_create_instance_with_access_ip_pass_disabled(self):

    def test_create_instance_bad_format_access_ip_v4(self):

    def test_create_instance_bad_format_access_ip_v6(self):

    def test_create_instance_name_all_blank_spaces(self):

    def test_create_instance_name_too_long(self):

    def test_create_instance(self):

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

    def test_create_instance_with_bad_config_drive(self):

    def test_create_instance_without_config_drive(self):

    def test_create_instance_with_config_drive_disabled(self):

        def create(*args, **kwargs):

    def test_create_instance_bad_href(self):

    def test_create_instance_local_href(self):

    def test_create_instance_admin_pass(self):

    def test_create_instance_admin_pass_pass_disabled(self):

    def test_create_instance_admin_pass_empty(self):

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

    def test_create_instance_with_security_group_disabled(self):

        def create(*args, **kwargs):

    def test_create_instance_with_disk_config_enabled(self):

        def create(*args, **kwargs):

    def test_create_instance_with_disk_config_disabled(self):

        def create(*args, **kwargs):

    def test_create_instance_with_scheduler_hints_enabled(self):

        def create(*args, **kwargs):

    def test_create_instance_with_scheduler_hints_disabled(self):

        def create(*args, **kwargs):

    def test_create_instance_with_volumes_enabled(self):

        def create(*args, **kwargs):

        def _validate_bdm(*args, **kwargs):

    def test_create_instance_with_volumes_enabled_no_image(self):

        def create(*args, **kwargs):

    def test_create_instance_with_bdm_v2_enabled_no_image(self):

        def create(*args, **kwargs):

    def test_create_instance_with_volumes_enabled_and_bdms_no_image(self):

        def create(*args, **kwargs):

        def _validate_bdm(*args, **kwargs):

    def test_create_instance_with_bdm_v2_enabled_and_bdms_no_image(self):

        def create(*args, **kwargs):

    def test_create_instance_with_volumes_disabled(self):

        def create(*args, **kwargs):

    def test_create_instance_with_device_name_not_string(self):

        def create(*args, **kwargs):

    def test_create_instance_with_device_name_empty(self):

        def create(*args, **kwargs):

    def test_create_instance_with_device_name_too_long(self):

        def create(*args, **kwargs):

    def test_create_instance_with_space_in_device_name(self):

        def create(*args, **kwargs):

    def test_create_instance_with_invalid_size(self):

        def create(*args, **kwargs):

    def test_create_instance_bdm_api_validation_fails(self):

        def _validate_bdm(*args, **kwargs):

        def _instance_destroy(*args, **kwargs):

    def test_create_instance_with_bdm_delete_on_termination(self):

        def create(*args, **kwargs):

        def _validate_bdm(*args, **kwargs):

    def test_create_instance_bdm_v2(self):

        def create(*args, **kwargs):

        def _validate_bdm(*args, **kwargs):

    def test_create_instance_decide_format_legacy(self):

        def create(*args, **kwargs):

        def _validate_bdm(*args, **kwargs):

    def test_create_instance_decide_format_new(self):

        def create(*args, **kwargs):

        def _validate_bdm(*args, **kwargs):

    def test_create_instance_both_bdm_formats(self):

    def test_create_instance_bdm_v2_validation_error(self):

        def _validate(*args, **kwargs):

    def test_create_instance_with_user_data_enabled(self):

        def create(*args, **kwargs):

    def test_create_instance_with_user_data_disabled(self):

        def create(*args, **kwargs):

    def test_create_instance_with_keypairs_enabled(self):

        def key_pair_get(context, user_id, name):

        def create(*args, **kwargs):

    def test_create_instance_with_keypairs_disabled(self):

        def create(*args, **kwargs):

    def test_create_instance_with_availability_zone_enabled(self):

        def create(*args, **kwargs):

    def test_create_instance_with_availability_zone_disabled(self):

        def create(*args, **kwargs):

    def test_create_instance_with_multiple_create_enabled(self):

        def create(*args, **kwargs):

    def test_create_instance_with_multiple_create_disabled(self):

        def create(*args, **kwargs):

    def test_create_instance_with_networks_enabled(self):

        def create(*args, **kwargs):

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

    def test_create_multiple_instance_with_neutronv2_port(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_invalid_personality(self):

        def fake_create(*args, **kwargs):

    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):

class TestServerCreateRequestXMLDeserializer(test.TestCase):

    def setUp(self):

    def test_minimal_request(self):

    def test_request_with_alternate_namespace_prefix(self):

    def test_request_with_scheduler_hints_and_alternate_namespace_prefix(self):

    def test_access_ipv4(self):

    def test_access_ipv6(self):

    def test_access_ip(self):

    def test_admin_pass(self):

    def test_image_link(self):

    def test_flavor_link(self):

    def test_empty_metadata_personality(self):

    def test_multiple_metadata_items(self):

    def test_multiple_personality_files(self):

    def test_spec_request(self):

    def test_request_with_empty_networks(self):

    def test_request_with_one_network(self):

    def test_request_with_two_networks(self):

    def test_request_with_second_network_node_ignored(self):

    def test_request_with_one_network_missing_id(self):

    def test_request_with_one_network_missing_fixed_ip(self):

    def test_request_with_one_network_empty_id(self):

    def test_request_with_one_network_empty_fixed_ip(self):

    def test_request_with_networks_duplicate_ids(self):

    def test_request_with_availability_zone(self):

    def test_request_with_multiple_create_args(self):

    def test_request_with_disk_config(self):

    def test_request_with_scheduler_hints(self):

    def test_request_with_block_device_mapping(self):

    def test_request_with_config_drive(self):

    def test_corrupt_xml(self):

class TestServerActionRequestXMLDeserializer(test.TestCase):

    def setUp(self):

    def _generate_request(self, action, disk_cfg, ref):

    def _generate_expected(self, action, ref):

    def test_rebuild_request(self):

    def test_rebuild_request_auto_disk_config_compat(self):

    def test_resize_request(self):

    def test_resize_request_auto_disk_config_compat(self):

class TestAddressesXMLSerialization(test.TestCase):

    def _serializer_test_data(self):

    def test_xml_declaration(self):

    def test_show(self):

    def test_index(self):

class ServersViewBuilderTest(test.TestCase):

    def setUp(self):

        def nw_info(*args, **kwargs):

        def floaters(*args, **kwargs):

    def test_get_flavor_valid_flavor(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_accessipv4(self):

    def test_build_server_detail_with_accessipv6(self):

    def test_build_server_detail_with_metadata(self):

class ServerXMLSerializationTest(test.TestCase):

    def setUp(self):

    def _validate_xml(self, root, server_dict):

    def _validate_required_attributes(self, root, server_dict, attributes):

    def test_xml_declaration(self):

    def test_show(self):

    def test_create(self):

    def test_index(self):

    def test_index_with_servers_links(self):

    def test_detail(self):

    def test_update(self):

    def test_action(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 ServersUnprocessableEntityTestCase(test.TestCase):

    def setUp(self):

    def _unprocessable_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):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\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_server_change_password(self):

    def test_server_change_password_pass_disabled(self):

    def test_server_change_password_not_a_string(self):

    def test_server_change_password_bad_request(self):

    def test_server_change_password_empty_string(self):

    def test_server_change_password_none(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_preserve_ephemeral_is_ignored_when_ext_not_loaded(self):

    def _test_rebuild_preserve_ephemeral(self, value=None):

        def fake_is_loaded(ext):

    def test_rebuild_preserve_ephemeral_true(self):

    def test_rebuild_preserve_ephemeral_false(self):

    def test_rebuild_preserve_ephemeral_default(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_bad_personality(self):

    def test_rebuild_personality(self):

    def test_rebuild_admin_pass(self):

    def test_rebuild_admin_pass_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_accessIP(self):

        def wrap_get(*args, **kwargs):

        def fake_save(context, **kwargs):

    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_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):

class TestServerActionXMLDeserializer(test.TestCase):

    def setUp(self):

    def test_create_image(self):

    def test_create_image_with_metadata(self):

    def test_change_pass(self):

    def test_change_pass_no_pass(self):

    def test_change_pass_empty_pass(self):

    def test_reboot(self):

    def test_reboot_no_type(self):

    def test_resize(self):

    def test_resize_no_flavor_ref(self):

    def test_confirm_resize(self):

    def test_revert_resize(self):

    def test_rebuild(self):

    def test_rebuild_minimum(self):

    def test_rebuild_no_imageRef(self):

    def test_rebuild_blank_name(self):

    def test_rebuild_preserve_ephemeral_passed(self):

    def test_corrupt_xml(self):

\OpenStack\nova-2014.1\nova\tests\api\openstack\compute\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_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):

OpenStack Index

Previous

Next