File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -252,6 +252,7 @@ if [[ "${GEN_TOPO_DEPLOYMENT_TYPE:-}" == "ALICE_STAGING" ]]; then
252252else
253253 GEN_TOPO_QC_CONSUL_SERVER=alio2-cr1-hv-con01.cern.ch
254254fi
255+ GEN_TOPO_QC_APRICOT_SERVER=` curl -s " http://${GEN_TOPO_QC_CONSUL_SERVER} :8500/v1/kv/o2/runtime/aliecs/vars/apricot_endpoint?raw" `
255256
256257add_QC_from_consul ()
257258{
@@ -268,4 +269,19 @@ add_QC_from_consul()
268269 add_W o2-qc " --config $QC_CONFIG_ARG $2 "
269270}
270271
272+ add_QC_from_apricot ()
273+ {
274+ if [[ ! -z ${GEN_TOPO_QC_JSON_FILE:- } ]]; then
275+ curl -s -o $GEN_TOPO_QC_JSON_FILE " ${GEN_TOPO_QC_APRICOT_SERVER} /${1} ?process=true"
276+ if [[ $? != 0 ]]; then
277+ echo " Error fetching QC JSON $1 "
278+ exit 1
279+ fi
280+ QC_CONFIG_ARG=" json://${GEN_TOPO_QC_JSON_FILE} "
281+ else
282+ QC_CONFIG_ARG=" apricot://${GEN_TOPO_QC_APRICOT_SERVER} $1 "
283+ fi
284+ add_W o2-qc " --config $QC_CONFIG_ARG $2 "
285+ }
286+
271287fi # functions.sh sourced
Original file line number Diff line number Diff line change @@ -26,6 +26,13 @@ add_QC_JSON() {
2626 echo " Error fetching QC JSON $2 "
2727 exit 1
2828 fi
29+ elif [[ ${2} =~ ^apricot://.* ]]; then
30+ TMP_FILENAME=$FETCHTMPDIR /$1 .$RANDOM .$RANDOM .json
31+ curl -s -o $TMP_FILENAME " ${GEN_TOPO_QC_APRICOT_SERVER} /${2/ apricot: \/\/ o2\/ / } ?process=true"
32+ if [[ $? != 0 ]]; then
33+ echo " Error fetching QC JSON $2 "
34+ exit 1
35+ fi
2936 else
3037 TMP_FILENAME=$2
3138 fi
You can’t perform that action at this time.
0 commit comments