X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fcommon%2Fricsimulator_api_functions.sh;h=0df800fd6e46e38f72b8d631e952e463e4783375;hb=84ffd4a403baee1b7aa86f9986f0c1659a5a0881;hp=c82be765e99c1efe47eff2b2c625a2b874f5a589;hpb=edea18a8fda2e2201cb3ede7f7af13f610bf4acc;p=nonrtric.git diff --git a/test/common/ricsimulator_api_functions.sh b/test/common/ricsimulator_api_functions.sh index c82be765..0df800fd 100644 --- a/test/common/ricsimulator_api_functions.sh +++ b/test/common/ricsimulator_api_functions.sh @@ -34,13 +34,17 @@ __RICSIM_imagesetup() { # Shall be used for images that does not allow overriding # Both var may contain: 'remote', 'remote-remove' or 'local' __RICSIM_imagepull() { - __check_and_pull_image $1 "$RIC_SIM_DISPLAY_NAME" $RIC_SIM_PREFIX"_"$RIC_SIM_BASE $RIC_SIM_IMAGE + __check_and_pull_image $1 "$RIC_SIM_DISPLAY_NAME" $RIC_SIM_PREFIX"_"$RIC_SIM_BASE RIC_SIM_IMAGE } # Generate a string for each included image using the app display name and a docker images format string +# If a custom image repo is used then also the source image from the local repo is listed # arg: __RICSIM_image_data() { echo -e "$RIC_SIM_DISPLAY_NAME\t$(docker images --format $1 $RIC_SIM_IMAGE)" >> $2 + if [ ! -z "$RIC_SIM_IMAGE_SOURCE" ]; then + echo -e "-- source image --\t$(docker images --format $1 $RIC_SIM_IMAGE_SOURCE)" >> $2 + fi } # Scale kubernetes resources to zero @@ -310,7 +314,7 @@ __find_sim_port() { __find_sim_host() { if [ $RUNMODE == "KUBE" ]; then ricname=$(echo "$1" | tr '_' '-') - for timeout in {1..60}; do + for timeout in {1..500}; do # long waiting time needed in case of starting large number of sims host=$(kubectl get pod $ricname -n $KUBE_NONRTRIC_NAMESPACE -o jsonpath='{.status.podIP}' 2> /dev/null) if [ ! -z "$host" ]; then echo $RIC_SIM_HTTPX"://"$host":"$RIC_SIM_PORT @@ -346,8 +350,12 @@ __execute_curl_to_sim() { echo ${FUNCNAME[1]} "line: "${BASH_LINENO[1]} >> $HTTPLOG proxyflag="" if [ $RUNMODE == "KUBE" ]; then - if [ ! -z "$CLUSTER_KUBE_PROXY_NODEPORT" ]; then - proxyflag=" --proxy http://localhost:$CLUSTER_KUBE_PROXY_NODEPORT" + if [ ! -z "$KUBE_PROXY_PATH" ]; then + if [ $KUBE_PROXY_HTTPX == "http" ]; then + proxyflag=" --proxy $KUBE_PROXY_PATH" + else + proxyflag=" --proxy-insecure --proxy $KUBE_PROXY_PATH" + fi fi fi echo " CMD: $2 $proxyflag" >> $HTTPLOG @@ -471,7 +479,7 @@ sim_post_delete_instances() { # (Function for test scripts) sim_post_delete_all() { __log_conf_start $@ - if [ $# -ne 3 ]; then + if [ $# -ne 2 ]; then __print_err " " $@ return 1 fi