from pylisp.application.lispd.address_tree.container_node import ContainerNode from pylisp.utils.auto_addresses import get_ipv4_address, get_ipv6_address from pylisp.application.lispd.address_tree.authoritative_container_node import AuthContainerNode from pylisp.application.lispd.address_tree.map_server_node import MapServerNode LISTEN_ON = [get_ipv4_address('vlan2'), get_ipv6_address('vlan2')] PROCESS_DATA = False INSTANCES = {0: {1: ContainerNode(prefix=u'0.0.0.0/0', children=[AuthContainerNode(prefix=u'37.77.56.0/21', children=[MapServerNode(prefix=u'37.77.56.32/31', key='testtesttest'), MapServerNode(prefix=u'37.77.56.64/26', key='testtesttest'), MapServerNode(prefix=u'37.77.57.56/30', key='testtesttest')], ddt_nodes=LISTEN_ON)]), 2: ContainerNode(prefix=u'::/0', children=[AuthContainerNode(prefix=u'2A00:8640::/32', children=[MapServerNode(prefix=u'2A00:8640:1::/48', key='testtesttest'), MapServerNode(prefix=u'2A00:8640:1009::/48', key='testtesttest')], ddt_nodes=LISTEN_ON)]), } }
from ipaddress import IPv4Address from pylisp.application.lispd.address_tree.container_node import ContainerNode from pylisp.application.lispd.address_tree.etr_node import ETRNode from pylisp.application.lispd.etr_registration import ETRRegistration from pylisp.packet.lisp.control import LocatorRecord, KEY_ID_HMAC_SHA_1_96 from pylisp.utils.auto_addresses import get_ipv4_address, get_ipv6_address LISTEN_ON = [get_ipv4_address("eth0"), get_ipv6_address("eth0")] # # Load the DDT-Root # from pylisp.application.lispd.utils.ddt_root_loader import load_ddt_root # import os.path # # INSTANCES = load_ddt_root(os.path.join(os.path.dirname(__file__), 'ddt_root')) locators = [ LocatorRecord(priority=1, weight=100, address=get_ipv4_address("eth0")), LocatorRecord(priority=1, weight=100, address=get_ipv6_address("eth0")), ] key_id = KEY_ID_HMAC_SHA_1_96 key = "devdevdev" map_servers = [ ETRRegistration(u"83.247.10.218", key_id=key_id, key=key, proxy_map_reply=True, use_rtr=False), ETRRegistration(u"87.195.109.18", key_id=key_id, key=key, proxy_map_reply=True, use_rtr=True), ] INSTANCES = { 0: { 1: ContainerNode(u"0.0.0.0/0", [ETRNode(u"37.77.57.120/29", locators=locators, map_servers=map_servers)]), 2: ContainerNode(u"::/0", [ETRNode(u"2a00:8640:100d::/48", locators=locators, map_servers=map_servers)]),