def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.prom_client = faucet_metrics.FaucetMetrics(reg=self._reg) self.bgp = faucet_bgp.FaucetBgp(self.logger, self.exc_logname, self.prom_client, self._send_flow_msgs) self.dot1x = faucet_dot1x.FaucetDot1x(self.logger, self.exc_logname, self.prom_client, self._send_flow_msgs) self.notifier = faucet_event.FaucetEventNotifier( self.get_setting('EVENT_SOCK'), self.prom_client, self.logger) self.valves_manager = valves_manager.ValvesManager( self.logname, self.logger, self.prom_client, self.notifier, self.bgp, self.dot1x, self.get_setting('CONFIG_AUTO_REVERT'), self._send_flow_msgs) self.thread_managers = (self.bgp, self.dot1x, self.prom_client, self.notifier) self.event_sock_hrtbeat_time = int( self.get_setting('EVENT_SOCK_HEARTBEAT') or 0) if self.event_sock_hrtbeat_time > 0: self._VALVE_SERVICES[EventFaucetEventSockHeartbeat] = ( 'event_sock_heartbeat', self.event_sock_hrtbeat_time) self.stack_root_state_update_time = int( self.get_setting('STACK_ROOT_STATE_UPDATE_TIME') or 0) if self.stack_root_state_update_time: self._VALVE_SERVICES[EventFaucetMaintainStackRoot] = ( None, self.stack_root_state_update_time)
def __init__(self, *args, **kwargs): super(Faucet, self).__init__(*args, **kwargs) self.api = kwargs['faucet_experimental_api'] self.metrics = faucet_metrics.FaucetMetrics(reg=self._reg) self.bgp = faucet_bgp.FaucetBgp( self.logger, self.exc_logname, self.metrics, self._send_flow_msgs) self.dot1x = faucet_dot1x.FaucetDot1x( self.logger, self.exc_logname, self.metrics, self._send_flow_msgs) self.notifier = faucet_event.FaucetEventNotifier( self.get_setting('EVENT_SOCK'), self.metrics, self.logger) self.valves_manager = valves_manager.ValvesManager( self.logname, self.logger, self.metrics, self.notifier, self.bgp, self.dot1x, self._send_flow_msgs) self.thread_managers = (self.bgp, self.dot1x, self.metrics, self.notifier)
def __init__(self, *args, **kwargs): super(Faucet, self).__init__(*args, **kwargs) self.api = kwargs['faucet_experimental_api'] self.metrics = faucet_metrics.FaucetMetrics(reg=self._reg) self.bgp = faucet_bgp.FaucetBgp( self.logger, self.exc_logname, self.metrics, self._send_flow_msgs) self.dot1x = faucet_dot1x.FaucetDot1x( self.logger, self.exc_logname, self.metrics, self._send_flow_msgs) self.notifier = faucet_event.FaucetEventNotifier( self.get_setting('EVENT_SOCK'), self.metrics, self.logger) self.valves_manager = valves_manager.ValvesManager( self.logname, self.logger, self.metrics, self.notifier, self.bgp, self.dot1x, self.get_setting('CONFIG_AUTO_REVERT'), self._send_flow_msgs) self.thread_managers = (self.bgp, self.dot1x, self.metrics, self.notifier) self.event_sock_hrtbeat_time = int(self.get_setting('EVENT_SOCK_HEARTBEAT') or 0) if self.event_sock_hrtbeat_time > 0: self._VALVE_SERVICES[EventFaucetEventSockHeartbeat] = ('event_sock_heartbeat', self.event_sock_hrtbeat_time)