of12: 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>
This commit is contained in:
parent
d083895961
commit
97e8827681
@ -1163,7 +1163,7 @@ class OFPActionGroup(OFPAction):
|
|||||||
group_id Group identifier
|
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__()
|
super(OFPActionGroup, self).__init__()
|
||||||
self.group_id = group_id
|
self.group_id = group_id
|
||||||
|
|
||||||
@ -1594,7 +1594,8 @@ class OFPActionExperimenter(OFPAction):
|
|||||||
|
|
||||||
|
|
||||||
class OFPBucket(StringifyMixin):
|
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__()
|
super(OFPBucket, self).__init__()
|
||||||
self.weight = weight
|
self.weight = weight
|
||||||
self.watch_port = watch_port
|
self.watch_port = watch_port
|
||||||
@ -1679,7 +1680,8 @@ class OFPGroupMod(MsgBase):
|
|||||||
ofp.OFPGT_SELECT, group_id, buckets)
|
ofp.OFPGT_SELECT, group_id, buckets)
|
||||||
datapath.send_msg(req)
|
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)
|
super(OFPGroupMod, self).__init__(datapath)
|
||||||
self.command = command
|
self.command = command
|
||||||
self.type = type_
|
self.type = type_
|
||||||
|
Loading…
x
Reference in New Issue
Block a user