OpenStack Study: neutron
OpenStack IndexPreviousNext
def test_service_plugin_is_loaded(self):
def test_service_plugin_by_name_is_loaded(self):
def test_multiple_plugins_specified_for_service_type(self):
def test_multiple_plugins_by_name_specified_for_service_type(self):
def test_multiple_plugins_mixed_specified_for_service_type(self):
def test_service_plugin_conflicts_with_core_plugin(self):
def test_core_plugin_supports_services(self):
def test_post_plugin_validation(self):
def test_pre_plugin_validation(self):
def test_manager_gathers_agent_notifiers_from_service_plugins(self):
\OpenStack\neutron-2014.1\neutron\tests\unit\test_policy.py
class PolicyFileTestCase(base.BaseTestCase):
def setUp(self):
def test_modified_policy_reloads(self):
def fake_find_config_file(_1, _2):
class PolicyTestCase(base.BaseTestCase):
def setUp(self):
def test_enforce_nonexistent_action_throws(self):
def test_enforce_bad_action_throws(self):
def test_check_bad_action_noraise(self):
def test_check_if_exists_non_existent_action_raises(self):
def test_enforce_good_action(self):
def test_enforce_http_true(self):
def fakeurlopen(url, post_data):
def test_enforce_http_false(self):
def fakeurlopen(url, post_data):
def test_templatized_enforcement(self):
def test_early_AND_enforcement(self):
def test_early_OR_enforcement(self):
def test_ignore_case_role_check(self):
class DefaultPolicyTestCase(base.BaseTestCase):
def setUp(self):
def _set_rules(self, default_rule):
def test_policy_called(self):
def test_not_found_policy_calls_default(self):
def test_default_not_found(self):
class NeutronPolicyTestCase(base.BaseTestCase):
def setUp(self):
def fakepolicyinit():
def remove_fake_resource():
def _test_action_on_attr(self, context, action, attr, value, exception=None):
def _test_nonadmin_action_on_attr(self, action, attr, value, exception=None):
def test_nonadmin_write_on_private_fails(self):
def test_nonadmin_read_on_private_fails(self):
def test_nonadmin_write_on_shared_fails(self):
def test_nonadmin_read_on_shared_succeeds(self):
def _test_enforce_adminonly_attribute(self, action):
def test_enforce_adminonly_attribute_create(self):
def test_enforce_adminonly_attribute_update(self):
def test_enforce_adminonly_attribute_no_context_is_admin_policy(self):
def test_enforce_adminonly_attribute_nonadminctx_returns_403(self):
def test_enforce_adminonly_nonadminctx_no_ctx_is_admin_policy_403(self):
def _test_build_subattribute_match_rule(self, validate_value):
def test_build_subattribute_match_rule_empty_dict_validator(self):
def test_build_subattribute_match_rule_wrong_validation_info(self):
def test_enforce_subattribute(self):
def test_enforce_admin_only_subattribute(self):
def test_enforce_admin_only_subattribute_nonadminctx_returns_403(self):
def test_enforce_regularuser_on_read(self):
def test_enforce_firewall_policy_shared(self):
def test_enforce_firewall_rule_shared(self):
def test_enforce_tenant_id_check(self):
def test_enforce_tenant_id_check_parent_resource(self):
def fakegetnetwork(*args, **kwargs):
def test_enforce_plugin_failure(self):
def fakegetnetwork(*args, **kwargs):
def test_enforce_tenant_id_check_parent_resource_bw_compatibility(self):
def fakegetnetwork(*args, **kwargs):
def test_tenant_id_check_no_target_field_raises(self):
def _test_enforce_tenant_id_raises(self, bad_rule):
def test_enforce_tenant_id_check_malformed_target_field_raises(self):
def test_enforce_tenant_id_check_invalid_parent_resource_raises(self):
def test_get_roles_context_is_admin_rule_missing(self):
def test_get_roles_with_role_check(self):
def test_get_roles_with_rule_check(self):
def test_get_roles_with_or_check(self):
def test_get_roles_with_other_rules(self):
def _test_set_rules_with_deprecated_policy(self, input_rules, expected_rules):
def test_set_rules_with_deprecated_view_policy(self):
def test_set_rules_with_deprecated_set_policy(self):
\OpenStack\neutron-2014.1\neutron\tests\unit\test_post_mortem_debug.py
class TestTesttoolsExceptionHandler(base.BaseTestCase):
def test_exception_handler(self):
class TestFilteredTraceback(base.BaseTestCase):
def test_filter_traceback(self):
class TestGetIgnoredTraceback(base.BaseTestCase):
def _test_get_ignored_traceback(self, ignored_bit_array, expected):
def test_no_ignored_tracebacks(self):
def test_single_member_trailing_chain(self):
def test_two_member_trailing_chain(self):
def test_first_traceback_ignored(self):
def test_middle_traceback_ignored(self):
\OpenStack\neutron-2014.1\neutron\tests\unit\test_provider_configuration.py
class ParseServiceProviderConfigurationTestCase(base.BaseTestCase):
def test_default_service_provider_configuration(self):
def test_parse_single_service_provider_opt(self):
def test_parse_single_default_service_provider_opt(self):
def test_parse_multi_service_provider_opt(self):
def test_parse_service_provider_opt_not_allowed_raises(self):
def test_parse_service_provider_invalid_format(self):
def test_parse_service_provider_name_too_long(self):
class ProviderConfigurationTestCase(base.BaseTestCase):
def setUp(self):
def test_ensure_driver_unique(self):
def test_ensure_default_unique(self):
def test_add_provider(self):
def test_add_duplicate_provider(self):
def test_get_service_providers(self):
def test_get_service_providers_with_fields(self):
\OpenStack\neutron-2014.1\neutron\tests\unit\test_quota_ext.py
class QuotaExtensionTestCase(testlib_api.WebTestCase):
def setUp(self):
def tearDown(self):
class QuotaExtensionDbTestCase(QuotaExtensionTestCase):
def setUp(self):
def test_quotas_loaded_right(self):
def test_quotas_default_values(self):
def test_show_quotas_with_admin(self):
def test_show_quotas_without_admin_forbidden_returns_403(self):
def test_show_quotas_with_owner_tenant(self):
def test_list_quotas_with_admin(self):
def test_list_quotas_without_admin_forbidden_returns_403(self):
def test_update_quotas_without_admin_forbidden_returns_403(self):
def test_update_quotas_with_non_integer_returns_400(self):
def test_update_quotas_with_negative_integer_returns_400(self):
def test_update_quotas_to_unlimited(self):
def test_update_quotas_exceeding_current_limit(self):
def test_update_quotas_with_non_support_resource_returns_400(self):
def test_update_quotas_with_admin(self):
def test_update_attributes(self):
def test_delete_quotas_with_admin(self):
def test_delete_quotas_without_admin_forbidden_returns_403(self):
def test_quotas_loaded_bad_returns_404(self):
def test_quotas_limit_check(self):
def test_quotas_limit_check_with_invalid_quota_value(self):
def test_quotas_get_tenant_from_request_context(self):
def test_quotas_get_tenant_from_empty_request_context_returns_400(self):
class QuotaExtensionDbTestCaseXML(QuotaExtensionDbTestCase):
class QuotaExtensionCfgTestCase(QuotaExtensionTestCase):
def setUp(self):
def test_quotas_default_values(self):
def test_show_quotas_with_admin(self):
def test_show_quotas_without_admin_forbidden(self):
def test_update_quotas_forbidden(self):
def test_delete_quotas_forbidden(self):
class QuotaExtensionCfgTestCaseXML(QuotaExtensionCfgTestCase):
class TestDbQuotaDriver(base.BaseTestCase):
def test_get_tenant_quotas_arg(self):
class TestQuotaDriverLoad(base.BaseTestCase):
def setUp(self):
def _test_quota_driver(self, cfg_driver, loaded_driver, with_quota_db_module=True):
def test_quota_db_driver_with_quotas_table(self):
def test_quota_db_driver_fallback_conf_driver(self):
def test_quota_conf_driver(self):
\OpenStack\neutron-2014.1\neutron\tests\unit\test_routerserviceinsertion.py
class RouterServiceInsertionTestPlugin(
rst_db.RouterServiceTypeDbMixin,
rsi_db.RoutedServiceInsertionDbMixin,
st_db.ServiceTypeManager,
lb_db.LoadBalancerPluginDb,
l3_db.L3_NAT_db_mixin,
db_base_plugin_v2.NeutronDbPluginV2):
def create_router(self, context, router):
def get_router(self, context, id, fields=None):
def delete_router(self, context, id):
def create_resource(self, res, context, resource, model):
def get_resource(self, res, context, id, fields, model):
def delete_resource(self, res, context, id, model):
def create_pool(self, context, pool):
def get_pool(self, context, id, fields=None):
def delete_pool(self, context, id):
def create_health_monitor(self, context, health_monitor):
def get_health_monitor(self, context, id, fields=None):
def delete_health_monitor(self, context, id):
def create_vip(self, context, vip):
def get_vip(self, context, id, fields=None):
def delete_vip(self, context, id):
def stats(self, context, pool_id):
class RouterServiceInsertionTestCase(base.BaseTestCase):
def setUp(self):
def tearDown(self):
def _setup_core_resources(self):
def _do_request(self, method, path, data=None, params=None, action=None):
def _router_create(self, service_type_id=None):
def test_router_create_no_service_type_id(self):
def test_router_create_with_service_type_id(self):
def test_router_get(self):
def _test_router_update(self, update_service_type_id):
def test_router_update_with_service_type_id(self):
def test_router_update_without_service_type_id(self):
def test_router_delete(self):
def _test_lb_setup(self):
def _test_pool_setup(self):
def _test_health_monitor_setup(self):
def _test_vip_setup(self):
def _create_resource(self, res, data):
def _pool_create(self, router_id=None):
def _pool_update_attrs(self, pool):
def _health_monitor_create(self, router_id=None):
def _health_monitor_update_attrs(self, hm):
def _vip_create(self, router_id=None):
def _vip_update_attrs(self, vip):
def _test_resource_create(self, res):
def _test_resource_update(self, res, update_router_id, update_attr, update_value):
def _test_resource_delete(self, res, with_router_id):
def test_pool_create(self):
def test_pool_update_with_router_id(self):
def test_pool_update_without_router_id(self):
def test_pool_delete_with_router_id(self):
def test_pool_delete_without_router_id(self):
def test_health_monitor_create(self):
def test_health_monitor_update_with_router_id(self):
def test_health_monitor_update_without_router_id(self):
def test_health_monitor_delete_with_router_id(self):
def test_health_monitor_delete_without_router_id(self):
def test_vip_create(self):
def test_vip_update_with_router_id(self):
def test_vip_update_without_router_id(self):
def test_vip_delete_with_router_id(self):
def test_vip_delete_without_router_id(self):
\OpenStack\neutron-2014.1\neutron\tests\unit\test_security_groups_rpc.py
class FakeSGCallback(sg_db_rpc.SecurityGroupServerRpcCallbackMixin):
def get_port_from_device(self, device):
class SGServerRpcCallBackMixinTestCase(test_sg.SecurityGroupDBTestCase):
def setUp(self, plugin=None):
def test_security_group_rules_for_devices_ipv4_ingress(self):
def test_security_group_rules_for_devices_ipv4_ingress_addr_pair(self):
def test_security_group_rules_for_devices_ipv4_egress(self):
def test_security_group_rules_for_devices_ipv4_source_group(self):
def test_security_group_rules_for_devices_ipv6_ingress(self):
def test_security_group_rules_for_devices_ipv6_egress(self):
def test_security_group_rules_for_devices_ipv6_source_group(self):
class SGServerRpcCallBackMixinTestCaseXML(SGServerRpcCallBackMixinTestCase):
class SGAgentRpcCallBackMixinTestCase(base.BaseTestCase):
def setUp(self):
def test_security_groups_rule_updated(self):
def test_security_groups_member_updated(self):
def test_security_groups_provider_updated(self):
class SecurityGroupAgentRpcTestCaseForNoneDriver(base.BaseTestCase):
def test_init_firewall_with_none_driver(self):
class SecurityGroupAgentRpcTestCase(base.BaseTestCase):
def setUp(self, defer_refresh_firewall=False):
def test_prepare_and_remove_devices_filter(self):
def test_security_groups_rule_updated(self):
def test_security_groups_rule_not_updated(self):
def test_security_groups_member_updated(self):
def test_security_groups_member_not_updated(self):
def test_security_groups_provider_updated(self):
def test_refresh_firewall(self):
def test_refresh_firewall_devices(self):
def test_refresh_firewall_none(self):
class SecurityGroupAgentRpcWithDeferredRefreshTestCase(
SecurityGroupAgentRpcTestCase):
def setUp(self):
def add_fake_device(self, device, sec_groups, source_sec_groups=None):
def test_security_groups_rule_updated(self):
def test_multiple_security_groups_rule_updated_same_port(self):
def test_security_groups_rule_updated_multiple_ports(self):
def test_multiple_security_groups_rule_updated_multiple_ports(self):
def test_security_groups_member_updated(self):
def test_multiple_security_groups_member_updated_same_port(self):
def test_security_groups_member_updated_multiple_ports(self):
def test_multiple_security_groups_member_updated_multiple_ports(self):
def test_security_groups_provider_updated(self):
def test_setup_port_filters_new_ports_only(self):
def test_setup_port_filters_updated_ports_only(self):
def test_setup_port_filter_new_and_updated_ports(self):
def test_setup_port_filters_sg_updates_only(self):
def test_setup_port_filters_sg_updates_and_new_ports(self):
def test_setup_port_filters_sg_updates_and_updated_ports(self):
def test_setup_port_filters_all_updates(self):
def test_setup_port_filters_no_update(self):
def test_setup_port_filters_with_global_refresh(self):
class FakeSGRpcApi(agent_rpc.PluginApi,
sg_rpc.SecurityGroupServerRpcApiMixin):
class SecurityGroupServerRpcApiTestCase(base.BaseTestCase):
def setUp(self):
def test_security_group_rules_for_devices(self):
class FakeSGNotifierAPI(proxy.RpcProxy,
sg_rpc.SecurityGroupAgentRpcApiMixin):
class SecurityGroupAgentRpcApiTestCase(base.BaseTestCase):
def setUp(self):
def test_security_groups_rule_updated(self):
def test_security_groups_member_updated(self):
def test_security_groups_rule_not_updated(self):
def test_security_groups_member_not_updated(self):
def set_firewall_driver(firewall_driver):
class TestSecurityGroupAgentWithIptables(base.BaseTestCase):
def setUp(self, defer_refresh_firewall=False):
def _device(self, device, ip, mac_address, rule):
def _regex(self, value):
def _register_mock_call(self, *args, **kwargs):
def _verify_mock_calls(self):
def _replay_iptables(self, v4_filter, v6_filter):
def test_prepare_remove_port(self):
def test_security_group_member_updated(self):
def test_security_group_rule_updated(self):
class SGNotificationTestMixin():
def test_security_group_rule_updated(self):
def test_security_group_member_updated(self):
class TestSecurityGroupAgentWithOVSIptables(
TestSecurityGroupAgentWithIptables):
def _regex(self, value):
class TestSecurityGroupExtensionControl(base.BaseTestCase):
def test_disable_security_group_extension_by_config(self):
def test_enable_security_group_extension_by_config(self):
def test_is_invalid_drvier_combination_sg_enabled(self):
def test_is_invalid_drvier_combination_sg_enabled_with_none(self):
def test_is_invalid_drvier_combination_sg_disabled(self):
def test_is_valid_drvier_combination_sg_enabled(self):
def test_is_valid_drvier_combination_sg_disabled(self):
def test_is_valid_drvier_combination_sg_disabled_with_none(self):
\OpenStack\neutron-2014.1\neutron\tests\unit\test_servicetype.py
class ServiceTypeManagerTestCase(base.BaseTestCase):
def setUp(self):
def test_service_provider_driver_not_unique(self):
def test_get_service_providers(self):
def test_multiple_default_providers_specified_for_service(self):
def test_get_default_provider(self):
def test_add_resource_association(self):
def test_invalid_resource_association(self):
class TestServiceTypeExtensionManager(object):
def get_resources(self):
def get_actions(self):
def get_request_extensions(self):
class ServiceTypeExtensionTestCaseBase(testlib_api.WebTestCase):
def setUp(self):
class ServiceTypeExtensionTestCase(ServiceTypeExtensionTestCaseBase):
def setUp(self):
def test_service_provider_list(self):
class ServiceTypeExtensionTestCaseXML(ServiceTypeExtensionTestCase):
class ServiceTypeManagerExtTestCase(ServiceTypeExtensionTestCaseBase):
def setUp(self):
def _list_service_providers(self):
def test_list_service_providers(self):
class ServiceTypeManagerExtTestCaseXML(ServiceTypeManagerExtTestCase):
\OpenStack\neutron-2014.1\neutron\tests\unit\test_wsgi.py
class TestWSGIServer(base.BaseTestCase):
def test_start_random_port(self):
def test_start_multiple_workers(self, ProcessLauncher):
def test_start_random_port_with_ipv6(self):
def test_ipv6_listen_called_with_scope(self):
def test_app(self):
def hello_world(env, start_response):
class SerializerTest(base.BaseTestCase):
def test_serialize_unknown_content_type(self):
def test_get_deserialize_handler_unknown_content_type(self):
def test_serialize_content_type_json(self):
def test_serialize_content_type_xml(self):
def test_deserialize_raise_bad_request(self):
def test_deserialize_json_content_type(self):
def test_deserialize_xml_content_type(self):
def test_deserialize_xml_content_type_with_meta(self):
def test_serialize_xml_root_key_is_dict(self):
def test_serialize_xml_root_key_is_list(self):
def test_serialize_xml_root_is_None(self):
class RequestDeserializerTest(testtools.TestCase):
def setUp(self):
def test_get_deserializer(self):
def test_get_expected_content_type(self):
def test_get_action_args(self):
def test_deserialize(self):
def test_get_body_deserializer_unknown_content_type(self):
class ResponseSerializerTest(testtools.TestCase):
def setUp(self):
def test_serialize_unknown_content_type(self):
def test_get_body_serializer(self):
def test_get_serializer(self):
def test_serialize_json_response(self):
def test_serialize_xml_response(self):
def test_serialize_response_None(self):
class RequestTest(base.BaseTestCase):
def test_content_type_missing(self):
def test_content_type_unsupported(self):
def test_content_type_with_charset(self):
def test_content_type_with_given_content_types(self):
def test_content_type_from_accept(self):
def test_content_type_from_query_extension(self):
def test_content_type_accept_and_query_extension(self):
def test_content_type_accept_default(self):
def test_content_type_accept_with_given_content_types(self):
class ActionDispatcherTest(base.BaseTestCase):
def test_dispatch(self):
def test_dispatch_action_None(self):
def test_dispatch_default(self):
class ResponseHeadersSerializerTest(base.BaseTestCase):
def test_default(self):
def test_custom(self):
class DictSerializerTest(base.BaseTestCase):
def test_dispatch_default(self):
class JSONDictSerializerTest(base.BaseTestCase):
def test_json(self):
def test_json_with_utf8(self):
def test_json_with_unicode(self):
class TextDeserializerTest(base.BaseTestCase):
def test_dispatch_default(self):
class JSONDeserializerTest(base.BaseTestCase):
def test_json(self):
def test_default_raise_Malformed_Exception(self):
def test_json_with_utf8(self):
def test_json_with_unicode(self):
class XMLDeserializerTest(base.BaseTestCase):
def test_xml_empty(self):
def test_initialization(self):
def test_default_raise_Malformed_Exception(self):
def test_xml_with_utf8(self):
class RequestHeadersDeserializerTest(base.BaseTestCase):
def test_default(self):
def test_custom(self):
class ResourceTest(base.BaseTestCase):
def test_dispatch(self):
def my_fault_body_function():
def test_dispatch_unknown_controller_action(self):
def my_fault_body_function():
def test_malformed_request_body_throws_bad_request(self):
def my_fault_body_function():
def test_wrong_content_type_throws_unsupported_media_type_error(self):
def my_fault_body_function():
def test_wrong_content_type_server_error(self):
def my_fault_body_function():
def test_call_resource_class_bad_request(self):
def my_fault_body_function():
def test_type_error(self):
def my_fault_body_function():
def test_call_resource_class_internal_error(self):
def my_fault_body_function():
class MiddlewareTest(base.BaseTestCase):
def test_process_response(self):
def application(environ, start_response):
class FaultTest(base.BaseTestCase):
def test_call_fault(self):
class XMLDictSerializerTest(base.BaseTestCase):
def test_xml(self):
def test_None(self):
def test_empty_dic_xml(self):
def test_non_root_one_item_dic_xml(self):
def test_non_root_two_items_dic_xml(self):
def test_xml_root_key_is_list(self):
def test_xml_meta_contains_node_name_list(self):
def test_xml_meta_contains_node_name_dict(self):
def test_call(self):
def test_xml_with_utf8(self):
def test_xml_with_unicode(self):
class TestWSGIServerWithSSL(base.BaseTestCase):
def test_app_using_ssl(self):
def hello_world(req):
def test_app_using_ipv6_and_ssl(self):
def hello_world(req):
\OpenStack\neutron-2014.1\neutron\tests\unit\vmware\apiclient\fake.py
def _validate_name(name):
def _validate_resource(body):
class FakeClient:
def __init__(self, fake_files_path):
def _get_tag(self, resource, scope):
def _get_filters(self, querystring):
def _add_lswitch(self, body):
def _build_lrouter(self, body, uuid=None):
def _add_lrouter(self, body):
def _add_lqueue(self, body):
def _add_lswitch_lport(self, body, ls_uuid):
def _build_lrouter_lport(self, body, new_uuid=None, lr_uuid=None):
def _add_lrouter_lport(self, body, lr_uuid):
def _add_securityprofile(self, body):
def _add_lrouter_nat(self, body, lr_uuid):
def _add_gatewayservice(self, body):
def _build_relation(self, src, dst, resource_type, relation):
def _fill_attachment(self, att_data, ls_uuid=None, lr_uuid=None, lp_uuid=None):
def populate_field(field_name):
def _get_resource_type(self, path):
def _list(self, resource_type, response_file, parent_uuid=None, query=None, relations=None):
def _show(self, resource_type, response_file, uuid1, uuid2=None, relations=None):
def handle_get(self, url):
def handle_post(self, url, body):
def handle_put(self, url, body):
def handle_delete(self, url):
def fake_request(self, *args, **kwargs):
def reset_all(self):
\OpenStack\neutron-2014.1\neutron\tests\unit\vmware\apiclient\test_api_common.py
class ApiCommonTest(base.BaseTestCase):
def test_ctrl_conn_to_str(self):
\OpenStack\neutron-2014.1\neutron\tests\unit\vmware\apiclient\test_api_eventlet_request.py
def fetch(url):
class ApiRequestEventletTest(base.BaseTestCase):
def setUp(self):
def tearDown(self):
def test_construct_eventlet_api_request(self):
def test_apirequest_spawn(self):
def x(id):
def test_apirequest_start(self):
def test_join_with_handle_request(self):
def test_join_without_handle_request(self):
def test_copy(self):
def test_request_error(self):
def test_run_and_handle_request(self):
def test_run_and_timeout(self):
def my_handle_request(self):
def prep_issue_request(self):
def test_issue_request_trigger_exception(self):
def test_issue_request_handle_none_sock(self):
def test_issue_request_exceed_maximum_retries(self):
def test_issue_request_trigger_non_redirect(self):
def test_issue_request_trigger_internal_server_error(self):
def test_redirect_params_break_on_location(self):
def test_redirect_params_parse_a_url(self):
def test_redirect_params_invalid_redirect_location(self):
def test_redirect_params_invalid_scheme(self):
def test_redirect_params_setup_https_with_cooki(self):
def test_redirect_params_setup_htttps_and_query(self):
def test_redirect_params_setup_https_connection_no_cookie(self):
def test_redirect_params_setup_https_and_query_no_cookie(self):
def test_redirect_params_path_only_with_query(self):
def test_handle_request_auto_login(self):
def test_handle_request_auto_login_unauth(self):
def test_construct_eventlet_login_request(self):
def test_session_cookie_session_cookie_retrieval(self):
def test_session_cookie_not_retrieved(self):
def test_construct_eventlet_get_api_providers_request(self):
def test_api_providers_none_api_providers(self):
def test_api_providers_non_none_api_providers(self):
\OpenStack\neutron-2014.1\neutron\tests\unit\vmware\apiclient\__init__.py
\OpenStack\neutron-2014.1\neutron\tests\unit\vmware\db\test_lsn_db.py
class LSNTestCase(base.BaseTestCase):
def setUp(self):
def test_lsn_add(self):
def test_lsn_remove(self):
def test_lsn_remove_for_network(self):
def test_lsn_get_for_network(self):
def test_lsn_get_for_network_raise_not_found(self):
def test_lsn_port_add(self):
def test_lsn_port_get_for_mac(self):
def test_lsn_port_get_for_mac_raise_not_found(self):
def test_lsn_port_get_for_subnet(self):
def test_lsn_port_get_for_subnet_raise_not_found(self):
def test_lsn_port_remove(self):
\OpenStack\neutron-2014.1\neutron\tests\unit\vmware\db\test_nsx_db.py
class NsxDBTestCase(base.BaseTestCase):
def setUp(self):
def _setup_neutron_network_and_port(self, network_id, port_id):
def test_add_neutron_nsx_port_mapping_handle_duplicate_constraint(self):
def test_add_neutron_nsx_port_mapping_raise_on_duplicate_constraint(self):
def test_add_neutron_nsx_port_mapping_raise_integrity_constraint(self):
\OpenStack\neutron-2014.1\neutron\tests\unit\vmware\db\__init__.py
\OpenStack\neutron-2014.1\neutron\tests\unit\vmware\extensions\test_addresspairs.py
class TestAllowedAddressPairs(test_nsx_plugin.NsxPluginV2TestCase,
ext_pairs.TestAllowedAddressPairs):
\OpenStack\neutron-2014.1\neutron\tests\unit\vmware\extensions\test_maclearning.py
class MacLearningExtensionManager(object):
def get_resources(self):
def get_actions(self):
def get_request_extensions(self):
class MacLearningDBTestCase(test_db_plugin.NeutronDbPluginV2TestCase):
def setUp(self):
def restore_resource_attribute_map(self):
def test_create_with_mac_learning(self):
def test_create_and_show_port_without_mac_learning(self):
def test_update_port_with_mac_learning(self):
def test_update_preexisting_port_with_mac_learning(self):
def test_list_ports(self):
def test_show_port(self):
\OpenStack\neutron-2014.1\neutron\tests\unit\vmware\extensions\test_networkgw.py
class TestExtensionManager(object):
def get_resources(self):
def get_actions(self):
def get_request_extensions(self):
class NetworkGatewayExtensionTestCase(base.BaseTestCase):
def setUp(self):
def test_network_gateway_create(self):
def _test_network_gateway_create_with_error( self, data, error_code=exc.HTTPBadRequest.code):
def test_network_gateway_create_invalid_device_spec(self):
def test_network_gateway_create_extra_attr_in_device_spec(self):
def test_network_gateway_update(self):
def test_network_gateway_delete(self):
def test_network_gateway_get(self):
def test_network_gateway_list(self):
def test_network_gateway_connect(self):
def test_network_gateway_disconnect(self):
def test_gateway_device_get(self):
def test_gateway_device_list(self):
def test_gateway_device_create(self):
def _test_gateway_device_create_with_error( self, data, error_code=exc.HTTPBadRequest.code):
def test_gateway_device_create_invalid_connector_type(self):
def test_gateway_device_create_invalid_connector_ip(self):
def test_gateway_device_create_extra_attr_in_device_spec(self):
def test_gateway_device_update(self):
def test_gateway_device_delete(self):
class NetworkGatewayDbTestCase(test_db_plugin.NeutronDbPluginV2TestCase):
def setUp(self, plugin=None, ext_mgr=None):
def _create_network_gateway(self, fmt, tenant_id, name=None, devices=None, arg_list=None, **kwargs):
def _network_gateway(self, name='gw1', devices=None, fmt='json', tenant_id=_uuid()):
def _create_gateway_device(self, fmt, tenant_id, connector_type, connector_ip, client_certificate, name=None, set_context=False):
def _update_gateway_device(self, fmt, gateway_device_id, connector_type=None, connector_ip=None, client_certificate=None, name=None, set_context=False, tenant_id=None):
def _gateway_device(self, name='gw_dev', connector_type='stt', connector_ip='1.1.1.1', client_certificate='xxxxxxxxxxxxxxx', fmt='json', tenant_id=_uuid()):
def _gateway_action(self, action, network_gateway_id, network_id, segmentation_type, segmentation_id=None, expected_status=exc.HTTPOk.code):
def _test_connect_and_disconnect_network(self, segmentation_type, segmentation_id=None):
def test_create_network_gateway(self):
def test_create_network_gateway_no_interface_name(self):
def test_delete_network_gateway(self):
def test_update_network_gateway(self):
def test_get_network_gateway(self):
def test_list_network_gateways(self):
def _test_list_network_gateway_with_multiple_connections( self, expected_gateways=1):
def test_list_network_gateway_with_multiple_connections(self):
def test_connect_and_disconnect_network(self):
def test_connect_and_disconnect_network_no_seg_type(self):
def test_connect_and_disconnect_network_with_segmentation_id(self):
def test_connect_network_multiple_times(self):
def test_connect_network_multiple_gateways(self):
def test_connect_network_mapping_in_use_returns_409(self):
def test_connect_invalid_network_returns_400(self):
def test_connect_unspecified_network_returns_400(self):
def test_disconnect_network_ambiguous_returns_409(self):
def test_delete_active_gateway_port_returns_409(self):
def test_delete_network_gateway_active_connections_returns_409(self):
def test_disconnect_non_existing_connection_returns_404(self):
def test_create_gateway_device( self, expected_status=networkgw_db.STATUS_UNKNOWN):
def test_get_gateway_device( self, expected_status=networkgw_db.STATUS_UNKNOWN):
def test_update_gateway_device( self, expected_status=networkgw_db.STATUS_UNKNOWN):
def test_delete_gateway_device(self):
class TestNetworkGateway(NsxPluginV2TestCase,
NetworkGatewayDbTestCase):
def setUp(self, plugin=PLUGIN_NAME, ext_mgr=None):
def test_create_network_gateway_name_exceeds_40_chars(self):
def test_update_network_gateway_with_name_calls_backend(self):
def test_update_network_gateway_without_name_does_not_call_backend(self):
def test_update_network_gateway_name_exceeds_40_chars(self):
def test_create_network_gateway_nsx_error_returns_500(self):
def raise_nsx_api_exc(*args, **kwargs):
def test_create_network_gateway_nsx_error_returns_409(self):
def test_list_network_gateways(self):
def test_list_network_gateway_with_multiple_connections(self):
def test_show_network_gateway_nsx_error_returns_404(self):
def test_create_gateway_device(self):
def test_create_gateway_device_status_down(self):
def test_create_gateway_device_invalid_cert_returns_400(self):
def test_get_gateway_device(self):
def test_get_gateway_device_status_down(self):
def test_update_gateway_device(self):
def test_update_gateway_device_status_down(self):
def test_update_gateway_device_invalid_cert_returns_400(self):
class TestNetworkGatewayPlugin(db_base_plugin_v2.NeutronDbPluginV2,
networkgw_db.NetworkGatewayMixin):
def __init__(self, **args):
def delete_port(self, context, id, nw_gw_port_check=True):
\OpenStack\neutron-2014.1\neutron\tests\unit\vmware\extensions\test_portsecurity.py
class PortSecurityTestCase(psec.PortSecurityDBTestCase):
def setUp(self):
class TestPortSecurity(PortSecurityTestCase, psec.TestPortSecurity):
\OpenStack\neutron-2014.1\neutron\tests\unit\vmware\extensions\test_providernet.py
class TestProvidernet(NsxPluginV2TestCase):
def test_create_provider_network_default_physical_net(self):
def test_create_provider_network(self):
class TestMultiProviderNetworks(NsxPluginV2TestCase):
def setUp(self, plugin=None):
def test_create_network_provider(self):
def test_create_network_single_multiple_provider(self):
def test_create_network_multprovider(self):
def test_create_network_with_provider_and_multiprovider_fail(self):
def test_create_network_duplicate_segments(self):
\OpenStack\neutron-2014.1\neutron\tests\unit\vmware\extensions\test_qosqueues.py
class QoSTestExtensionManager(object):
def get_resources(self):
def get_actions(self):
def get_request_extensions(self):
class TestQoSQueue(NsxPluginV2TestCase):
def setUp(self, plugin=None):
def _create_qos_queue(self, fmt, body, **kwargs):
def qos_queue(self, name='foo', min='0', max='10', qos_marking=None, dscp='0', default=None, no_delete=False):
def test_create_qos_queue(self):
def test_create_trusted_qos_queue(self):
def test_create_qos_queue_name_exceeds_40_chars(self):
def test_create_qos_queue_default(self):
def test_create_qos_queue_two_default_queues_fail(self):
def test_create_port_with_queue(self):
def test_create_shared_queue_networks(self):
def test_remove_queue_in_use_fail(self):
def test_update_network_new_queue(self):
def test_update_port_adding_device_id(self):
def test_get_port_with_qos_not_admin(self):
def test_dscp_value_out_of_range(self):
def test_non_admin_cannot_create_queue(self):
def test_update_port_non_admin_does_not_show_queue_id(self):
def test_rxtx_factor(self):
\OpenStack\neutron-2014.1\neutron\tests\unit\vmware\extensions\__init__.py
\OpenStack\neutron-2014.1\neutron\tests\unit\vmware\nsxlib\base.py
class NsxlibTestCase(base.BaseTestCase):
def setUp(self):
def _build_tag_dict(self, tags):
class NsxlibNegativeBaseTestCase(base.BaseTestCase):
def setUp(self):
def _faulty_request(*args, **kwargs):
\OpenStack\neutron-2014.1\neutron\tests\unit\vmware\nsxlib\test_l2gateway.py
class L2GatewayNegativeTestCase(base.NsxlibNegativeBaseTestCase):
def test_create_l2_gw_service_on_failure(self):
def test_delete_l2_gw_service_on_failure(self):
def test_get_l2_gw_service_on_failure(self):
def test_update_l2_gw_service_on_failure(self):
class L2GatewayTestCase(base.NsxlibTestCase):
def _create_gw_service(self, node_uuid, display_name, tenant_id='fake_tenant'):
def test_create_l2_gw_service(self):
def test_update_l2_gw_service(self):
def test_get_l2_gw_service(self):
def test_list_l2_gw_service(self):
def test_list_l2_gw_service_by_tenant(self):
def test_delete_l2_gw_service(self):
def test_plug_l2_gw_port_attachment(self):
def _create_expected_req_body(self, display_name, neutron_id, connector_type, connector_ip, client_certificate):
def test_create_gw_device(self):
def test_update_gw_device(self):
def test_update_gw_device_without_certificate(self):
def test_get_gw_device_status(self):
def test_get_gw_devices_status(self):
def test_get_gw_devices_status_filter_by_tenant(self):
def test_delete_gw_device(self):
\OpenStack\neutron-2014.1\neutron\tests\unit\vmware\nsxlib\test_lsn.py
class LSNTestCase(base.BaseTestCase):
def setUp(self):
def test_service_cluster_None(self):
def test_service_cluster_found(self):
def test_service_cluster_not_found(self):
def test_lsn_for_network_create(self):
def test_lsn_for_network_get(self):
def test_lsn_for_network_get_none(self):
def test_lsn_for_network_get_raise_not_found(self):
def test_lsn_delete(self):
def _test_lsn_port_host_entries_update(self, lsn_type, hosts_data):
def test_lsn_port_dhcp_entries_update(self):
def test_lsn_port_metadata_entries_update(self):
def test_lsn_port_create(self):
def test_lsn_port_delete(self):
def test_lsn_port_get_with_filters(self):
def test_lsn_port_get_with_filters_return_none(self):
def test_lsn_port_get_with_filters_raises_not_found(self):
def test_lsn_port_info_get(self):
def test_lsn_port_info_get_raise_not_found(self):
def test_lsn_port_plug_network(self):
def test_lsn_port_plug_network_raise_conflict(self):
def _test_lsn_port_dhcp_configure( self, lsn_id, lsn_port_id, is_enabled, opts):
def test_lsn_port_dhcp_configure_empty_opts(self):
def test_lsn_port_dhcp_configure_with_opts(self):
def _test_lsn_metadata_configure( self, lsn_id, is_enabled, opts, expected_opts):
def test_lsn_port_metadata_configure_empty_secret(self):
def test_lsn_metadata_configure_with_secret(self):
def _test_lsn_port_host_action( self, lsn_port_action_func, extra_action, action, host):
def test_lsn_port_dhcp_host_add(self):
def test_lsn_port_dhcp_host_remove(self):
def test_lsn_port_metadata_host_add(self):
def test_lsn_port_metadata_host_remove(self):
\OpenStack\neutron-2014.1\neutron\tests\unit\vmware\nsxlib\test_queue.py
class TestLogicalQueueLib(base.NsxlibTestCase):
def setUp(self):
def test_create_and_get_lqueue(self):
def test_create_lqueue_nsx_error_raises(self):
def raise_nsx_exc(*args, **kwargs):
def test_delete_lqueue(self):
def test_delete_non_existing_lqueue_raises(self):
\OpenStack\neutron-2014.1\neutron\tests\unit\vmware\nsxlib\test_router.py
class TestNatRules(base.NsxlibTestCase):
def _test_create_lrouter_dnat_rule(self, version):
def test_create_lrouter_dnat_rule_v2(self):
def test_create_lrouter_dnat_rule_v31(self):
class TestExplicitLRouters(base.NsxlibTestCase):
def setUp(self):
def _get_lrouter(self, tenant_id, router_name, router_id, relations=None):
def _get_single_route(self, router_id, route_id='fake_route_id_0', prefix='0.0.0.0/0', next_hop_ip='1.1.1.1'):
def test_prepare_body_with_implicit_routing_config(self):
def test_prepare_body_without_routing_config(self):
def test_get_lrouter(self):
def test_create_lrouter(self):
def test_update_lrouter_with_no_routes(self):
def test_update_lrouter_with_no_routes_raise_nsx_exception(self):
def test_update_lrouter_with_routes(self):
def test_update_lrouter_with_routes_raises_nsx_expception(self):
class RouterNegativeTestCase(base.NsxlibNegativeBaseTestCase):
def test_create_lrouter_on_failure(self):
def test_delete_lrouter_on_failure(self):
def test_get_lrouter_on_failure(self):
def test_update_lrouter_on_failure(self):
class TestLogicalRouters(base.NsxlibTestCase):
def _verify_lrouter(self, res_lrouter, expected_uuid, expected_display_name, expected_nexthop, expected_tenant_id, expected_neutron_id=None, expected_distributed=None):
def test_get_lrouters(self):
def _create_lrouter(self, version, neutron_id=None, distributed=None):
def test_create_and_get_lrouter_v30(self):
def test_create_and_get_lrouter_v31_centralized(self):
def test_create_and_get_lrouter_v31_distributed(self):
def test_create_and_get_lrouter_name_exceeds_40chars(self):
def _test_version_dependent_update_lrouter(self, version):
def foo(*args, **kwargs):
def test_version_dependent_update_lrouter_old_versions(self):
def test_version_dependent_update_lrouter_new_versions(self):
def test_update_lrouter_no_nexthop(self):
def test_update_lrouter(self):
def test_update_nonexistent_lrouter_raises(self):
def test_delete_lrouter(self):
def test_query_lrouter_ports(self):
def test_query_lrouter_lports_nonexistent_lrouter_raises(self):
def test_create_and_get_lrouter_port(self):
def test_create_lrouter_port_nonexistent_router_raises(self):
def test_update_lrouter_port(self):
def test_update_lrouter_port_nonexistent_router_raises(self):
def test_update_lrouter_port_nonexistent_port_raises(self):
def test_delete_lrouter_port(self):
def test_delete_lrouter_port_nonexistent_router_raises(self):
def test_delete_lrouter_port_nonexistent_port_raises(self):
def test_delete_peer_lrouter_port(self):
def fakegetport(*args, **kwargs):
def test_update_lrouter_port_ips_add_only(self):
def test_update_lrouter_port_ips_remove_only(self):
def test_update_lrouter_port_ips_add_and_remove(self):
def test_update_lrouter_port_ips_nonexistent_router_raises(self):
def test_update_lrouter_port_ips_nsx_exception_raises(self):
def raise_nsx_exc(*args, **kwargs):
def test_plug_lrouter_port_patch_attachment(self):
def test_plug_lrouter_port_l3_gw_attachment(self):
def test_plug_lrouter_port_l3_gw_attachment_with_vlan(self):
def test_plug_lrouter_port_invalid_attachment_type_raises(self):
def _test_create_router_snat_rule(self, version):
def test_create_router_snat_rule_v3(self):
def test_create_router_snat_rule_v2(self):
def _test_create_router_dnat_rule(self, version, dest_port=None):
def test_create_router_dnat_rule_v3(self):
def test_create_router_dnat_rule_v2(self):
def test_create_router_dnat_rule_v2_with_destination_port(self):
def test_create_router_dnat_rule_v3_with_destination_port(self):
def test_create_router_snat_rule_invalid_match_keys_raises(self):
def _test_create_router_nosnat_rule(self, version, expected=1):
def test_create_router_nosnat_rule_v2(self):
def test_create_router_nosnat_rule_v3(self):
def _prepare_nat_rules_for_delete_tests(self):
def test_delete_router_nat_rules_by_match_on_destination_ip(self):
def test_delete_router_nat_rules_by_match_on_source_ip(self):
def test_delete_router_nat_rules_by_match_no_match_expected(self):
def test_delete_router_nat_rules_by_match_no_match_raises(self):
\OpenStack\neutron-2014.1\neutron\tests\unit\vmware\nsxlib\test_secgroup.py
class SecurityProfileTestCase(base.NsxlibTestCase):
def test_create_and_get_security_profile(self):
def test_create_and_get_default_security_profile(self):
def test_update_security_profile_raise_not_found(self):
def test_update_security_profile(self):
def test_update_security_profile_rules(self):
def test_update_security_profile_rules_noingress(self):
def test_update_non_existing_securityprofile_raises(self):
def test_delete_security_profile(self):
def test_delete_non_existing_securityprofile_raises(self):
\OpenStack\neutron-2014.1\neutron\tests\unit\vmware\nsxlib\test_switch.py
class LogicalSwitchesTestCase(base.NsxlibTestCase):
def test_create_and_get_lswitches_single(self):
def test_create_and_get_lswitches_single_name_exceeds_40_chars(self):
def test_create_and_get_lswitches_multiple(self):
def test_update_lswitch(self):
def test_update_non_existing_lswitch_raises(self):
def test_delete_networks(self):
def test_delete_non_existing_lswitch_raises(self):
class LogicalPortsTestCase(base.NsxlibTestCase):
def _create_switch_and_port(self, tenant_id='pippo', neutron_port_id='whatever', name='name', device_id='device_id'):
def test_create_and_get_port(self):
def test_plug_interface(self):
def test_get_port_by_tag(self):
def test_get_port_by_tag_not_found_returns_None(self):
def test_get_port_status(self):
def test_get_port_status_non_existent_raises(self):
def test_update_port(self):
def test_create_port_device_id_less_than_40_chars(self):
def test_create_port_device_id_more_than_40_chars(self):
def test_get_ports_with_obsolete_and_new_vm_id_tag(self):
def obsolete(device_id, obfuscate=False):
def test_update_non_existent_port_raises(self):
def test_delete_port(self):
def test_delete_non_existent_port_raises(self):
def test_query_lswitch_ports(self):
\OpenStack\neutron-2014.1\neutron\tests\unit\vmware\nsxlib\test_versioning.py
class TestVersioning(base.BaseTestCase):
def test_function_handling_missing_minor(self):
def test_function_handling_with_both_major_and_minor(self):
def test_function_handling_with_newer_major(self):
def test_function_handling_with_obsolete_major(self):
def test_function_handling_with_unknown_version(self):
\OpenStack\neutron-2014.1\neutron\tests\unit\vmware\nsxlib\__init__.py
\OpenStack\neutron-2014.1\neutron\tests\unit\vmware\test_agent_scheduler.py
class DhcpAgentNotifierTestCase(test_base.OvsDhcpAgentNotifierTestCase):
def setUp(self):
def _test_gateway_subnet_notification(self, gateway='10.0.0.1'):
def test_gatewayless_subnet_notification(self):
def test_subnet_with_gateway_notification(self):
\OpenStack\neutron-2014.1\neutron\tests\unit\vmware\test_dhcpmeta.py
class DhcpMetadataBuilderTestCase(base.BaseTestCase):
def setUp(self):
def test_dhcp_agent_get_all(self):
def test_dhcp_port_get_all(self):
def test_router_id_get(self):
def test_router_id_get_none_subnet(self):
def test_metadata_deallocate(self):
def test_metadata_allocate(self):
def test_dhcp_deallocate(self):
def _test_dhcp_allocate(self, subnet, expected_notify_count):
def test_dhcp_allocate(self):
def test_dhcp_allocate_none_subnet(self):
class MigrationManagerTestCase(base.BaseTestCase):
def setUp(self):
def _test_validate(self, lsn_exists=False, ext_net=False, subnets=None):
def test_validate_no_subnets(self):
def test_validate_with_one_subnet(self):
def test_validate_raise_conflict_many_subnets(self):
def test_validate_raise_conflict_lsn_exists(self):
def test_validate_raise_badrequest_external_net(self):
def test_validate_raise_badrequest_metadata_net(self):
def _test_migrate(self, router, subnet, expected_calls):
def test_migrate(self):
def test_migrate_no_router_uplink(self):
def test_migrate_no_subnet(self):
def _test_report(self, lsn_attrs, expected):
def test_report_for_lsn(self):
def test_report_for_lsn_without_lsn_port(self):
def _test_report_for_lsn_without_subnet(self, validated_subnet):
def test_report_for_lsn_without_subnet_subnet_found(self):
def test_report_for_lsn_without_subnet_subnet_not_found(self):
def test_report_for_dhcp_agent(self):
class LsnManagerTestCase(base.BaseTestCase):
def setUp(self):
def test_lsn_get(self):
def _test_lsn_get_raise_not_found_with_exc(self, exc):
def test_lsn_get_raise_not_found_with_not_found(self):
def test_lsn_get_raise_not_found_with_api_error(self):
def _test_lsn_get_silent_raise_with_exc(self, exc):
def test_lsn_get_silent_raise_with_not_found(self):
def test_lsn_get_silent_raise_with_api_error(self):
def test_lsn_create(self):
def test_lsn_create_raise_api_error(self):
def test_lsn_delete(self):
def _test_lsn_delete_with_exc(self, exc):
def test_lsn_delete_with_not_found(self):
def test_lsn_delete_api_exception(self):
def test_lsn_delete_by_network(self):
def _test_lsn_delete_by_network_with_exc(self, exc):
def test_lsn_delete_by_network_with_not_found(self):
def test_lsn_delete_by_network_with_not_api_error(self):
def test_lsn_port_get(self):
def test_lsn_port_get_lsn_not_found_on_raise(self):
def test_lsn_port_get_lsn_not_found_silent_raise(self):
def test_lsn_port_get_port_not_found_on_raise(self):
def test_lsn_port_get_port_not_found_silent_raise(self):
def test_lsn_port_create(self):
def _test_lsn_port_create_with_exc(self, exc, expected):
def test_lsn_port_create_with_not_found(self):
def test_lsn_port_create_api_exception(self):
def test_lsn_port_delete(self):
def _test_lsn_port_delete_with_exc(self, exc):
def test_lsn_port_delete_with_not_found(self):
def test_lsn_port_delete_api_exception(self):
def _test_lsn_port_dhcp_setup(self, ret_val, sub):
def test_lsn_port_dhcp_setup(self):
def test_lsn_port_dhcp_setup_with_config(self):
OpenStack IndexPreviousNext
|