コード例 #1
0
ファイル: drone_manager.py プロジェクト: wenhann/chromiumos
    def initialize(self, base_results_dir, drone_hostnames,
                   results_repository_hostname):
        self._results_dir = base_results_dir
        drones.set_temporary_directory(os.path.join(
            base_results_dir, drone_utility._TEMPORARY_DIRECTORY))

        for hostname in drone_hostnames:
            drone = self._add_drone(hostname)
            drone.call('initialize', base_results_dir)

        if not self._drones:
            # all drones failed to initialize
            raise DroneManagerError('No valid drones found')

        self.refresh_drone_configs()

        logging.info('Using results repository on %s',
                     results_repository_hostname)
        self._results_drone = drones.get_drone(results_repository_hostname)
コード例 #2
0
    def _add_drone(self, hostname):
        """
        Forked from drone_manager.py

        Catches AutoservRunError if the drone fails initialization and does not
        add it to the list of usable drones.

        @param hostname: Hostname of the drone we are trying to add.
        """
        logging.info('Adding drone %s' % hostname)
        drone = drones.get_drone(hostname)
        if drone:
            try:
                drone.call('initialize', self.absolute_path(''))
            except error.AutoservRunError as e:
                logging.error('Failed to initialize drone %s with error: %s',
                              hostname, e)
                return
            self._drones[drone.hostname] = drone
コード例 #3
0
ファイル: drone_manager.py プロジェクト: renormalist/autotest
    def initialize(self, base_results_dir, drone_hostnames, results_repository_hostname):
        self._results_dir = base_results_dir

        for hostname in drone_hostnames:
            self._add_drone(hostname)

        if not self._drones:
            # all drones failed to initialize
            raise DroneManagerError("No valid drones found")

        self.refresh_drone_configs()

        logging.info("Using results repository on %s", results_repository_hostname)
        self._results_drone = drones.get_drone(results_repository_hostname)
        results_installation_dir = global_config.global_config.get_config_value(
            scheduler_config.CONFIG_SECTION, "results_host_installation_directory", default=None
        )
        if results_installation_dir:
            self._results_drone.set_autotest_install_dir(results_installation_dir)
コード例 #4
0
    def initialize(self, base_results_dir, drone_hostnames,
                   results_repository_hostname):
        self._results_dir = base_results_dir

        for hostname in drone_hostnames:
            self._add_drone(hostname)

        if not self._drones:
            # all drones failed to initialize
            raise DroneManagerError('No valid drones found')

        self.refresh_drone_configs()

        logging.info('Using results repository on %s',
                     results_repository_hostname)
        self._results_drone = drones.get_drone(results_repository_hostname)
        results_installation_dir = global_config.global_config.get_config_value(
                scheduler_config.CONFIG_SECTION,
                'results_host_installation_directory', default=None)
        if results_installation_dir:
            self._results_drone.set_autotest_install_dir(
                    results_installation_dir)
コード例 #5
0
 def _add_drone(self, hostname):
     logging.info('Adding drone %s', hostname)
     drone = drones.get_drone(hostname)
     if drone:
         self._drones[drone.hostname] = drone
         drone.call('initialize', self.absolute_path(''))
コード例 #6
0
ファイル: drone_manager.py プロジェクト: wenhann/chromiumos
 def _add_drone(self, hostname):
     logging.info('Adding drone %s' % hostname)
     drone = drones.get_drone(hostname)
     self._drones[drone.hostname] = drone
     return drone
コード例 #7
0
ファイル: drone_manager.py プロジェクト: renormalist/autotest
 def _add_drone(self, hostname):
     logging.info("Adding drone %s" % hostname)
     drone = drones.get_drone(hostname)
     if drone:
         self._drones[drone.hostname] = drone
         drone.call("initialize", self.absolute_path(""))