Browse Source

Impactor_ussuri

Change-Id: I516419816e401900aee5b39b198cbc796a4f3849
changes/76/780476/3
dkumbhar 1 month ago
parent
commit
2bee8f7e34
4 changed files with 21 additions and 19 deletions
  1. +8
    -5
      vmware_nsx_tempest_plugin/services/nsxp_client.py
  2. +11
    -10
      vmware_nsx_tempest_plugin/tests/api/test_vpn.py
  3. +0
    -2
      vmware_nsx_tempest_plugin/tests/nsxv3/scenario/test_ipv6_router.py
  4. +2
    -2
      vmware_nsx_tempest_plugin/tests/nsxv3/scenario/test_router_nonat_ops.py

+ 8
- 5
vmware_nsx_tempest_plugin/services/nsxp_client.py View File

@ -241,11 +241,14 @@ class NSXPClient(object):
locale_service = self.get_logical_router_local_services(os_name,
os_uuid)
vpn_service = self.get_vpn_service(os_name, os_uuid)
endpoint = "tier-1s/%s/locale-services/%s/ipsec-vpn-services/%s/ \
local-endpoints" % (router["id"],
locale_service[0].get("id"),
vpn_service[0].get("id"))
return self.get_logical_resources(endpoint)
if vpn_service:
endpoint = 'tier-1s/%s/locale-services/%s/ipsec-vpn-services/' % \
(router["id"], locale_service[0].get("id"))
endpoint = str(endpoint) + '%s/local-endpoints' % \
(vpn_service[0].get("id"))
return self.get_logical_resources(endpoint)
else:
return None
def get_ipsec_session(self, os_name, os_uuid):
"""


+ 11
- 10
vmware_nsx_tempest_plugin/tests/api/test_vpn.py View File

@ -95,12 +95,13 @@ class TestVpnOps(feature_manager.FeatureManager):
return dict(network=network, subnet=subnet, router=router)
def create_vpn_basic_topo_endpoint_group(
self, network_topology, name=None, ike=None, pfs=constants.PFS,
encryption_algorithm=constants.ENCRYPTION_ALGO,
lifetime=constants.LIFETIME,
peer_address=constants.PEER_ADDRESS,
peer_id=constants.PEER_ID,
site_connection_state=constants.SITE_CONNECTION_STATE):
self, network_topology, name=None, ike=None,
pfs=constants.PFS,
encryption_algorithm=constants.ENCRYPTION_ALGO,
lifetime=constants.LIFETIME,
peer_address=constants.PEER_ADDRESS,
peer_id=constants.PEER_ID,
site_connection_state=constants.SITE_CONNECTION_STATE):
# Create network topo
kwargs = {}
subnet = network_topology['subnet']
@ -445,8 +446,8 @@ class TestVpnOps(feature_manager.FeatureManager):
try:
local_endpoints = self.nsxp_client.get_local_endpoint(
router["name"], router["id"])
self.assertNone(local_endpoints)
except IndexError:
self.assertFalse(local_endpoints)
except exceptions.ServerFault:
raise Exception('local endpoint not deleted from backend')
else:
local_endpoints = self.nsx_client.get_local_endpoints()
@ -911,7 +912,7 @@ class TestVpnOps(feature_manager.FeatureManager):
self.assertEqual(ipsec_session[0].get('resource_type'),
'PolicyBasedIPSecVpnSession')
nsx_router = self.nsxp_client.get_logical_router(router["name"],
router["id"])
router["id"])
vpn_service = self.nsxp_client.get_vpn_service(router["name"],
router["id"])
self.assertEqual(vpn_service[0].get('tags')[0].get("tag"),
@ -930,7 +931,7 @@ class TestVpnOps(feature_manager.FeatureManager):
self.assertEqual(ipsec_session[0].get('resource_type'),
'PolicyBasedIPSecVpnSession')
nsx_router = self.nsxp_client.get_logical_router(router["name"],
router["id"])
router["id"])
vpn_service = self.nsxp_client.get_vpn_service(router["name"],
router["id"])
self.assertEqual(vpn_service[0].get('tags')[0].get("tag"),


+ 0
- 2
vmware_nsx_tempest_plugin/tests/nsxv3/scenario/test_ipv6_router.py View File

@ -68,8 +68,6 @@ class IPv6RoutersTest(feature_manager.FeatureManager):
subnet = self.create_topology_subnet(
subnet_name, network,
subnets_client=subnet_client,
ipv6_address_mode=ipv6_address_mode,
ipv6_ra_mode=ipv6_ra_mode,
ip_version=6, enable_dhcp=True,
cidr=cidr, router_id=router_id)
return subnet


+ 2
- 2
vmware_nsx_tempest_plugin/tests/nsxv3/scenario/test_router_nonat_ops.py View File

@ -396,12 +396,12 @@ class TestRouterNoNATOps(manager.NetworkScenarioTest):
if CONF.network.backend == 'nsxp':
route_adv_type_nat = 'TIER1_NAT' in nsx_router_policy[
'route_advertisement_types']
self.assertTrue(
self.assertFalse(
route_adv_type_nat,
nat_msg)
route_adv_type_conn = 'TIER1_CONNECTED' in nsx_router_policy[
'route_advertisement_types']
self.assertFalse(route_adv_type_conn, adv_msg)
self.assertTrue(route_adv_type_conn, adv_msg)
else:
self.assertFalse(router_adv['advertise_nat_routes'], nat_msg)
self.assertTrue(


Loading…
Cancel
Save