示例#1
0
    def __init__(self):
        LOG.debug("Instantiating VPN Manager...")

        self.bgp_manager = bgp_manager.Manager()

        self.dataplane_drivers = dp_drivers.instantiate_dataplane_drivers()

        # VPN instance dict
        self.vpn_instances = {}
        self.next_vpn_instance_id = 1

        LOG.debug("Creating label allocator")
        self.label_allocator = identifier_allocators.LabelAllocator()

        LOG.debug("Creating route distinguisher allocator")
        self.rd_allocator = identifier_allocators.RDAllocator(
            self.bgp_manager.get_local_address())

        # dict containing info how an ipvpn is plugged
        # from an evpn  (keys: ipvpn instances)
        self._evpn_ipvpn_ifs = {}

        # keys: vni
        # value: VPNInstance
        self.vpn_instance_by_vni = {}

        self.lock = threading.RLock()
示例#2
0
def cleanup_main():
    logging.register_options(cfg.CONF)

    setup_config()

    fix_log_file()

    setup_logging()

    python_logging.root.name = "[BgpDataplaneCleaner]"

    for vpn_type, dataplane_driver in (
            drivers.instantiate_dataplane_drivers().items()):
        LOG.info("Cleaning dataplane for %s...", vpn_type)
        dataplane_driver.reset_state()

    LOG.info("BGP component dataplanes have been cleaned up.")
示例#3
0
    def __init__(self):
        LOG.debug("Instantiating VPN Manager...")

        self.bgp_manager = bgp_manager.Manager.get_instance()

        self.dataplane_drivers = dp_drivers.instantiate_dataplane_drivers()

        # VPN instance dict
        self.vpn_instances = {}

        LOG.debug("Creating label allocator")
        self.label_allocator = label_allocator.LabelAllocator()

        LOG.debug("Creating route distinguisher allocator")
        self.rd_allocator = rd_allocator.RDAllocator(
            self.bgp_manager.get_local_address())

        # dict containing info how an ipvpn is plugged
        # from an evpn  (keys: ipvpn instances)
        self._evpn_ipvpn_ifs = {}

        self.lock = threading.Lock()