DHCPv6 cases
Change-Id: I3e33222180e256fc309c76750a659e4da598cbef
This commit is contained in:
parent
9cde0a1133
commit
e11ed7ebd3
|
@ -49,19 +49,25 @@ class IPv6RoutersTest(feature_manager.FeatureManager):
|
||||||
def resource_setup(cls):
|
def resource_setup(cls):
|
||||||
super(IPv6RoutersTest, cls).resource_setup()
|
super(IPv6RoutersTest, cls).resource_setup()
|
||||||
|
|
||||||
def _create_ipv6_subnet(self, network, cidr, router_id=None, slaac=False):
|
def _create_ipv6_subnet(self, network, cidr, ipv6_ra_mode,
|
||||||
|
ipv6_address_mode,
|
||||||
|
router_id=None, slaac=False, enable_dhcp=False):
|
||||||
subnet_client = self.cmgr_adm.subnets_client
|
subnet_client = self.cmgr_adm.subnets_client
|
||||||
subnet_name = network['name'] + 'sub'
|
subnet_name = network['name'] + 'sub'
|
||||||
if slaac:
|
if slaac:
|
||||||
subnet = self.create_topology_subnet(subnet_name, network,
|
subnet = self.create_topology_subnet(
|
||||||
|
subnet_name, network,
|
||||||
subnets_client=subnet_client,
|
subnets_client=subnet_client,
|
||||||
ip_version=6, ipv6_ra_mode='slaac',
|
ip_version=6, ipv6_ra_mode='slaac',
|
||||||
ipv6_address_mode='slaac',
|
ipv6_address_mode='slaac',
|
||||||
cidr=cidr, router_id=router_id)
|
cidr=cidr, router_id=router_id)
|
||||||
else:
|
else:
|
||||||
subnet = self.create_topology_subnet(subnet_name, network,
|
subnet = self.create_topology_subnet(
|
||||||
|
subnet_name, network,
|
||||||
subnets_client=subnet_client,
|
subnets_client=subnet_client,
|
||||||
ip_version=6, enable_dhcp=False,
|
ipv6_address_mode=ipv6_address_mode,
|
||||||
|
ipv6_ra_mode=ipv6_ra_mode,
|
||||||
|
ip_version=6, enable_dhcp=True,
|
||||||
cidr=cidr, router_id=router_id)
|
cidr=cidr, router_id=router_id)
|
||||||
return subnet
|
return subnet
|
||||||
|
|
||||||
|
@ -106,8 +112,8 @@ class IPv6RoutersTest(feature_manager.FeatureManager):
|
||||||
"""
|
"""
|
||||||
name = data_utils.rand_name("ipv6-net")
|
name = data_utils.rand_name("ipv6-net")
|
||||||
networks_client = self.cmgr_adm.networks_client
|
networks_client = self.cmgr_adm.networks_client
|
||||||
network = self.create_topology_network(name,
|
network = self.create_topology_network(
|
||||||
networks_client=networks_client)
|
name, networks_client=networks_client)
|
||||||
subnet = self._create_ipv6_subnet(network, cidr="5200::/64")
|
subnet = self._create_ipv6_subnet(network, cidr="5200::/64")
|
||||||
rtr_name = data_utils.rand_name("ipv6-rtr")
|
rtr_name = data_utils.rand_name("ipv6-rtr")
|
||||||
router = self.create_topology_router(
|
router = self.create_topology_router(
|
||||||
|
@ -125,11 +131,12 @@ class IPv6RoutersTest(feature_manager.FeatureManager):
|
||||||
"""
|
"""
|
||||||
name = data_utils.rand_name("ipv6-net")
|
name = data_utils.rand_name("ipv6-net")
|
||||||
networks_client = self.cmgr_adm.networks_client
|
networks_client = self.cmgr_adm.networks_client
|
||||||
network = self.create_topology_network(name,
|
network = self.create_topology_network(
|
||||||
networks_client=networks_client)
|
name, networks_client=networks_client)
|
||||||
subnet_client = self.cmgr_adm.subnets_client
|
subnet_client = self.cmgr_adm.subnets_client
|
||||||
subnet_name = network['name'] + 'ipv4-sub'
|
subnet_name = network['name'] + 'ipv4-sub'
|
||||||
subnet_ipv4 = self.create_topology_subnet(subnet_name, network,
|
subnet_ipv4 = self.create_topology_subnet(
|
||||||
|
subnet_name, network,
|
||||||
subnets_client=subnet_client,
|
subnets_client=subnet_client,
|
||||||
cidr='20.20.0.0/16')
|
cidr='20.20.0.0/16')
|
||||||
subnet = self._create_ipv6_subnet(network, cidr="5201::/64")
|
subnet = self._create_ipv6_subnet(network, cidr="5201::/64")
|
||||||
|
@ -153,10 +160,10 @@ class IPv6RoutersTest(feature_manager.FeatureManager):
|
||||||
"""
|
"""
|
||||||
name = data_utils.rand_name("ipv6-net")
|
name = data_utils.rand_name("ipv6-net")
|
||||||
networks_client = self.cmgr_adm.networks_client
|
networks_client = self.cmgr_adm.networks_client
|
||||||
network = self.create_topology_network(name,
|
network = self.create_topology_network(
|
||||||
networks_client=networks_client)
|
name, networks_client=networks_client)
|
||||||
subnet = self._create_ipv6_subnet(network, cidr="4010::/64",
|
subnet = self._create_ipv6_subnet(network, cidr="4010::/64",
|
||||||
slaac=True)
|
slaac=True)
|
||||||
rtr_name = data_utils.rand_name("ipv6-rtr")
|
rtr_name = data_utils.rand_name("ipv6-rtr")
|
||||||
router = self.create_topology_router(
|
router = self.create_topology_router(
|
||||||
rtr_name, routers_client=self.cmgr_adm.routers_client)
|
rtr_name, routers_client=self.cmgr_adm.routers_client)
|
||||||
|
@ -173,15 +180,15 @@ class IPv6RoutersTest(feature_manager.FeatureManager):
|
||||||
"""
|
"""
|
||||||
name = data_utils.rand_name("ipv6-net")
|
name = data_utils.rand_name("ipv6-net")
|
||||||
networks_client = self.cmgr_adm.networks_client
|
networks_client = self.cmgr_adm.networks_client
|
||||||
network = self.create_topology_network(name,
|
network = self.create_topology_network(
|
||||||
networks_client=networks_client)
|
name, networks_client=networks_client)
|
||||||
subnet_client = self.cmgr_adm.subnets_client
|
subnet_client = self.cmgr_adm.subnets_client
|
||||||
subnet_name = network['name'] + 'ipv4-sub'
|
subnet_name = network['name'] + 'ipv4-sub'
|
||||||
subnet_ipv4 = self.create_topology_subnet(subnet_name, network,
|
subnet_ipv4 = self.create_topology_subnet(
|
||||||
subnets_client=subnet_client,
|
subnet_name, network, subnets_client=subnet_client,
|
||||||
cidr='20.20.0.0/16')
|
cidr='20.20.0.0/16')
|
||||||
subnet = self._create_ipv6_subnet(network, cidr="4011::/64",
|
subnet = self._create_ipv6_subnet(network, cidr="4011::/64",
|
||||||
slaac=True)
|
slaac=True)
|
||||||
rtr_name = data_utils.rand_name("ipv6-rtr")
|
rtr_name = data_utils.rand_name("ipv6-rtr")
|
||||||
router = self.create_topology_router(
|
router = self.create_topology_router(
|
||||||
rtr_name, routers_client=self.cmgr_adm.routers_client)
|
rtr_name, routers_client=self.cmgr_adm.routers_client)
|
||||||
|
@ -202,14 +209,14 @@ class IPv6RoutersTest(feature_manager.FeatureManager):
|
||||||
"""
|
"""
|
||||||
name = data_utils.rand_name("ipv6-net")
|
name = data_utils.rand_name("ipv6-net")
|
||||||
networks_client = self.cmgr_adm.networks_client
|
networks_client = self.cmgr_adm.networks_client
|
||||||
network = self.create_topology_network(name,
|
network = self.create_topology_network(
|
||||||
networks_client=networks_client)
|
name, networks_client=networks_client)
|
||||||
subnet = self._create_ipv6_subnet(network, cidr="4012::/64",
|
subnet = self._create_ipv6_subnet(network, cidr="4012::/64",
|
||||||
slaac=True)
|
slaac=True)
|
||||||
network_1 = self.create_topology_network(name,
|
network_1 = self.create_topology_network(
|
||||||
networks_client=networks_client)
|
name, networks_client=networks_client)
|
||||||
subnet_1 = self._create_ipv6_subnet(network_1, cidr="4013::/64",
|
subnet_1 = self._create_ipv6_subnet(network_1, cidr="4013::/64",
|
||||||
slaac=True)
|
slaac=True)
|
||||||
rtr_name = data_utils.rand_name("ipv6-rtr")
|
rtr_name = data_utils.rand_name("ipv6-rtr")
|
||||||
router = self.create_topology_router(
|
router = self.create_topology_router(
|
||||||
rtr_name, routers_client=self.cmgr_adm.routers_client)
|
rtr_name, routers_client=self.cmgr_adm.routers_client)
|
||||||
|
@ -230,18 +237,18 @@ class IPv6RoutersTest(feature_manager.FeatureManager):
|
||||||
"""
|
"""
|
||||||
name = data_utils.rand_name("ipv6-net")
|
name = data_utils.rand_name("ipv6-net")
|
||||||
networks_client = self.cmgr_adm.networks_client
|
networks_client = self.cmgr_adm.networks_client
|
||||||
network = self.create_topology_network(name,
|
network = self.create_topology_network(
|
||||||
networks_client=networks_client)
|
name, networks_client=networks_client)
|
||||||
subnet_client = self.cmgr_adm.subnets_client
|
subnet_client = self.cmgr_adm.subnets_client
|
||||||
subnet_name = network['name'] + 'ipv4-sub'
|
subnet_name = network['name'] + 'ipv4-sub'
|
||||||
subnet_ipv4 = self.create_topology_subnet(subnet_name, network,
|
subnet_ipv4 = self.create_topology_subnet(
|
||||||
subnets_client=subnet_client,
|
subnet_name, network, subnets_client=subnet_client,
|
||||||
cidr='20.21.0.0/16')
|
cidr='20.21.0.0/16')
|
||||||
subnet = self._create_ipv6_subnet(network, cidr="4200::/64")
|
subnet = self._create_ipv6_subnet(network, cidr="4200::/64")
|
||||||
network_1 = self.create_topology_network(name,
|
network_1 = self.create_topology_network(
|
||||||
networks_client=networks_client)
|
name, networks_client=networks_client)
|
||||||
subnet_ipv4_1 = self.create_topology_subnet(subnet_name, network_1,
|
subnet_ipv4_1 = self.create_topology_subnet(
|
||||||
subnets_client=subnet_client,
|
subnet_name, network_1, subnets_client=subnet_client,
|
||||||
cidr='20.22.0.0/16')
|
cidr='20.22.0.0/16')
|
||||||
subnet_1 = self._create_ipv6_subnet(network_1, cidr="4201::/64")
|
subnet_1 = self._create_ipv6_subnet(network_1, cidr="4201::/64")
|
||||||
rtr_name = data_utils.rand_name("ipv6-rtr")
|
rtr_name = data_utils.rand_name("ipv6-rtr")
|
||||||
|
@ -272,22 +279,22 @@ class IPv6RoutersTest(feature_manager.FeatureManager):
|
||||||
"""
|
"""
|
||||||
name = data_utils.rand_name("dual-net")
|
name = data_utils.rand_name("dual-net")
|
||||||
networks_client = self.cmgr_adm.networks_client
|
networks_client = self.cmgr_adm.networks_client
|
||||||
network = self.create_topology_network(name,
|
network = self.create_topology_network(
|
||||||
networks_client=networks_client)
|
name, networks_client=networks_client)
|
||||||
subnet_client = self.cmgr_adm.subnets_client
|
subnet_client = self.cmgr_adm.subnets_client
|
||||||
subnet_name = network['name'] + 'ipv4-sub'
|
subnet_name = network['name'] + 'ipv4-sub'
|
||||||
subnet_ipv4 = self.create_topology_subnet(subnet_name, network,
|
subnet_ipv4 = self.create_topology_subnet(
|
||||||
subnets_client=subnet_client,
|
subnet_name, network, subnets_client=subnet_client,
|
||||||
cidr='20.21.0.0/16')
|
cidr='20.21.0.0/16')
|
||||||
subnet = self._create_ipv6_subnet(network, cidr="4012::/64",
|
subnet = self._create_ipv6_subnet(network, cidr="4012::/64",
|
||||||
slaac=True)
|
slaac=True)
|
||||||
network_1 = self.create_topology_network(name,
|
network_1 = self.create_topology_network(
|
||||||
networks_client=networks_client)
|
name, networks_client=networks_client)
|
||||||
subnet_ipv4_1 = self.create_topology_subnet(subnet_name, network_1,
|
subnet_ipv4_1 = self.create_topology_subnet(
|
||||||
subnets_client=subnet_client,
|
subnet_name, network_1, subnets_client=subnet_client,
|
||||||
cidr='20.22.0.0/16')
|
cidr='20.22.0.0/16')
|
||||||
subnet_1 = self._create_ipv6_subnet(network_1, cidr="4013::/64",
|
subnet_1 = self._create_ipv6_subnet(network_1, cidr="4013::/64",
|
||||||
slaac=True)
|
slaac=True)
|
||||||
rtr_name = data_utils.rand_name("ipv6-rtr")
|
rtr_name = data_utils.rand_name("ipv6-rtr")
|
||||||
router = self.create_topology_router(
|
router = self.create_topology_router(
|
||||||
rtr_name, routers_client=self.cmgr_adm.routers_client)
|
rtr_name, routers_client=self.cmgr_adm.routers_client)
|
||||||
|
@ -350,8 +357,8 @@ class IPv6RoutersTest(feature_manager.FeatureManager):
|
||||||
"nexthop": next_hop
|
"nexthop": next_hop
|
||||||
}]
|
}]
|
||||||
router_id = router_state['id']
|
router_id = router_state['id']
|
||||||
router = self.cmgr_adm.routers_client.update_router(router_id,
|
router = self.cmgr_adm.routers_client.update_router(
|
||||||
routes=routes)['router']
|
router_id, routes=routes)['router']
|
||||||
self.assertEqual(router['routes'][0]['nexthop'], next_hop)
|
self.assertEqual(router['routes'][0]['nexthop'], next_hop)
|
||||||
self.assertEqual(router['routes'][0]['destination'], dest)
|
self.assertEqual(router['routes'][0]['destination'], dest)
|
||||||
self.cmgr_adm.routers_client.update_router(router_id, routes=[])
|
self.cmgr_adm.routers_client.update_router(router_id, routes=[])
|
||||||
|
@ -376,8 +383,8 @@ class IPv6RoutersTest(feature_manager.FeatureManager):
|
||||||
"nexthop": next_hop
|
"nexthop": next_hop
|
||||||
}]
|
}]
|
||||||
router_id = router_state['id']
|
router_id = router_state['id']
|
||||||
router = self.cmgr_adm.routers_client.update_router(router_id,
|
router = self.cmgr_adm.routers_client.update_router(
|
||||||
routes=routes)['router']
|
router_id, routes=routes)['router']
|
||||||
self.assertEqual(router['routes'][0]['nexthop'], next_hop)
|
self.assertEqual(router['routes'][0]['nexthop'], next_hop)
|
||||||
self.assertEqual(router['routes'][0]['destination'], dest)
|
self.assertEqual(router['routes'][0]['destination'], dest)
|
||||||
self.cmgr_adm.routers_client.update_router(router_id, routes=[])
|
self.cmgr_adm.routers_client.update_router(router_id, routes=[])
|
||||||
|
@ -470,3 +477,168 @@ class IPv6RoutersTest(feature_manager.FeatureManager):
|
||||||
self.assertRaises(exceptions.Conflict,
|
self.assertRaises(exceptions.Conflict,
|
||||||
self.cmgr_adm.routers_client.delete_router,
|
self.cmgr_adm.routers_client.delete_router,
|
||||||
router['id'])
|
router['id'])
|
||||||
|
|
||||||
|
@decorators.attr(type=['nsxv3', 'positive'])
|
||||||
|
@decorators.idempotent_id('85235d0f-89b5-48a0-a3ed-d1bd21be6b94')
|
||||||
|
def test_multiple_dhcpv6_stateful_downlink_interface_rtr(self):
|
||||||
|
"""Test creating multiple dhcpv6 subnets attached
|
||||||
|
to router downlink interface
|
||||||
|
"""
|
||||||
|
name = data_utils.rand_name("ipv6-net")
|
||||||
|
networks_client = self.cmgr_adm.networks_client
|
||||||
|
network = self.create_topology_network(
|
||||||
|
name, networks_client=networks_client)
|
||||||
|
subnet = self._create_ipv6_subnet(
|
||||||
|
network, ipv6_ra_mode="dhcpv6-stateful",
|
||||||
|
ipv6_address_mode="dhcpv6-stateful", enable_dhcp=True,
|
||||||
|
cidr="4012::/64")
|
||||||
|
network_1 = self.create_topology_network(
|
||||||
|
name, networks_client=networks_client)
|
||||||
|
subnet_1 = self._create_ipv6_subnet(
|
||||||
|
network_1, ipv6_ra_mode="dhcpv6-stateful",
|
||||||
|
ipv6_address_mode="dhcpv6-stateful", enable_dhcp=True,
|
||||||
|
cidr="4013::/64")
|
||||||
|
rtr_name = data_utils.rand_name("ipv6-rtr")
|
||||||
|
router = self.create_topology_router(
|
||||||
|
rtr_name, routers_client=self.cmgr_adm.routers_client)
|
||||||
|
interface = self.add_router_interface(
|
||||||
|
router_client=self.cmgr_adm.routers_client,
|
||||||
|
router_id=router['id'], subnet_id=subnet['id'])
|
||||||
|
self.assertEqual(subnet['id'], interface['subnet_id'])
|
||||||
|
interface = self.add_router_interface(
|
||||||
|
router_client=self.cmgr_adm.routers_client,
|
||||||
|
router_id=router['id'], subnet_id=subnet_1['id'])
|
||||||
|
self.assertEqual(subnet_1['id'], interface['subnet_id'])
|
||||||
|
|
||||||
|
@decorators.attr(type=['nsxv3', 'positive'])
|
||||||
|
@decorators.idempotent_id('85235d0f-89b5-48a0-a3ed-d1bd21be6b94')
|
||||||
|
def test_multiple_dhcpv6_stateless_downlink_interface_rtr(self):
|
||||||
|
"""Test creating multiple dhcpv6 subnets attached
|
||||||
|
to router downlink interface
|
||||||
|
"""
|
||||||
|
name = data_utils.rand_name("ipv6-net")
|
||||||
|
networks_client = self.cmgr_adm.networks_client
|
||||||
|
network = self.create_topology_network(
|
||||||
|
name, networks_client=networks_client)
|
||||||
|
mode = "dhcpv6-stateless"
|
||||||
|
subnet = self._create_ipv6_subnet(network,
|
||||||
|
ipv6_ra_mode=mode,
|
||||||
|
ipv6_address_mode=mode,
|
||||||
|
enable_dhcp=True,
|
||||||
|
cidr="4012::/64")
|
||||||
|
network_1 = self.create_topology_network(
|
||||||
|
name, networks_client=networks_client)
|
||||||
|
mode = "dhcpv6-stateless"
|
||||||
|
subnet_1 = self._create_ipv6_subnet(network_1,
|
||||||
|
ipv6_ra_mode=mode,
|
||||||
|
ipv6_address_mode=mode,
|
||||||
|
enable_dhcp=True,
|
||||||
|
cidr="4013::/64")
|
||||||
|
rtr_name = data_utils.rand_name("ipv6-rtr")
|
||||||
|
router = self.create_topology_router(
|
||||||
|
rtr_name, routers_client=self.cmgr_adm.routers_client)
|
||||||
|
interface = self.add_router_interface(
|
||||||
|
router_client=self.cmgr_adm.routers_client,
|
||||||
|
router_id=router['id'], subnet_id=subnet['id'])
|
||||||
|
self.assertEqual(subnet['id'], interface['subnet_id'])
|
||||||
|
interface = self.add_router_interface(
|
||||||
|
router_client=self.cmgr_adm.routers_client,
|
||||||
|
router_id=router['id'], subnet_id=subnet_1['id'])
|
||||||
|
self.assertEqual(subnet_1['id'], interface['subnet_id'])
|
||||||
|
|
||||||
|
@decorators.attr(type=['nsxv3', 'positive'])
|
||||||
|
@decorators.idempotent_id('85235d0f-89b5-48a0-a3ed-d1bd21be6b94')
|
||||||
|
def test_multiple_dhcpv6_heterogeneous_downlink_interface_rtr(self):
|
||||||
|
"""Test creating multiple dhcpv6 subnets attached
|
||||||
|
to router downlink interface
|
||||||
|
"""
|
||||||
|
name = data_utils.rand_name("ipv6-net")
|
||||||
|
networks_client = self.cmgr_adm.networks_client
|
||||||
|
network = self.create_topology_network(
|
||||||
|
name, networks_client=networks_client)
|
||||||
|
subnet = self._create_ipv6_subnet(network,
|
||||||
|
ipv6_ra_mode="dhcpv6-stateful",
|
||||||
|
ipv6_address_mode="dhcpv6-stateful",
|
||||||
|
enable_dhcp=True,
|
||||||
|
cidr="4012::/64")
|
||||||
|
network_1 = self.create_topology_network(
|
||||||
|
name, networks_client=networks_client)
|
||||||
|
mode = "dhcpv6-stateless"
|
||||||
|
subnet_1 = self._create_ipv6_subnet(network_1,
|
||||||
|
ipv6_ra_mode=mode,
|
||||||
|
ipv6_address_mode=mode,
|
||||||
|
enable_dhcp=True,
|
||||||
|
cidr="4013::/64")
|
||||||
|
rtr_name = data_utils.rand_name("ipv6-rtr")
|
||||||
|
router = self.create_topology_router(
|
||||||
|
rtr_name, routers_client=self.cmgr_adm.routers_client)
|
||||||
|
interface = self.add_router_interface(
|
||||||
|
router_client=self.cmgr_adm.routers_client,
|
||||||
|
router_id=router['id'], subnet_id=subnet['id'])
|
||||||
|
self.assertEqual(subnet['id'], interface['subnet_id'])
|
||||||
|
self.assertRaises(exceptions.BadRequest,
|
||||||
|
self.add_router_interface,
|
||||||
|
router_client=self.cmgr_adm.routers_client,
|
||||||
|
router_id=router['id'],
|
||||||
|
subnet_id=subnet_1['id'])
|
||||||
|
|
||||||
|
@decorators.attr(type=['nsxv3', 'positive'])
|
||||||
|
@decorators.idempotent_id('8e7b1e28-e50e-458e-beb4-49ce5663c561')
|
||||||
|
def test_dhcpv6_stateful_ipv4_ipv6_downlink_interface_rtr(self):
|
||||||
|
"""Test creating ipv4 and ipv6 slaac subnets attached
|
||||||
|
to router downlink interface
|
||||||
|
"""
|
||||||
|
name = data_utils.rand_name("ipv6-net")
|
||||||
|
networks_client = self.cmgr_adm.networks_client
|
||||||
|
network = self.create_topology_network(name,
|
||||||
|
networks_client=networks_client)
|
||||||
|
subnet_client = self.cmgr_adm.subnets_client
|
||||||
|
subnet_name = network['name'] + 'ipv4-sub'
|
||||||
|
subnet_ipv4 = self.create_topology_subnet(subnet_name, network,
|
||||||
|
subnets_client=subnet_client,
|
||||||
|
cidr='20.20.0.0/16')
|
||||||
|
subnet = self._create_ipv6_subnet(network, cidr="4011::/64",
|
||||||
|
ipv6_ra_mode="dhcpv6-stateful",
|
||||||
|
ipv6_address_mode="dhcpv6-stateful")
|
||||||
|
rtr_name = data_utils.rand_name("ipv6-rtr")
|
||||||
|
router = self.create_topology_router(
|
||||||
|
rtr_name, routers_client=self.cmgr_adm.routers_client)
|
||||||
|
interface = self.add_router_interface(
|
||||||
|
router_client=self.cmgr_adm.routers_client,
|
||||||
|
router_id=router['id'], subnet_id=subnet_ipv4['id'])
|
||||||
|
self.assertEqual(subnet_ipv4['id'], interface['subnet_id'])
|
||||||
|
interface = self.add_router_interface(
|
||||||
|
router_client=self.cmgr_adm.routers_client,
|
||||||
|
router_id=router['id'], subnet_id=subnet['id'])
|
||||||
|
self.assertEqual(subnet['id'], interface['subnet_id'])
|
||||||
|
|
||||||
|
@decorators.attr(type=['nsxv3', 'positive'])
|
||||||
|
@decorators.idempotent_id('8e7b1e28-e50e-458e-beb4-49ce5663c561')
|
||||||
|
def test_dhcpv6_stateless_ipv4_ipv6_downlink_interface_rtr(self):
|
||||||
|
"""Test creating ipv4 and ipv6 slaac subnets attached
|
||||||
|
to router downlink interface
|
||||||
|
"""
|
||||||
|
name = data_utils.rand_name("ipv6-net")
|
||||||
|
networks_client = self.cmgr_adm.networks_client
|
||||||
|
network = self.create_topology_network(name,
|
||||||
|
networks_client=networks_client)
|
||||||
|
subnet_client = self.cmgr_adm.subnets_client
|
||||||
|
subnet_name = network['name'] + 'ipv4-sub'
|
||||||
|
subnet_ipv4 = self.create_topology_subnet(subnet_name, network,
|
||||||
|
subnets_client=subnet_client,
|
||||||
|
cidr='20.20.0.0/16')
|
||||||
|
mode = "dhcpv6-stateless"
|
||||||
|
subnet = self._create_ipv6_subnet(network, cidr="4011::/64",
|
||||||
|
ipv6_ra_mode=mode,
|
||||||
|
ipv6_address_mode=mode)
|
||||||
|
rtr_name = data_utils.rand_name("ipv6-rtr")
|
||||||
|
router = self.create_topology_router(
|
||||||
|
rtr_name, routers_client=self.cmgr_adm.routers_client)
|
||||||
|
interface = self.add_router_interface(
|
||||||
|
router_client=self.cmgr_adm.routers_client,
|
||||||
|
router_id=router['id'], subnet_id=subnet_ipv4['id'])
|
||||||
|
self.assertEqual(subnet_ipv4['id'], interface['subnet_id'])
|
||||||
|
interface = self.add_router_interface(
|
||||||
|
router_client=self.cmgr_adm.routers_client,
|
||||||
|
router_id=router['id'], subnet_id=subnet['id'])
|
||||||
|
self.assertEqual(subnet['id'], interface['subnet_id'])
|
||||||
|
|
Loading…
Reference in New Issue