X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=mc-core%2Fmc%2Fqueries%2Fgenerate_runall.py;h=d002a830854651b4dca97a0ebae3b5c1db7b3720;hb=1138f77f0f6a7bc9500cf99db5e0ca17b4cb8af6;hp=51e13d2cb570a950f075665744464aa5335e3cdf;hpb=0eb834e581b25c0ac0a657b1b7d8bb70fe4d2aa9;p=ric-app%2Fmc.git diff --git a/mc-core/mc/queries/generate_runall.py b/mc-core/mc/queries/generate_runall.py index 51e13d2..d002a83 100644 --- a/mc-core/mc/queries/generate_runall.py +++ b/mc-core/mc/queries/generate_runall.py @@ -63,14 +63,16 @@ set -m FIFO_DIR="/tmp/mcl/fifos" -SIMULATOR_MODE=`python /mc/extract_params.py $XAPP_DESCRIPTOR_PATH simulator_mode` +SIMULATOR_MODE=`python /mc/extract_params.py ${XAPP_DESCRIPTOR_PATH}/config-file.json simulator_mode` -DEBUG_MODE=`python /mc/extract_params.py $XAPP_DESCRIPTOR_PATH debug_mode` +DEBUG_MODE=`python /mc/extract_params.py ${XAPP_DESCRIPTOR_PATH}/config-file.json debug_mode` -WINDOW=`python /mc/extract_params.py $XAPP_DESCRIPTOR_PATH measurement_interval` +WINDOW=`python /mc/extract_params.py ${XAPP_DESCRIPTOR_PATH}/config-file.json measurement_interval` -export DBAAS_SERVICE_HOST=`python /mc/extract_params.py $XAPP_DESCRIPTOR_PATH __DBAAS_SERVICE_HOST__` -export DBAAS_SERVICE_PORT=`python /mc/extract_params.py $XAPP_DESCRIPTOR_PATH __DBAAS_SERVICE_PORT__` +RMR_PORT=`python /mc/extract_rmr_port.py ${XAPP_DESCRIPTOR_PATH}/config-file.json rmr-data-out` + +# export DBAAS_SERVICE_HOST=`python /mc/extract_params.py ${XAPP_DESCRIPTOR_PATH}/config-file.json __DBAAS_SERVICE_HOST__` +# export DBAAS_SERVICE_PORT=`python /mc/extract_params.py ${XAPP_DESCRIPTOR_PATH}/config-file.json __DBAAS_SERVICE_PORT__` if [ "$SIMULATOR_MODE" = "true" ] then @@ -84,14 +86,14 @@ then WINDOW="10000" fi -VES_COLLECTOR=`python /mc/extract_params.py $XAPP_DESCRIPTOR_PATH ves_collector_address` +VES_COLLECTOR=`python /mc/extract_params.py ${XAPP_DESCRIPTOR_PATH}/config-file.json ves_collector_address` VES_NAME=`echo $VES_COLLECTOR | awk 'BEGIN{FS=":"} {print $1}'` VES_PORT=`echo $VES_COLLECTOR | awk 'BEGIN{FS=":"} {print $2}'` VES_IP=`getent ahosts $VES_NAME | awk '{ print $1; exit }'` -echo "Clearing MC NIB namespace" -/mc/gs-lite/bin/mc_clear +echo "Clearing MC NIB namespace" >&2 +/mc/gs-lite/bin/mc_clear >&2 echo "Storing MC NIB schemas" >&2 /mc/gs-lite/bin/mc_store_schema >&2 @@ -119,12 +121,17 @@ fi runall += """ +if [ "$RMR_PORT" != "" ] +then + RMR_OPTION="-R $RMR_PORT" +fi + # invoke gsprintconsole_ves gsmcnib for all non-debug queries """ for q in oqy: if "debug" not in q: - runall += " /mc/gs-lite/bin/gsprintconsole_ves -C $VES_IP:$VES_PORT -U /vescollector/eventListener/v7 -V 7 `cat gshub.log` default "+q+" window=$WINDOW &\n" + runall += " /mc/gs-lite/bin/gsprintconsole_ves -C $VES_IP:$VES_PORT -U /vescollector/eventListener/v7 -V 7 $RMR_OPTION `cat gshub.log` default "+q+" window=$WINDOW &\n" keys = nib[q]["keys"] if len(keys)>0: keys_str = ",".join(keys)