Exemple #1
0
    def build(self, configSets, worklog):
        """Does the work described by each configSet, in order, returning nothing"""

        worklog.clear_except_metadata()

        configSets = collections.deque(configSets)
        log.info("Running configSets: %s", ', '.join(configSets))

        while configSets:
            configSetName = configSets.popleft()
            if not configSetName in self._configSets:
                raise NoSuchConfigSetError("Error: no ConfigSet named %s exists" % configSetName)

            worklog.put('configSets', configSets)

            configSet = collections.deque(self._configSets[configSetName])
            log.info("Running configSet %s", configSetName)
            while configSet:
                config = configSet.popleft()

                worklog.put('configs', configSet)

                self.run_config(config, worklog)

        log.info("ConfigSets completed")
        worklog.clear()
        platform_utils.clear_reboot_trigger()
    def build(self, configSets, worklog):
        """Does the work described by each configSet, in order, returning nothing"""

        worklog.clear_except_metadata()

        configSets = collections.deque(configSets)
        log.info("Running configSets: %s", ', '.join(configSets))

        while configSets:
            configSetName = configSets.popleft()
            if not configSetName in self._configSets:
                raise NoSuchConfigSetError(
                    "Error: no ConfigSet named %s exists" % configSetName)

            worklog.put('configSets', configSets)

            configSet = collections.deque(self._configSets[configSetName])
            log.info("Running configSet %s", configSetName)
            while configSet:
                config = configSet.popleft()

                worklog.put('configs', configSet)

                self.run_config(config, worklog)

        log.info("ConfigSets completed")
        worklog.clear()
        platform_utils.clear_reboot_trigger()
Exemple #3
0
    def resume(self):
        log.debug("Starting resume")
        platform_utils.set_reboot_trigger()

        self.run_commands()

        contractor = Contractor(self.get('metadata'))

        #TODO: apply services when supported by Windows

        while self.has_key('configs'):
            next_config = self.pop('configs')
            log.debug("Resuming config: %s", next_config.name)
            contractor.run_config(next_config, self)

        if self.has_key('configSets'):
            remaining_sets = self.get('configSets')
            log.debug("Resuming configSets: %s", remaining_sets)
            contractor.build(remaining_sets, self)
        else:
            self.clear()
            platform_utils.clear_reboot_trigger()

        log.debug("Resume completed")
    def resume(self):
        log.debug("Starting resume")
        platform_utils.set_reboot_trigger()

        self.run_commands()

        contractor = Contractor(self.get('metadata'))

        #TODO: apply services when supported by Windows

        while self.has_key('configs'):
            next_config = self.pop('configs')
            log.debug("Resuming config: %s", next_config.name)
            contractor.run_config(next_config, self)

        if self.has_key('configSets'):
            remaining_sets = self.get('configSets')
            log.debug("Resuming configSets: %s", remaining_sets)
            contractor.build(remaining_sets, self)
        else:
            self.clear()
            platform_utils.clear_reboot_trigger()

        log.debug("Resume completed")