The networking_cisco.tests.unit.ml2.drivers.cisco.n1kv.test_cisco_n1kv_mech
Module¶
-
class
networking_cisco.tests.unit.ml2.drivers.cisco.n1kv.test_cisco_n1kv_mech.
TestN1KVCLientVSMRetry
(*args, **kwds)¶ Bases:
networking_cisco.tests.unit.ml2.drivers.cisco.n1kv.test_cisco_n1kv_mech.TestN1KVMechanismDriver
-
setUp
()¶
-
test_vsm_retry
(*args, **kwargs)¶ Test retry count for VSM REST API.
-
-
class
networking_cisco.tests.unit.ml2.drivers.cisco.n1kv.test_cisco_n1kv_mech.
TestN1KVMechDriverBasicGet
(*args, **kwds)¶ Bases:
neutron.tests.unit.db.test_db_base_plugin_v2.TestBasicGet
,networking_cisco.tests.unit.ml2.drivers.cisco.n1kv.test_cisco_n1kv_mech.TestN1KVMechanismDriver
-
test_single_get_admin
(*args, **kwargs)¶
-
test_single_get_tenant
(*args, **kwargs)¶
-
-
class
networking_cisco.tests.unit.ml2.drivers.cisco.n1kv.test_cisco_n1kv_mech.
TestN1KVMechDriverHTTPResponse
(*args, **kwds)¶ Bases:
neutron.tests.unit.db.test_db_base_plugin_v2.TestV2HTTPResponse
,networking_cisco.tests.unit.ml2.drivers.cisco.n1kv.test_cisco_n1kv_mech.TestN1KVMechanismDriver
-
test_bad_route_404
(*args, **kwargs)¶
-
test_create_returns_201
(*args, **kwargs)¶
-
test_delete_returns_204
(*args, **kwargs)¶
-
test_delete_with_req_body_returns_400
(*args, **kwargs)¶
-
test_list_returns_200
(*args, **kwargs)¶
-
test_list_with_fields
(*args, **kwargs)¶
-
test_list_with_fields_noadmin
(*args, **kwargs)¶
-
test_list_with_fields_noadmin_and_policy_field
(*args, **kwargs)¶ If a field used by policy is selected, do not duplicate it.
Verifies that if the field parameter explicitly specifies a field which is used by the policy engine, then it is not duplicated in the response.
-
test_show_returns_200
(*args, **kwargs)¶
-
test_update_invalid_json_400
(*args, **kwargs)¶
-
test_update_returns_200
(*args, **kwargs)¶
-
-
class
networking_cisco.tests.unit.ml2.drivers.cisco.n1kv.test_cisco_n1kv_mech.
TestN1KVMechDriverSubnetsV2
(*args, **kwds)¶ Bases:
neutron.tests.unit.db.test_db_base_plugin_v2.TestSubnetsV2
,networking_cisco.tests.unit.ml2.drivers.cisco.n1kv.test_cisco_n1kv_mech.TestN1KVMechanismDriver
-
test_create_2_subnets_overlapping_cidr_allowed_returns_200
(*args, **kwargs)¶
-
test_create_2_subnets_overlapping_cidr_not_allowed_returns_400
(*args, **kwargs)¶
-
test_create_subnet
(*args, **kwargs)¶
-
test_create_subnet_V6_slaac_big_prefix
(*args, **kwargs)¶
-
test_create_subnet_as_admin
(*args, **kwargs)¶
-
test_create_subnet_bad_V4_cidr
(*args, **kwargs)¶
-
test_create_subnet_bad_V4_cidr_prefix_len
(*args, **kwargs)¶
-
test_create_subnet_bad_V6_cidr
(*args, **kwargs)¶
-
test_create_subnet_bad_boolean
(*args, **kwargs)¶
-
test_create_subnet_bad_hostroutes
(*args, **kwargs)¶
-
test_create_subnet_bad_ip_version
(*args, **kwargs)¶
-
test_create_subnet_bad_ip_version_null
(*args, **kwargs)¶
-
test_create_subnet_bad_nameserver
(*args, **kwargs)¶
-
test_create_subnet_bad_pools
(*args, **kwargs)¶
-
test_create_subnet_bad_tenant
(*args, **kwargs)¶
-
test_create_subnet_bad_uuid
(*args, **kwargs)¶
-
test_create_subnet_default_gw_conflict_allocation_pool_returns_409
(*args, **kwargs)¶
-
test_create_subnet_defaults
(*args, **kwargs)¶
-
test_create_subnet_dhcpv6_stateless_with_ip_already_allocated
(*args, **kwargs)¶
-
test_create_subnet_dhcpv6_stateless_with_port_on_network
(*args, **kwargs)¶
-
test_create_subnet_gateway_in_allocation_pool_returns_409
(*args, **kwargs)¶
-
test_create_subnet_gw_bcast_returns_400
(*args, **kwargs)¶
-
test_create_subnet_gw_is_broadcast_addr_returns_400
(*args, **kwargs)¶
-
test_create_subnet_gw_is_nw_addr_returns_400
(*args, **kwargs)¶
-
test_create_subnet_gw_of_network_returns_400
(*args, **kwargs)¶
-
test_create_subnet_gw_outside_cidr_returns_201
(*args, **kwargs)¶
-
test_create_subnet_gw_values
(*args, **kwargs)¶
-
test_create_subnet_inconsistent_ipv4_cidrv6
(*args, **kwargs)¶
-
test_create_subnet_inconsistent_ipv4_gatewayv6
(*args, **kwargs)¶
-
test_create_subnet_inconsistent_ipv4_hostroute_dst_v6
(*args, **kwargs)¶
-
test_create_subnet_inconsistent_ipv4_hostroute_np_v6
(*args, **kwargs)¶
-
test_create_subnet_inconsistent_ipv6_cidrv4
(*args, **kwargs)¶
-
test_create_subnet_inconsistent_ipv6_dns_v4
(*args, **kwargs)¶
-
test_create_subnet_inconsistent_ipv6_gatewayv4
(*args, **kwargs)¶
-
test_create_subnet_invalid_allocation_pool_returns_400
(*args, **kwargs)¶
-
test_create_subnet_invalid_ipv6_address_mode
(*args, **kwargs)¶
-
test_create_subnet_invalid_ipv6_ra_mode
(*args, **kwargs)¶
-
test_create_subnet_ipv6_addr_modes
(*args, **kwargs)¶
-
test_create_subnet_ipv6_address_mode_ip_version_4
(*args, **kwargs)¶
-
test_create_subnet_ipv6_attributes_no_dhcp_enabled
(*args, **kwargs)¶
-
test_create_subnet_ipv6_different_ra_and_addr_modes
(*args, **kwargs)¶
-
test_create_subnet_ipv6_gw_is_nw_addr_returns_400
(*args, **kwargs)¶
-
test_create_subnet_ipv6_gw_is_nw_end_addr_returns_201
(*args, **kwargs)¶
-
test_create_subnet_ipv6_gw_values
(*args, **kwargs)¶
-
test_create_subnet_ipv6_out_of_cidr_global
(*args, **kwargs)¶
-
test_create_subnet_ipv6_out_of_cidr_lla
(*args, **kwargs)¶
-
test_create_subnet_ipv6_pd_gw_values
(*args, **kwargs)¶
-
test_create_subnet_ipv6_ra_mode_ip_version_4
(*args, **kwargs)¶
-
test_create_subnet_ipv6_ra_modes
(*args, **kwargs)¶
-
test_create_subnet_ipv6_same_ra_and_addr_modes
(*args, **kwargs)¶
-
test_create_subnet_ipv6_slaac_with_db_reference_error
(*args, **kwargs)¶
-
test_create_subnet_ipv6_slaac_with_dhcp_port_on_network
(*args, **kwargs)¶
-
test_create_subnet_ipv6_slaac_with_ip_already_allocated
(*args, **kwargs)¶
-
test_create_subnet_ipv6_slaac_with_port_not_found
(*args, **kwargs)¶
-
test_create_subnet_ipv6_slaac_with_port_on_network
(*args, **kwargs)¶
-
test_create_subnet_ipv6_slaac_with_router_intf_on_network
(*args, **kwargs)¶
-
test_create_subnet_ipv6_slaac_with_snat_intf_on_network
(*args, **kwargs)¶
-
test_create_subnet_multiple_allocation_pools
(*args, **kwargs)¶
-
test_create_subnet_no_cidr_and_default_subnetpool
(*args, **kwargs)¶ Expect subnet-create to keep semantic with default pools.
-
test_create_subnet_no_ip_version
(*args, **kwargs)¶
-
test_create_subnet_nonzero_cidr
(*args, **kwargs)¶
-
test_create_subnet_only_ip_version_v6_no_pool
(*args, **kwargs)¶
-
test_create_subnet_out_of_range_allocation_pool_returns_400
(*args, **kwargs)¶
-
test_create_subnet_overlapping_allocation_pools_returns_409
(*args, **kwargs)¶
-
test_create_subnet_with_allocation_pool
(*args, **kwargs)¶
-
test_create_subnet_with_cidr_and_default_subnetpool
(*args, **kwargs)¶ Expect subnet-create to keep semantic with default pools.
-
test_create_subnet_with_dhcp_disabled
(*args, **kwargs)¶
-
test_create_subnet_with_invalid_netmask_returns_400_ipv4
(*args, **kwargs)¶
-
test_create_subnet_with_invalid_netmask_returns_400_ipv6
(*args, **kwargs)¶
-
test_create_subnet_with_large_allocation_pool
(*args, **kwargs)¶
-
test_create_subnet_with_network_different_tenant
(*args, **kwargs)¶
-
test_create_subnet_with_none_gateway
(*args, **kwargs)¶
-
test_create_subnet_with_none_gateway_allocation_pool
(*args, **kwargs)¶
-
test_create_subnet_with_none_gateway_fully_allocated
(*args, **kwargs)¶
-
test_create_subnet_with_one_dns
(*args, **kwargs)¶
-
test_create_subnet_with_one_host_route
(*args, **kwargs)¶
-
test_create_subnet_with_too_many_dns
(*args, **kwargs)¶
-
test_create_subnet_with_too_many_routes
(*args, **kwargs)¶
-
test_create_subnet_with_two_dns
(*args, **kwargs)¶
-
test_create_subnet_with_two_host_routes
(*args, **kwargs)¶
-
test_create_subnet_with_v6_allocation_pool
(*args, **kwargs)¶
-
test_create_subnet_with_v6_pd_allocation_pool
(*args, **kwargs)¶
-
test_create_subnets_bulk_emulated
(*args, **kwargs)¶
-
test_create_subnets_bulk_emulated_plugin_failure
(*args, **kwargs)¶
-
test_create_subnets_bulk_native
(*args, **kwargs)¶
-
test_create_subnets_bulk_native_plugin_failure
(*args, **kwargs)¶
-
test_create_subnets_bulk_native_quotas
(*args, **kwargs)¶
-
test_create_subnets_native_quotas
(*args, **kwargs)¶
-
test_create_two_subnets
(*args, **kwargs)¶
-
test_create_two_subnets_same_cidr_returns_400
(*args, **kwargs)¶
-
test_delete_network
(*args, **kwargs)¶
-
test_delete_subnet
(*args, **kwargs)¶
-
test_delete_subnet_dhcp_port_associated_with_other_subnets
(*args, **kwargs)¶
-
test_delete_subnet_ipv6_slaac_port_exists
(*args, **kwargs)¶ Test IPv6 SLAAC subnet delete when a port is still using subnet.
-
test_delete_subnet_ipv6_slaac_router_port_exists
(*args, **kwargs)¶ Test IPv6 SLAAC subnet delete with a router port using the subnet
-
test_delete_subnet_port_exists_owned_by_network
(*args, **kwargs)¶
-
test_delete_subnet_port_exists_owned_by_other
(*args, **kwargs)¶
-
test_delete_subnet_with_callback
(*args, **kwargs)¶
-
test_delete_subnet_with_dns
(*args, **kwargs)¶
-
test_delete_subnet_with_dns_and_route
(*args, **kwargs)¶
-
test_delete_subnet_with_other_subnet_on_network_still_in_use
(*args, **kwargs)¶
-
test_delete_subnet_with_route
(*args, **kwargs)¶
-
test_invalid_ip_address
(*args, **kwargs)¶
-
test_invalid_ip_version
(*args, **kwargs)¶
-
test_invalid_subnet
(*args, **kwargs)¶
-
test_invalid_uuid
(*args, **kwargs)¶
-
test_list_subnets
(*args, **kwargs)¶
-
test_list_subnets_with_pagination_emulated
(*args, **kwargs)¶
-
test_list_subnets_with_pagination_native
(*args, **kwargs)¶
-
test_list_subnets_with_pagination_reverse_emulated
(*args, **kwargs)¶
-
test_list_subnets_with_pagination_reverse_native
(*args, **kwargs)¶
-
test_list_subnets_with_parameter
(*args, **kwargs)¶
-
test_list_subnets_with_sort_emulated
(*args, **kwargs)¶
-
test_list_subnets_with_sort_native
(*args, **kwargs)¶
-
test_port_prevents_network_deletion
(*args, **kwargs)¶
-
test_port_prevents_subnet_deletion
(*args, **kwargs)¶
-
test_show_subnet
(*args, **kwargs)¶
-
test_subnet_lifecycle_dns_retains_order
(*args, **kwargs)¶
-
test_subnet_update_ipv4_and_ipv6_pd_slaac_subnets
(*args, **kwargs)¶
-
test_subnet_update_ipv4_and_ipv6_pd_v6stateless_subnets
(*args, **kwargs)¶
-
test_subnet_usable_after_update
(*args, **kwargs)¶
-
test_subnet_with_allocation_range
(*args, **kwargs)¶
-
test_unsupported_subnet_cidr_loopback
(*args, **kwargs)¶
-
test_unsupported_subnet_cidr_multicast
(*args, **kwargs)¶
-
test_update_subnet
(*args, **kwargs)¶
-
test_update_subnet_adding_additional_host_routes_and_dns
(*args, **kwargs)¶
-
test_update_subnet_allocation_pools
(*args, **kwargs)¶
-
test_update_subnet_allocation_pools_and_gateway_ip
(*args, **kwargs)¶
-
test_update_subnet_allocation_pools_invalid_pool_for_cidr
(*args, **kwargs)¶ Test update alloc pool to something outside subnet.cidr.
This makes sure that an erroneous allocation_pool specified in a subnet update (outside subnet cidr) will result in an error.
-
test_update_subnet_allocation_pools_invalid_returns_400
(*args, **kwargs)¶
-
test_update_subnet_allocation_pools_over_gateway_ip_returns_409
(*args, **kwargs)¶
-
test_update_subnet_allocation_pools_overlapping_returns_409
(*args, **kwargs)¶
-
test_update_subnet_dns
(*args, **kwargs)¶
-
test_update_subnet_dns_to_None
(*args, **kwargs)¶
-
test_update_subnet_dns_with_too_many_entries
(*args, **kwargs)¶
-
test_update_subnet_from_gw_to_new_gw
(*args, **kwargs)¶
-
test_update_subnet_from_gw_to_no_gw
(*args, **kwargs)¶
-
test_update_subnet_from_no_gw_to_no_gw
(*args, **kwargs)¶
-
test_update_subnet_gateway_in_allocation_pool_returns_409
(*args, **kwargs)¶
-
test_update_subnet_gw_ip_in_use_by_router_returns_409
(*args, **kwargs)¶
-
test_update_subnet_gw_outside_cidr_returns_200
(*args, **kwargs)¶
-
test_update_subnet_inconsistent_ipv4_dns_v6
(*args, **kwargs)¶
-
test_update_subnet_inconsistent_ipv4_gatewayv6
(*args, **kwargs)¶
-
test_update_subnet_inconsistent_ipv6_gatewayv4
(*args, **kwargs)¶
-
test_update_subnet_inconsistent_ipv6_hostroute_dst_v4
(*args, **kwargs)¶
-
test_update_subnet_inconsistent_ipv6_hostroute_np_v4
(*args, **kwargs)¶
-
test_update_subnet_ipv6_address_mode_fails
(*args, **kwargs)¶
-
test_update_subnet_ipv6_address_mode_ip_version_4
(*args, **kwargs)¶
-
test_update_subnet_ipv6_attributes_fails
(*args, **kwargs)¶
-
test_update_subnet_ipv6_cannot_disable_dhcp
(*args, **kwargs)¶
-
test_update_subnet_ipv6_ra_mode_fails
(*args, **kwargs)¶
-
test_update_subnet_ipv6_ra_mode_ip_version_4
(*args, **kwargs)¶
-
test_update_subnet_no_gateway
(*args, **kwargs)¶
-
test_update_subnet_route
(*args, **kwargs)¶
-
test_update_subnet_route_to_None
(*args, **kwargs)¶
-
test_update_subnet_route_with_too_many_entries
(*args, **kwargs)¶
-
test_validate_subnet_dns_nameservers_exhausted
(*args, **kwargs)¶
-
test_validate_subnet_host_routes_exhausted
(*args, **kwargs)¶
-
-
class
networking_cisco.tests.unit.ml2.drivers.cisco.n1kv.test_cisco_n1kv_mech.
TestN1KVMechDriverVlan
(*args, **kwds)¶ Bases:
neutron.tests.unit.plugins.ml2.drivers.test_type_vlan.VlanTypeTest
,networking_cisco.tests.unit.ml2.drivers.cisco.n1kv.test_cisco_n1kv_mech.TestN1KVMechanismDriver
-
test_allocate_tenant_segment
(*args, **kwargs)¶
-
test_allocate_tenant_segment_no_available
(*args, **kwargs)¶
-
test_get_mtu
(*args, **kwargs)¶
-
test_parse_network_exception_handling
(*args, **kwargs)¶
-
test_partial_segment_is_partial_segment
(*args, **kwargs)¶
-
test_release_segment
(*args, **kwargs)¶
-
test_release_segment_unallocated
(*args, **kwargs)¶
-
test_reserve_provider_segment
(*args, **kwargs)¶
-
test_reserve_provider_segment_all_allocateds
(*args, **kwargs)¶
-
test_reserve_provider_segment_already_allocated
(*args, **kwargs)¶
-
test_reserve_provider_segment_in_tenant_pools
(*args, **kwargs)¶
-
test_reserve_provider_segment_without_physical_network
(*args, **kwargs)¶
-
test_reserve_provider_segment_without_segmentation_id
(*args, **kwargs)¶
-
test_specific_segment_is_not_partial_segment
(*args, **kwargs)¶
-
test_sync_vlan_allocations
(*args, **kwargs)¶
-
test_validate_provider_segment
(*args, **kwargs)¶
-
test_validate_provider_segment_with_invalid_input
(*args, **kwargs)¶
-
test_validate_provider_segment_with_invalid_physical_network
(*args, **kwargs)¶
-
test_validate_provider_segment_with_invalid_segmentation_id
(*args, **kwargs)¶
-
test_validate_provider_segment_with_missing_physical_network
(*args, **kwargs)¶
-
test_validate_provider_segment_with_physical_network_only
(*args, **kwargs)¶
-
test_validate_provider_segment_without_physical_network
(*args, **kwargs)¶
-
test_validate_provider_segment_without_segmentation_id
(*args, **kwargs)¶
-
-
class
networking_cisco.tests.unit.ml2.drivers.cisco.n1kv.test_cisco_n1kv_mech.
TestN1KVMechDriverVxlan
(*args, **kwds)¶ Bases:
neutron.tests.unit.plugins.ml2.drivers.test_type_vxlan.VxlanTypeTest
,networking_cisco.tests.unit.ml2.drivers.cisco.n1kv.test_cisco_n1kv_mech.TestN1KVMechanismDriver
-
test_add_endpoint
(*args, **kwargs)¶
-
test_add_endpoint_for_existing_tunnel_ip
(*args, **kwargs)¶
-
test_allocate_tenant_segment
(*args, **kwargs)¶
-
test_delete_endpoint
(*args, **kwargs)¶
-
test_get_endpoint_by_host
(*args, **kwargs)¶
-
test_get_endpoint_by_host_for_not_existing_host
(*args, **kwargs)¶
-
test_get_endpoint_by_ip
(*args, **kwargs)¶
-
test_get_endpoint_by_ip_for_not_existing_tunnel_ip
(*args, **kwargs)¶
-
test_get_endpoints
(*args, **kwargs)¶
-
test_partial_segment_is_partial_segment
(*args, **kwargs)¶
-
test_reserve_provider_segment
(*args, **kwargs)¶
-
test_reserve_provider_segment_full_specs
(*args, **kwargs)¶
-
test_specific_segment_is_not_partial_segment
(*args, **kwargs)¶
-
test_sync_allocations_and_allocated_in_final_range
(*args, **kwargs)¶
-
test_sync_allocations_and_allocated_in_initial_range
(*args, **kwargs)¶
-
test_sync_allocations_no_op
(*args, **kwargs)¶
-
test_sync_tunnel_allocations
(*args, **kwargs)¶
-
test_tunnel_type
(*args, **kwargs)¶
-
test_validate_provider_segment
(*args, **kwargs)¶
-
-
class
networking_cisco.tests.unit.ml2.drivers.cisco.n1kv.test_cisco_n1kv_mech.
TestN1KVMechDriverVxlanMultiRange
(*args, **kwds)¶ Bases:
neutron.tests.unit.plugins.ml2.drivers.test_type_vxlan.VxlanTypeMultiRangeTest
,networking_cisco.tests.unit.ml2.drivers.cisco.n1kv.test_cisco_n1kv_mech.TestN1KVMechanismDriver
-
test_release_segment
(*args, **kwargs)¶
-
-
class
networking_cisco.tests.unit.ml2.drivers.cisco.n1kv.test_cisco_n1kv_mech.
TestN1KVMechanismDriver
(*args, **kwds)¶ Bases:
neutron.tests.unit.db.test_db_base_plugin_v2.NeutronDbPluginV2TestCase
Test Cisco Nexus1000V mechanism driver.
-
DEFAULT_CONTENT_TYPE
= ”¶
-
DEFAULT_RESP_BODY
= ”¶
-
DEFAULT_RESP_CODE
= 200¶
-
admin_tenant
= ‘admin_tenant’¶
-
assert_profile_binding_absent
(binding, tenant_id, profile_id)¶ Assert that binding for a given tenant-profile pair does NOT exist
Parameters: - binding – type of profile binding (network/policy)
- tenant_id – UUID of the tenant
- profile_id – UUID of the network/policy profile
-
assert_profile_binding_exists
(binding, tenant_id, profile_id)¶ Assert that binding for a given tenant-profile pair exists
Parameters: - binding – type of profile binding (network/policy)
- tenant_id – UUID of the tenant
- profile_id – UUID of the network/policy profile
-
create_assert_network_profile_failure
(data, tenant_id=None, is_admin=True, expected_status=400)¶ Create a network profile with erroneous arguments and assert that the profile creation fails.
-
create_assert_network_profile_success
(data, tenant_id=None, is_admin=True, expected_status=201)¶ Create a network profile and assert that a binding for the profile exists with the tenant who created it.
-
create_resource
(resource, data, tenant_id, expected_status, is_admin=False, api=None)¶
-
fmt
= ‘json’¶
-
get_test_network_profile_dict
(segment_type, multicast_ip_range=None, sub_type=None, name=’test-net-profile’, tenant_id=’admin’, **kwargs)¶
-
list_resource
(resource, tenant_id)¶
-
load_network_profile_extension
= False¶
-
load_policy_profile_extension
= False¶
-
setUp
()¶
-
tenant_id
= ‘some_tenant’¶
-
update_assert_profile
(profile_type, profile_id, add_tenants=None, remove_tenants=None, fmt=None)¶ Update a network/policy profile by adding new tenant associations and/or removing existing ones. Also, assert that only expected tenant-profile bindings exist after the update is complete.
-
vsm_retry
= False¶
-