Esempio n. 1
0
def _service_check(args: Any) -> None:
    if args.service_name == "storage":
        try:
            Storage.connect(timeout=args.timeout)
            return  # No exception ocurred, success!
        except TimeoutError:
            sys.exit("ERROR: Ert storage not found!")

    raise SystemExit(f"{args.service_name} not implemented")
Esempio n. 2
0
def get_info(project_id: Optional[os.PathLike] = None):
    client = Storage.connect(project=project_id)
    return {
        "baseurl": client.fetch_url(),
        "auth": client.fetch_auth(),
    }