- @staticmethod
- def vpp_set_lisp_eid_table(node, eid_table):
- """Set lisp eid tables on VPP node in topology.
-
- :param node: VPP node.
- :param eid_table: Dictionary containing information of eid_table.
- :type node: dict
- :type eid_table: dict
- """
-
- if node['type'] != NodeType.DUT:
- raise ValueError('Node is not DUT')
-
- lisp_locator_set = LispLocatorSet()
- lisp_eid = LispLocalEid()
- for eid in eid_table:
- vni = eid.get('vni')
- eid_address = eid.get('eid')
- eid_prefix_len = eid.get('eid-prefix-len')
- locator_set_name = eid.get('locator-set')
- lisp_locator_set.vpp_add_lisp_locator_set(node, locator_set_name)
- lisp_eid.vpp_add_lisp_local_eid(node,
- locator_set_name,
- vni,
- eid_address,
- eid_prefix_len)
-
- @staticmethod
- def vpp_unset_lisp_eid_table(node, eid_table):
- """Unset lisp eid tables on VPP node in topology.
-
- :param node: VPP node.
- :param eid_table: Dictionary containing information of eid_table.
- :type node: dict
- :type eid_table: dict
- """
-
- if node['type'] != NodeType.DUT:
- raise ValueError('Node is not DUT')
-
- locator_set_list = []
- lisp_locator_set = LispLocatorSet()
- lisp_eid = LispLocalEid()
- for eid in eid_table:
- vni = eid.get('vni')
- eid_address = eid.get('eid')
- eid_prefix_len = eid.get('eid-prefix-len')
- locator_set_name = eid.get('locator-set')
- if locator_set_name not in locator_set_list:
- locator_set_list.append(locator_set_name)
-
- lisp_eid.vpp_del_lisp_local_eid(node,
- locator_set_name,
- vni,
- eid_address,
- eid_prefix_len)
-
- for locator_set_name in locator_set_list:
- lisp_locator_set.vpp_del_lisp_locator_set(node, locator_set_name)
-
- @staticmethod
- def vpp_set_lisp_map_resolver(node, map_resolver):
- """Set lisp map resolvers on VPP node in topology.
-
- :param node: VPP node.
- :param map_resolver: Dictionary containing information of map resolver.
- :type node: dict
- :type map_resolver: dict
- """
-
- lisp_map_res = LispMapResolver()
- for map_ip in map_resolver:
- lisp_map_res.vpp_add_map_resolver(node, map_ip.get('map resolver'))