Skip to content

Commit b1f4913

Browse files
authored
Merge pull request #2018 from anarkiwi/master
Add config test/doc for force_port_vlan.
2 parents 2b149b7 + 0b28c25 commit b1f4913

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Faucet
22
======
33

4-
:version: 1.8.0
4+
:version: 1.8.1
55

66
.. image:: https://travis-ci.com/faucetsdn/faucet.svg?branch=master
77
:target: https://travis-ci.com/faucetsdn/faucet

docs/configuration.rst

+4
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,10 @@ is a dictionary of actions to apply upon match.
791791
- False
792792
- If True allow the packet to continue through the Faucet pipeline, if
793793
False drop the packet.
794+
* - force_port_vlan
795+
- boolean
796+
- False
797+
- if True, don't verify VLAN/port association.
794798
* - cookie
795799
- int, 0-2**16
796800
- defaults to datapath cookie value

tests/test_config.py

+25
Original file line numberDiff line numberDiff line change
@@ -1590,6 +1590,31 @@ def test_push_pop_vlans_acl(self):
15901590
"""
15911591
self.check_config_success(config, cp.dp_parser)
15921592

1593+
def test_force_port_vlan(self):
1594+
"""Test push force_port_vlan."""
1595+
config = """
1596+
acls:
1597+
good_acl:
1598+
rules:
1599+
- rule:
1600+
actions:
1601+
allow: 1
1602+
force_port_vlan: 1
1603+
output:
1604+
swap_vid: 101
1605+
vlans:
1606+
guest:
1607+
vid: 100
1608+
dps:
1609+
sw1:
1610+
dp_id: 0x1
1611+
interfaces:
1612+
1:
1613+
tagged_vlans: [100]
1614+
acl_in: good_acl
1615+
"""
1616+
self.check_config_success(config, cp.dp_parser)
1617+
15931618
def test_failover_acl(self):
15941619
"""Test failover ACL fields."""
15951620
config = """

0 commit comments

Comments
 (0)