- eid = 'Bad eid type'
- if eid_details["eid_type"] == 0:
- prefix = str(eid_details["eid_prefix_len"])
- eid = str(IPv4Address(eid_details["eid"][0:4])) + "/" + prefix
- elif eid_details["eid_type"] == 1:
- prefix = str(eid_details["eid_prefix_len"])
- eid = str(IPv6Address(eid_details["eid"])) + "/" + prefix
- elif eid_details["eid_type"] == 2:
- eid = str(L2Util.bin_to_mac(eid_details["eid"][0:6]))
- data.append({"action": eid_details["action"],
- "is_local": eid_details["is_local"],
- "eid": eid,
- "vni": eid_details["vni"],
- "ttl": eid_details["ttl"],
- "authoritative": eid_details["authoritative"]})
+ eid = u"Bad eid type"
+ if eid_details[u"eid_type"] == 0:
+ prefix = str(eid_details[u"eid_prefix_len"])
+ eid = str(IPv4Address(eid_details[u"eid"][0:4])) + u"/" + \
+ prefix
+ elif eid_details[u"eid_type"] == 1:
+ prefix = str(eid_details[u"eid_prefix_len"])
+ eid = str(IPv6Address(eid_details[u"eid"])) + u"/" + prefix
+ elif eid_details[u"eid_type"] == 2:
+ eid = str(L2Util.bin_to_mac(eid_details[u"eid"][0:6]))
+ data.append(
+ {
+ u"action": eid_details[u"action"],
+ u"is_local": eid_details[u"is_local"],
+ u"eid": eid,
+ u"vni": eid_details[u"vni"],
+ u"ttl": eid_details[u"ttl"],
+ u"authoritative": eid_details[u"authoritative"]
+ }
+ )