예제 #1
0
    def _wait_and_validate(self):
        yield defer.gatherResults(self.__waiting)

        # reboot used to be not-a-plugin so we have this hardcoded definition -- but exposing the plugin isn't necessarily a good replacement anyway
        if self.features._get('reboot'):
            from shinysdr.plugins.rebooter import Rebooter
            self.devices.add('rebooter', Rebooter(self.reactor))

        self.__finished = True
        if len(self._service_makers) == 0:
            warnings.warn('No network service defined!')
예제 #2
0
    def _wait_and_validate(self):
        """After all config.wait_for() complete, validate that the configuration is valid."""
        # TODO: Make this method idempotent. (This requires introducing the state "in the middle of waiting", midway between not-finished and finished.) For now, it is expected to be called only once.

        yield defer.gatherResults(self.__waiting)

        # reboot used to be not-a-plugin so we have this hardcoded definition -- but exposing the plugin isn't necessarily a good replacement anyway
        if self.features._get('reboot'):
            from shinysdr.plugins.rebooter import Rebooter
            self.devices.add('rebooter', Rebooter(self.reactor))

        self.__finished = True

        self.features._validate()
        self.devices._validate()
        self.databases._validate()

        if len(self._service_makers) == 0:
            self.__log.warn('No network service defined!')