mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-08 13:56:09 +02:00
of10: fix json representation of OFPPhyPort.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
93a8487137
commit
9e698c7483
@ -83,6 +83,12 @@ class OFPPhyPort(ofproto_parser.namedtuple('OFPPhyPort', (
|
||||
'port_no', 'hw_addr', 'name', 'config', 'state', 'curr', 'advertised',
|
||||
'supported', 'peer'))):
|
||||
|
||||
_TYPE = {
|
||||
'ascii': [
|
||||
'hw_addr',
|
||||
]
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def parser(cls, buf, offset):
|
||||
port = struct.unpack_from(ofproto_v1_0.OFP_PHY_PORT_PACK_STR,
|
||||
@ -2102,6 +2108,13 @@ class OFPFlowMod(MsgBase):
|
||||
|
||||
@_set_msg_type(ofproto_v1_0.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