datapath_join events in Python pass in a dpid and stats dictionary. The
hardware address in stats['ports']['hw_addr'] are "ugly" -- the data
type is a string.
To use the hardware address in Python I have to do the following
(assuming I want an int):
hw_addr = "\0\0" + port[core.HW_ADDR]
hw_addr = struct.unpack("!q", hw_addr)[0]
Two questions:
1. Is there a cleaner way to do the above?
2. Would it make sense to change nox to return either a Long or an
ethernetaddr object instead of the string?
Glen
_______________________________________________
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org