Signed-off-by: YAMAMOTO Takashi <[email protected]>
---
 ryu/ofproto/ofproto_v1_2_parser.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/ryu/ofproto/ofproto_v1_2_parser.py 
b/ryu/ofproto/ofproto_v1_2_parser.py
index 94e8e2e..23c90dc 100644
--- a/ryu/ofproto/ofproto_v1_2_parser.py
+++ b/ryu/ofproto/ofproto_v1_2_parser.py
@@ -173,6 +173,8 @@ class OFPPort(ofproto_parser.namedtuple('OFPPort', (
         'port_no', 'hw_addr', 'name', 'config', 'state', 'curr',
         'advertised', 'supported', 'peer', 'curr_speed', 'max_speed'))):
 
+    _JSON_FORMATTER = {'hw_addr': addrconv.plain_text}
+
     @classmethod
     def parser(cls, buf, offset):
         port = struct.unpack_from(ofproto_v1_2.OFP_PORT_PACK_STR, buf, offset)
@@ -990,6 +992,9 @@ class OFPGroupMod(MsgBase):
 
 @_set_msg_type(ofproto_v1_2.OFPT_PORT_MOD)
 class OFPPortMod(MsgBase):
+
+    _JSON_FORMATTER = {'hw_addr': addrconv.plain_text}
+
     def __init__(self, datapath, port_no, hw_addr, config, mask, advertise):
         super(OFPPortMod, self).__init__(datapath)
         self.port_no = port_no
-- 
1.8.3.1


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to