mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-08 13:56:09 +02:00
set default attributes for OFPPortMod
Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
This commit is contained in:
parent
bee4846bc2
commit
aad58663c0
@ -2150,7 +2150,8 @@ class OFPPortMod(MsgBase):
|
||||
]
|
||||
}
|
||||
|
||||
def __init__(self, datapath, port_no, hw_addr, config, mask, advertise):
|
||||
def __init__(self, datapath, port_no=0, hw_addr='00:00:00:00:00:00',
|
||||
config=0, mask=0, advertise=0):
|
||||
super(OFPPortMod, self).__init__(datapath)
|
||||
self.port_no = port_no
|
||||
self.hw_addr = hw_addr
|
||||
|
||||
@ -1763,7 +1763,8 @@ class OFPPortMod(MsgBase):
|
||||
]
|
||||
}
|
||||
|
||||
def __init__(self, datapath, port_no, hw_addr, config, mask, advertise):
|
||||
def __init__(self, datapath, port_no=0, hw_addr='00:00:00:00:00:00',
|
||||
config=0, mask=0, advertise=0):
|
||||
super(OFPPortMod, self).__init__(datapath)
|
||||
self.port_no = port_no
|
||||
self.hw_addr = hw_addr
|
||||
|
||||
@ -3346,7 +3346,8 @@ class OFPPortMod(MsgBase):
|
||||
]
|
||||
}
|
||||
|
||||
def __init__(self, datapath, port_no, hw_addr, config, mask, advertise):
|
||||
def __init__(self, datapath, port_no=0, hw_addr='00:00:00:00:00:00',
|
||||
config=0, mask=0, advertise=0):
|
||||
super(OFPPortMod, self).__init__(datapath)
|
||||
self.port_no = port_no
|
||||
self.hw_addr = hw_addr
|
||||
|
||||
@ -5541,13 +5541,14 @@ class OFPPortMod(MsgBase):
|
||||
]
|
||||
}
|
||||
|
||||
def __init__(self, datapath, port_no, hw_addr, config, mask, properties):
|
||||
def __init__(self, datapath, port_no=0, hw_addr='00:00:00:00:00:00',
|
||||
config=0, mask=0, properties=None):
|
||||
super(OFPPortMod, self).__init__(datapath)
|
||||
self.port_no = port_no
|
||||
self.hw_addr = hw_addr
|
||||
self.config = config
|
||||
self.mask = mask
|
||||
self.properties = properties
|
||||
self.properties = properties or []
|
||||
|
||||
def _serialize_body(self):
|
||||
bin_props = bytearray()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user