- data = list()
- for item in dump.reply[0]["api_reply"]:
- item["memif_details"]["if_name"] = \
- item["memif_details"]["if_name"].rstrip('\x00')
- item["memif_details"]["hw_addr"] = \
- L2Util.bin_to_mac(item["memif_details"]["hw_addr"])
- data.append(item)
+ for memif in details:
+ memif[u"hw_addr"] = str(memif[u"hw_addr"])
+ memif[u"role"] = memif[u"role"].value
+ memif[u"mode"] = memif[u"mode"].value
+ memif[u"flags"] = memif[u"flags"].value \
+ if hasattr(memif[u"flags"], u"value") else int(memif[u"flags"])