diff options
author | YAMAMOTO Takashi <yamamoto@valinux.co.jp> | 2014-01-28 13:18:41 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-01-28 14:42:38 +0900 |
commit | abeb9b7764de22605e8980321486d0a06e587593 (patch) | |
tree | cb2d6a3d274cc7fc48bc78a00b9e9640c4b44932 | |
parent | 578f8e1c977143ee77a14abef85f42637a58b501 (diff) |
ofproto_v1_3_parser: have a default value for push_vlan ethertype
As this would be 0x8100 in most cases, make it the default.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/ofproto/ofproto_v1_3_parser.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ryu/ofproto/ofproto_v1_3_parser.py b/ryu/ofproto/ofproto_v1_3_parser.py index a18eccc8..32ea4cc7 100644 --- a/ryu/ofproto/ofproto_v1_3_parser.py +++ b/ryu/ofproto/ofproto_v1_3_parser.py @@ -21,6 +21,7 @@ from ryu.lib import addrconv from ryu.lib import mac from ryu import utils from ofproto_parser import StringifyMixin, MsgBase, msg_pack_into, msg_str_attr +from . import ether from . import ofproto_parser from . import ofproto_common from . import ofproto_v1_3 @@ -2852,10 +2853,10 @@ class OFPActionPushVlan(OFPAction): ================ ====================================================== Attribute Description ================ ====================================================== - ethertype Ether type + ethertype Ether type. The default is 802.1Q. (0x8100) ================ ====================================================== """ - def __init__(self, ethertype, type_=None, len_=None): + def __init__(self, ethertype=ether.ETH_TYPE_8021Q, type_=None, len_=None): super(OFPActionPushVlan, self).__init__() self.ethertype = ethertype |