def __init__(self): self.auth = Auth(optionsFromEnvironment(), session=aiohttp_session()) self.secrets = Secrets(optionsFromEnvironment(), session=aiohttp_session()) self.hooks = Hooks(optionsFromEnvironment(), session=aiohttp_session()) self.worker_manager = WorkerManager(optionsFromEnvironment(), session=aiohttp_session())
def __init__(self): self.auth = Auth(optionsFromEnvironment(), session=aiohttp_session()) self.hooks = Hooks(optionsFromEnvironment(), session=aiohttp_session()) self.awsprovisioner = AwsProvisioner(optionsFromEnvironment(), session=aiohttp_session()) self.worker_manager = WorkerManager(optionsFromEnvironment(), session=aiohttp_session())
async def fetch_clients(resources): auth = Auth(optionsFromEnvironment(), session=aiohttp_session()) query = {} while True: res = await auth.listClients(query=query) for clients in res["clients"]: client = Client.from_api(clients) if resources.is_managed(client.id): resources.add(client) if "continuationToken" in res: query["continuationToken"] = res["continuationToken"] else: break
def __init__(self, options, session): "Use `Updater.create()` instead of calling this directly." self.auth = Auth(options, session) self.secrets = Secrets(options, session) self.hooks = Hooks(options, session) self.worker_manager = WorkerManager(options, session)
async def fetch_roles(resources): auth = Auth(await tcClientOptions(), session=aiohttp_session()) for role in await auth.listRoles(): role = Role.from_api(role) if resources.is_managed(role.id): resources.add(role)