コード例 #1
0
    def _router_added(self, router_id, router):
        ri = self._create_router(router_id, router)
        ri.radvd = ra.DaemonMonitor(router['id'], ri.ns_name,
                                    self.process_monitor,
                                    ri.get_internal_device_name)
        self.event_observers.notify(
            adv_svc.AdvancedService.before_router_added, ri)

        self.router_info[router_id] = ri
        ri.create()
        self.process_router_add(ri)

        if ri.is_ha:
            self.process_ha_router_added(ri)
コード例 #2
0
    def initialize(self, process_monitor):
        """Initialize the router on the system.

        This differs from __init__ in that this method actually affects the
        system creating namespaces, starting processes, etc.  The other merely
        initializes the python object.  This separates in-memory object
        initialization from methods that actually go do stuff to the system.

        :param process_monitor: The agent's process monitor instance.
        """
        self.process_monitor = process_monitor
        self.radvd = ra.DaemonMonitor(self.router_id, self.ns_name,
                                      process_monitor,
                                      self.get_internal_device_name)

        self.router_namespace.create()