+class LispAdjacency(object):
+ """Class for lisp adjacency API."""
+
+ def __init__(self):
+ pass
+
+ @staticmethod
+ def vpp_add_lisp_adjacency(node, vni, deid, deid_prefix, seid,
+ seid_prefix, is_mac=False):
+ """Add lisp adjacency on the VPP node in topology.
+
+ :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 is_mac:
+ deid_prefix = ''
+ seid_prefix = ''
+ else:
+ deid_prefix = '/{}'.format(deid_prefix)
+ seid_prefix = '/{}'.format(seid_prefix)
+ VatExecutor.cmd_from_template(node,
+ 'lisp/add_lisp_adjacency.vat',
+ vni=vni,
+ deid=deid,
+ deid_prefix=deid_prefix,
+ seid=seid,
+ seid_prefix=seid_prefix)
+
+ @staticmethod
+ def vpp_del_lisp_adjacency(node, vni, deid, deid_prefix, seid,
+ seid_prefix):
+ """Delete lisp adjacency on the VPP node in topology.
+
+ :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.
+ :type node: dict
+ :type vni: int
+ :type deid: str
+ :type deid_prefix: int
+ :type seid: str
+ :type seid_prefix: int
+ """
+
+ VatExecutor.cmd_from_template(node,
+ 'lisp/del_lisp_adjacency.vat',
+ vni=vni,
+ deid=deid,
+ deid_prefix=deid_prefix,
+ seid=seid,
+ seid_prefix=seid_prefix)
+
+
+class LispGpeStatus(object):
+ """Clas for LISP GPE status manipulation."""
+
+ def __init__(self):
+ pass
+
+ @staticmethod
+ def vpp_lisp_gpe_enable_disable(node, state):
+ """Change the state of LISP GPE - enable or disable.
+
+ :param node: VPP node.
+ :param state: Requested state - enable or disable.
+ :type node: dict
+ :type state: str
+ """
+
+ VatExecutor.cmd_from_template(node, 'lisp/lisp_gpe_status.vat',
+ state=state)
+
+