aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Bailey <joshb@google.com>2019-07-17 10:35:23 +1200
committerJosh Bailey <joshb@google.com>2019-07-17 10:35:23 +1200
commit7b80c57e95fb0c0ec25f456afaab312e4bfd95fa (patch)
treeda0f826af015f9e429ef870bc9a278fd3bf248c1
parent37df56fbc9a5c890ad2991f6dd2625ab48561ced (diff)
downloadfaucet-7b80c57e95fb0c0ec25f456afaab312e4bfd95fa.tar.gz
faucet-7b80c57e95fb0c0ec25f456afaab312e4bfd95fa.tar.bz2
faucet-7b80c57e95fb0c0ec25f456afaab312e4bfd95fa.zip
Add assigned VLANs/ACLs.
-rwxr-xr-xtests/unit/faucet/test_config.py59
1 files changed, 59 insertions, 0 deletions
diff --git a/tests/unit/faucet/test_config.py b/tests/unit/faucet/test_config.py
index 728d7ad0..bda6f8ff 100755
--- a/tests/unit/faucet/test_config.py
+++ b/tests/unit/faucet/test_config.py
@@ -3084,6 +3084,65 @@ dps:
"""
self.check_config_success(config, cp.dp_parser)
+ def test_dot1x_vlan_config_valid(self):
+ """Test valid dot1x VLAN."""
+ config = """
+vlans:
+ office:
+ vid: 100
+ dyn_vlan:
+ vid: 200
+ dot1x_assigned: True
+dps:
+ sw1:
+ dp_id: 0x1
+ dot1x:
+ nfv_intf: lo
+ nfv_sw_port: 3
+ radius_ip: ::1
+ radius_port: 123
+ radius_secret: SECRET
+ interfaces:
+ 1:
+ native_vlan: office
+ dot1x: True
+ 3:
+ output_only: True
+"""
+ self.check_config_success(config, cp.dp_parser)
+
+ def test_dot1x_acl_config_valid(self):
+ """Test valid dot1x ACL."""
+ config = """
+vlans:
+ office:
+ vid: 100
+acls:
+ denyall:
+ dot1x_assigned: True
+ rules:
+ - rule:
+ actions:
+ allow: False
+dps:
+ sw1:
+ dp_id: 0x1
+ dot1x:
+ nfv_intf: lo
+ nfv_sw_port: 3
+ radius_ip: ::1
+ radius_port: 123
+ radius_secret: SECRET
+ interfaces:
+ 1:
+ native_vlan: office
+ dot1x: True
+ dot1x_dyn_acl: True
+ 3:
+ output_only: True
+"""
+ self.check_config_success(config, cp.dp_parser)
+
def test_dot1x_nfv_port_config_invalid(self):
"""Test valid dot1x."""
config = """