+ :returns: Lisp map resolver as python list.
+ :rtype: list
+ """
+ cmd = u"lisp_map_resolver_dump"
+ err_msg = f"Failed to get LISP map resolver on host {node[u'host']}"
+
+ with PapiSocketExecutor(node) as papi_exec:
+ details = papi_exec.add(cmd).get_details(err_msg)
+
+ data = list()
+ for resolver in details:
+ address = u"Bad is_ipv6 flag"
+ if resolver[u"is_ipv6"] == 0:
+ address = str(IPv4Address(resolver[u"ip_address"][0:4]))
+ elif resolver[u"is_ipv6"] == 1:
+ address = str(IPv6Address(resolver[u"ip_address"]))
+ data.append({u"map resolver": address})
+ return data
+
+ @staticmethod
+ def vpp_show_lisp_map_register(node):
+ """Get LISP Map Register from VPP node.
+
+ :param node: VPP node.
+ :type node: dict
+ :returns: LISP Map Register as python dict.
+ :rtype: dict
+ """
+ cmd = u"show_lisp_map_register_state"
+ err_msg = f"Failed to get LISP map register state on host " \
+ f"{node[u'host']}"
+
+ with PapiSocketExecutor(node) as papi_exec:
+ reply = papi_exec.add(cmd).get_reply(err_msg)
+
+ data = dict()
+ data[u"state"] = u"enabled" if reply[u"is_enabled"] else u"disabled"
+ logger.info(data)
+ return data
+
+ @staticmethod
+ def vpp_show_lisp_map_request_mode(node):
+ """Get LISP Map Request mode from VPP node.
+
+ :param node: VPP node.
+ :type node: dict
+ :returns: LISP Map Request mode as python dict.
+ :rtype: dict
+ """
+ cmd = u"show_lisp_map_request_mode"
+ err_msg = f"Failed to get LISP map request mode on host {node[u'host']}"
+
+ with PapiSocketExecutor(node) as papi_exec:
+ reply = papi_exec.add(cmd).get_reply(err_msg)
+
+ data = dict()
+ data[u"map_request_mode"] = u"src-dst" if reply[u"mode"] \
+ else u"dst-only"
+ logger.info(data)
+ return data
+
+ @staticmethod
+ def vpp_show_lisp_map_server(node):
+ """Get LISP Map Server from VPP node.
+
+ :param node: VPP node.
+ :type node: dict
+ :returns: LISP Map Server as python list.