X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fcommon%2Fa1pms_api_functions.sh;h=ccc424e65df8a7972d7c95c327e97da53fa40c50;hb=refs%2Fchanges%2F37%2F10837%2F2;hp=8a903b8ff5676541e43b8045327a37b9aae6454b;hpb=cd93844db2fd8a9901fbf4df3b597b138af6e042;p=nonrtric.git diff --git a/test/common/a1pms_api_functions.sh b/test/common/a1pms_api_functions.sh index 8a903b8f..ccc424e6 100644 --- a/test/common/a1pms_api_functions.sh +++ b/test/common/a1pms_api_functions.sh @@ -197,9 +197,6 @@ __export_a1pms_vars() { export A1PMS_CONFIG_CONFIGMAP_NAME=$A1PMS_APP_NAME"-config" export A1PMS_DATA_CONFIGMAP_NAME=$A1PMS_APP_NAME"-data" export A1PMS_PKG_NAME - export CONSUL_HOST - export CONSUL_INTERNAL_PORT - export CONFIG_BINDING_SERVICE export A1PMS_CONFIG_KEY export DOCKER_SIM_NWNAME export A1PMS_HOST_MNT_DIR @@ -462,7 +459,7 @@ start_stopped_a1pms() { # Function to perpare the consul configuration according to the current simulator configuration # args: SDNC|NOSDNC # (Function for test scripts) -prepare_consul_config() { +prepare_a1pms_config() { echo -e $BOLD"Prepare Consul config"$EBOLD echo " Writing consul config for "$A1PMS_APP_NAME" to file: "$2 @@ -479,7 +476,7 @@ prepare_consul_config() { echo -e " Config$BOLD excluding SDNC$EBOLD configuration" else ((RES_CONF_FAIL++)) - __print_err "need two args, SDNC|NOSDNC " $@ + __print_err "need three args, SDNC|NOSDNC HEADER|NOHEADER" $@ exit 1 fi @@ -571,9 +568,7 @@ prepare_consul_config() { config_json=$config_json"\n ]" config_json=$config_json"\n}" - if [ $RUNMODE == "KUBE" ]; then - config_json="{\"config\":"$config_json"}" - fi + config_json="{\"config\":"$config_json"}" printf "$config_json">$2 @@ -2296,9 +2291,9 @@ a1pms_api_put_configuration() { return 1 fi inputJson=$(< $2) - if [ $RUNMODE == "DOCKER" ]; then #In kube the file already has a header - inputJson="{\"config\":"$inputJson"}" - fi + # if [ $RUNMODE == "DOCKER" ]; then #In kube the file already has a header + # inputJson="{\"config\":"$inputJson"}" + # fi file="./tmp/.config.json" echo $inputJson > $file query="/v2/configuration" @@ -2349,7 +2344,9 @@ a1pms_api_get_configuration() { body=${res:0:${#res}-3} targetJson=$(< $2) - targetJson="{\"config\":"$targetJson"}" + # if [ $RUNMODE == "DOCKER" ]; then #In kube the file already has a header + # inputJson="{\"config\":"$inputJson"}" + # fi echo "TARGET JSON: $targetJson" >> $HTTPLOG res=$(python3 ../common/compare_json.py "$targetJson" "$body")