mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-04 20:06:09 +02:00
of13: fix json representation of OFPPort.hw_addr and OFPPortMod.hw_addr
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
94cda7a894
commit
1d24352b30
@ -1746,6 +1746,12 @@ class OFPPort(ofproto_parser.namedtuple('OFPPort', (
|
||||
'port_no', 'hw_addr', 'name', 'config', 'state', 'curr',
|
||||
'advertised', 'supported', 'peer', 'curr_speed', 'max_speed'))):
|
||||
|
||||
_TYPE = {
|
||||
'ascii': [
|
||||
'hw_addr',
|
||||
]
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def parser(cls, buf, offset):
|
||||
port = struct.unpack_from(ofproto_v1_3.OFP_PORT_PACK_STR, buf, offset)
|
||||
@ -2409,6 +2415,13 @@ class OFPGroupMod(MsgBase):
|
||||
|
||||
@_set_msg_type(ofproto_v1_3.OFPT_PORT_MOD)
|
||||
class OFPPortMod(MsgBase):
|
||||
|
||||
_TYPE = {
|
||||
'ascii': [
|
||||
'hw_addr',
|
||||
]
|
||||
}
|
||||
|
||||
def __init__(self, datapath, port_no, hw_addr, config, mask, advertise):
|
||||
super(OFPPortMod, self).__init__(datapath)
|
||||
self.port_no = port_no
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user