Parse OCI compartment IDs for edge recovery
This commit is contained in:
parent
a2de0a6b3b
commit
afb339e1ee
|
|
@ -8162,8 +8162,11 @@ refresh_oci_edge_endpoint() {
|
|||
[[ -n "${candidate_compartment}" ]] && edge_compartments+=("${candidate_compartment}")
|
||||
done < <("${oci_bin}" iam compartment list \
|
||||
--compartment-id "${tenancy_id}" \
|
||||
--compartment-id-in-subtree true --all \
|
||||
--query 'data[].id' --raw-output 2>/dev/null || true)
|
||||
--compartment-id-in-subtree true --all --output json 2>/dev/null \
|
||||
| python3 -c 'import json,sys
|
||||
raw=sys.stdin.read().strip()
|
||||
data=json.loads(raw) if raw else {}
|
||||
print("\\n".join(x.get("id", "") for x in data.get("data", [])))' 2>/dev/null || true)
|
||||
edge_compartments+=("${tenancy_id}")
|
||||
fi
|
||||
for candidate_compartment in "${edge_compartments[@]}"; do
|
||||
|
|
|
|||
Loading…
Reference in New Issue