Initial PoC: find_protection, tagged checkpoints, FLR, mutating catalog. Lab 10.9 status enums (0=Initializing, 1=MeetingSLA). Credentials stay in gitignored config.json.
17 lines
491 B
Python
17 lines
491 B
Python
"""JSON key access. Zerto mixes PascalCase and camelCase across versions."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Any
|
|
|
|
|
|
def pick(row: dict[str, Any], *names: str) -> Any:
|
|
for name in names:
|
|
if name in row and row[name] is not None:
|
|
return row[name]
|
|
lower = {k.lower(): v for k, v in row.items()}
|
|
for name in names:
|
|
if name.lower() in lower and lower[name.lower()] is not None:
|
|
return lower[name.lower()]
|
|
return None
|