| Server IP : 199.250.200.62 / Your IP : 216.73.216.15 Web Server : Apache System : Linux vps37394.inmotionhosting.com 3.10.0-1160.119.1.vz7.224.4 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64 User : jasonp18 ( 1000) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/2/cwd/proc/2/cwd/proc/self/root/opt/imh-python/lib/python3.9/site-packages/bakauth/ |
Upload File : |
"""TypedDict typehints for Backup Authority API replies"""
from typing import TypedDict, Union
from restic import ResticRepo
# https://www.python.org/dev/peps/pep-0589/
class SharedFailoverLocks(TypedDict):
"""Return format of get_shared_failover_locks"""
server_lock: Union[int, None] # timestamp
user_locks: list[str] # snapshot IDs
class AgentClientLookup(TypedDict):
"""Reply dict format for support agent bucket lookups for v/ded servers"""
wans: dict[str, str]
repo: ResticRepo
svr_class: str
class AgentCpuserLookup(TypedDict):
"""Reply dict format for support agent bucket lookups for cPanel users"""
wans: dict[str, str]
repo: ResticRepo
class VznodeBackupLookup(TypedDict):
"""Reply dict format for ``BakAuth.vzclient_backup``"""
endpoints: dict[str, str]
node_keys: ResticRepo
vps_keys: dict[int, ResticRepo]
# task_ids is sent by bakauth but not stored in this dict
changed: dict[int, str]
class VznodeRestoreLookup(TypedDict):
"""Reply dict format for ``BakAuth.vzclient_restore``"""
this_endpoint: str
key_info: ResticRepo
all_endpoints: dict[str, str]
class UserBuckets(TypedDict):
"""Reply dict format for ``BakAuth.get_user_buckets``"""
copy_users: list[str]
quotas_gb: dict[str, int]
repos: dict[str, ResticRepo]
missing: list[str]
class RegCopy(TypedDict):
"""Info on a cross-coast cluster"""
name: str
location: str
endpoint: str
class RegDetails(TypedDict):
"""Reply dict format for ``BakAuth.get_reg_details``"""
name: str # cluster name
location: str
svr_class: str # imh_vps, imh_reseller, imh_shared, hub_shared, or imh_ded
client_host: str # short hostname bakauth knows this client as
endpoint: str # url such as https://backups.lax1.imhcloud.net
wans: dict[str, str] # name -> urls for all clusters' wans
copy: RegCopy
repo: ResticRepo