예제 #1
0
    def _setup_target_backends(self, pool):
        for target in pool.targets:
            # Fetch an instance of the Backend class
            target.backend = backend.get_backend(target)

        LOG.info('%d targets setup', len(pool.targets))

        if len(pool.targets) == 0:
            raise exceptions.NoPoolTargetsConfigured()

        return pool
예제 #2
0
    def _setup_target_backends(self):
        self.target_backends = {}

        for target in self.pool.targets:
            # Fetch an instance of the Backend class, passing in the options
            # and masters
            self.target_backends[target.id] = backend.get_backend(target)

        LOG.info('%d targets setup', len(self.pool.targets))

        if not self.target_backends:
            raise exceptions.NoPoolTargetsConfigured()