+ :param node: VPP node.
+ :param vni: Vni.
+ :param deid: Destination eid address.
+ :param deid_prefix: Destination eid address prefix_len.
+ :param seid: Source eid address.
+ :param seid_prefix: Source eid address prefix_len.
+ :param is_mac: Set to True if the deid/seid is MAC address.
+ :type node: dict
+ :type vni: int
+ :type deid: str
+ :type deid_prefix: int
+ :type seid: str
+ :type seid_prefix: int
+ :type is_mac: bool
+ """
+ if not is_mac:
+ eid_type = 0 if ip_address(deid).version == 4 else 1
+ reid = ip_address(deid).packed
+ leid = ip_address(seid).packed
+ reid_len = deid_prefix
+ leid_len = seid_prefix
+ else:
+ eid_type = 2
+ reid = L2Util.mac_to_bin(deid)
+ leid = L2Util.mac_to_bin(seid)
+ reid_len = 0
+ leid_len = 0
+
+ args = dict(
+ is_add=1,
+ vni=int(vni),
+ eid_type=eid_type,
+ reid=reid,
+ reid_len=reid_len,
+ leid=leid,
+ leid_len=leid_len
+ )
+
+ cmd = u"lisp_add_del_adjacency"
+ err_msg = f"Failed to add lisp adjacency on host {node[u'host']}"
+
+ with PapiSocketExecutor(node) as papi_exec:
+ papi_exec.add(cmd, **args).get_reply(err_msg)