def cli(ctx, auth): """flexer manages your nFlex scripts from the terminal.""" cfg = ctx.config["regions"][auth] verify_ssl = ctx.config.get("verify_ssl", False) if "verify_ssl" in cfg: verify_ssl = cfg["verify_ssl"] ctx.cmp = CmpClient(url=cfg['cmp_url'], auth=(cfg['cmp_api_key'], cfg['cmp_api_secret']), verify_ssl=verify_ssl) ctx.nflex = NflexClient(ctx.cmp)
def __init__(self): self.credentials = load_config(CONFIG_FILE) self.cmp = CmpClient(url=self.credentials['cmp_url'], auth=(self.credentials['cmp_username'], self.credentials['cmp_password'])) self.nflex = NflexClient(self.cmp)