Files
hp-iac/extractors/backup_manager.py
T
2026-08-25 14:10:21 +02:00

22 lines
636 B
Python

import json
import switch_client
import todo
from extractors.xe_page import fetch_tables
PATH = "/UploadFile.html"
def get_backup_manager(session) -> dict:
"""Returns the current backup-config form fields (method, server
address, etc.) — this page is a config form, not a data table, so the
values reflect whatever was last configured/left blank."""
tables = fetch_tables(session, PATH)
return tables["Backup"]["record"]
if __name__ == "__main__":
session = switch_client.get_session()
print(json.dumps(get_backup_manager(session), indent=2))
todo.mark_implemented(switch_client.BASE_URL + PATH)