def __init__(self, sandesh_instance, client, collectors, stats_collector):
     self._sandesh_instance = sandesh_instance
     self._logger = sandesh_instance.logger()
     self._client = client
     # Collector name. Updated upon receiving the control message
     # from the Collector during connection negotiation.
     self._admin_down = False
     self._state_machine = SandeshStateMachine(self, self._logger,
                                               collectors, stats_collector)
     self._state_machine.initialize()
 def __init__(self, sandesh_instance, client, primary_collector,
              secondary_collector, discovery_client):
     self._sandesh_instance = sandesh_instance
     self._logger = sandesh_instance.logger()
     self._client = client
     self._primary_collector = primary_collector
     self._secondary_collector = secondary_collector
     # Collector name. Updated upon receiving the control message
     # from the Collector during connection negotiation.
     self._collector = None
     self._admin_down = False
     self._state_machine = SandeshStateMachine(self, self._logger,
                                               primary_collector,
                                               secondary_collector)
     self._state_machine.initialize()
     from sandesh_common.vns.constants import ModuleNames, Module
     if primary_collector is None and discovery_client is not None:
         discovery_client.subscribe(ModuleNames[Module.COLLECTOR], 2,
                                    self._handle_collector_update)