class VirtualRepoCompleter(object): def __call__(self, prefix, parsed_args, **kwargs): self.httpClient = HttpClient(hostname=parsed_args.hostname, port=parsed_args.port) response = self.httpClient.queryVirtual({}) repo_str = response.read() return (reponame for reponame in repo_str.splitlines() if reponame.startswith(prefix))