def start(self):
        # Only two main green threads are required for APGW bgp-agent.
        # One for NetworkController, another for BGPS core.

        # If configuration file was provided and loaded successfully. We start
        # BGPS core using these settings. If no configuration file is provided
        # or if configuration file is missing minimum required settings BGPS
        # core is not started.
        if self.config_file:
            LOG.debug('Loading config. from settings file.')
            settings = self.load_config(self.config_file)
            # Configure log settings, if available.
            if getattr(settings, 'LOGGING', None):
                dictConfig(settings.LOGGING)

            if getattr(settings, 'BGP', None):
                self._start_core(settings)

            if getattr(settings, 'SSH', None) is not None:
                hub.spawn(ssh.SSH_CLI_CONTROLLER.start, None, **settings.SSH)
        # Start Network Controller to server RPC peers.
        t = hub.spawn(net_ctrl.NET_CONTROLLER.start, *[],
                      **{net_ctrl.NC_RPC_BIND_IP: self.bind_ip,
                      net_ctrl.NC_RPC_BIND_PORT: self.bind_port})
        LOG.debug('Started Network Controller')

        super(RyuBGPSpeaker, self).start()

        return t
dataset/ETHPy150Open osrg/ryu/ryu/services/protocols/bgp/application.py/RyuBGPSpeaker.start/original