Changes for tools/simu5g/install-simu5g-routes-sandbox.sh: 65 added lines, 6 removed lines.
Original line number
Diff line number
Diff line
@@ -170,9 +170,55 @@ parse_args() {
fi
}
# When the integration config lists ueMappings / mecEndpoints, classify by those
# id prefixes (ue1 → ue1-iperf-…, zone1-edge1 → zone1-edge1-iperf-…). Otherwise
# keep the monaco-harbor default: MEC name starts with MEC_NAME_PREFIX (mep).
MEC_PREFIXES=()
UE_PREFIXES=()
load_config_name_prefixes(){
MEC_PREFIXES=()
UE_PREFIXES=()
[[-f"$CONFIG_FILE"]]||return 0
command-v python3 >/dev/null 2>&1 ||return 0
local mec_line ue_line
mec_line="$(python3 -c'import json,sys; c=json.load(open(sys.argv[1],encoding="utf-8")); print(" ".join(str(m.get("endpointId") or "").strip() for m in (c.get("mecEndpoints") or []) if str(m.get("endpointId") or "").strip()))'"$CONFIG_FILE")"||return 0
ue_line="$(python3 -c'import json,sys; c=json.load(open(sys.argv[1],encoding="utf-8")); print(" ".join(str(u.get("ueId") or "").strip() for u in (c.get("ueMappings") or []) if str(u.get("ueId") or "").strip()))'"$CONFIG_FILE")"||return 0