diff options
author | Yuichi Ito <ito.yuichi0@gmail.com> | 2014-04-16 10:37:54 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-04-16 15:11:23 +0900 |
commit | f516474c106b6f74c5ee0f34fe33c6f9c8872ecb (patch) | |
tree | b0e2e0258b8f7a990673b8f8c84d6048c884601f | |
parent | 97e88276812a7d3e7f40946671ab72d11479f132 (diff) |
of13: set default attributes for group-related classes
Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/ofproto/ofproto_v1_3_parser.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ryu/ofproto/ofproto_v1_3_parser.py b/ryu/ofproto/ofproto_v1_3_parser.py index 38eeb1fd..13bf3854 100644 --- a/ryu/ofproto/ofproto_v1_3_parser.py +++ b/ryu/ofproto/ofproto_v1_3_parser.py @@ -2687,7 +2687,7 @@ class OFPActionGroup(OFPAction): group_id Group identifier ================ ====================================================== """ - def __init__(self, group_id, type_=None, len_=None): + def __init__(self, group_id=0, type_=None, len_=None): super(OFPActionGroup, self).__init__() self.group_id = group_id @@ -3178,7 +3178,8 @@ class OFPActionExperimenter(OFPAction): class OFPBucket(StringifyMixin): - def __init__(self, weight, watch_port, watch_group, actions, len_=None): + def __init__(self, weight=0, watch_port=ofproto.OFPP_ANY, + watch_group=ofproto.OFPG_ANY, actions=None, len_=None): super(OFPBucket, self).__init__() self.weight = weight self.watch_port = watch_port @@ -3262,7 +3263,8 @@ class OFPGroupMod(MsgBase): ofp.OFPGT_SELECT, group_id, buckets) datapath.send_msg(req) """ - def __init__(self, datapath, command, type_, group_id, buckets): + def __init__(self, datapath, command=ofproto.OFPGC_ADD, + type_=ofproto.OFPGT_ALL, group_id=0, buckets=[]): super(OFPGroupMod, self).__init__(datapath) self.command = command self.type = type_ |