Signed-off-by: YAMAMOTO Takashi <[email protected]>
---
ryu/topology/switches.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/ryu/topology/switches.py b/ryu/topology/switches.py
index cf8fdea..8503598 100644
--- a/ryu/topology/switches.py
+++ b/ryu/topology/switches.py
@@ -26,7 +26,8 @@ from ryu.controller.handler import set_ev_cls
from ryu.controller.handler import MAIN_DISPATCHER, DEAD_DISPATCHER
from ryu.exception import RyuException
from ryu.lib import hub
-from ryu.lib.mac import DONTCARE_STR, haddr_to_str
+from ryu.lib import addrconv
+from ryu.lib.mac import DONTCARE_STR
from ryu.lib.dpid import dpid_to_str, str_to_dpid
from ryu.lib.port_no import port_no_to_str
from ryu.lib.packet import packet, ethernet, lldp
@@ -64,7 +65,7 @@ class Port(object):
self._state = ofpport.state
self.port_no = ofpport.port_no
- self.hw_addr = ofpport.hw_addr
+ self.hw_addr = addrconv.mac.bin_to_text(ofpport.hw_addr)
self.name = ofpport.name
def is_reserved(self):
@@ -82,7 +83,7 @@ class Port(object):
def to_dict(self):
return {'dpid': dpid_to_str(self.dpid),
'port_no': port_no_to_str(self.port_no),
- 'hw_addr': haddr_to_str(self.hw_addr),
+ 'hw_addr': self.hw_addr,
'name': self.name.rstrip('\0')}
# for Switch.del_port()
--
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