Skip to content

Commit 36337f0

Browse files
author
Josh Bailey
committed
Multiple router VLAN test needs to support policy route.
1 parent f508e3d commit 36337f0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

faucet/dp.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,11 +1068,15 @@ def resolve_routers():
10681068
all_router_vlans = set()
10691069
for router_name, router in self.routers.items():
10701070
vips = set()
1071+
if router.vlans and len(router.vlans) == 1:
1072+
lone_vlan = router.vlans[0]
1073+
test_config_condition(
1074+
lone_vlan in all_router_vlans, 'single VLAN %s in more than one router' % lone_vlan)
10711075
for vlan in router.vlans:
10721076
vips.update({vip for vip in vlan.faucet_vips if not vip.ip.is_link_local})
10731077
test_config_condition(
10741078
vlan in all_router_vlans, 'VLAN %s in more than one router' % vlan)
1075-
all_router_vlans.add(vlan)
1079+
all_router_vlans.update(router.vlans)
10761080
for vip in vips:
10771081
for other_vip in vips - set([vip]):
10781082
test_config_condition(

0 commit comments

Comments
 (0)