ofproto_v1_5_parser: Enable setting mask in OFPActionSetField

OpenFlow Sepc 1.5 allows wildcard to be used in set-field
action (EXT-314).
This patch enables setting mask in set-field action.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
Yusuke Iwase 2015-07-22 13:54:31 +09:00 committed by FUJITA Tomonori
parent ecb1d55607
commit 7e313b90fd

View File

@ -5490,11 +5490,14 @@ class OFPActionSetField(OFPAction):
This action modifies a header field in the packet.
The set of keywords available for this is same as OFPMatch.
The set of keywords available for this is same as OFPMatch
which including with/without mask.
Example::
set_field = OFPActionSetField(eth_src="00:00:00:00:00")
set_field = OFPActionSetField(eth_src="00:00:00:00:00:00")
set_field = OFPActionSetField(ipv4_src=("192.168.100.0",
"255.255.255.0"))
"""
def __init__(self, field=None, **kwargs):
super(OFPActionSetField, self).__init__()
@ -5502,7 +5505,6 @@ class OFPActionSetField(OFPAction):
key = list(kwargs.keys())[0]
value = kwargs[key]
assert isinstance(key, (str, six.text_type))
assert not isinstance(value, tuple) # no mask
self.key = key
self.value = value