X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fcommon%2Fricsim_api_functions.sh;h=2953eb0a8424d062ff7d394404e50f633ee31a1a;hb=1b732d17463fad74721391b3a87a2a12172da63c;hp=435c208f667479e23827213938e4f3b76490f433;hpb=c9c6839d27aaad72ff7b3140992e0ade4b0f07bb;p=nonrtric.git diff --git a/test/common/ricsim_api_functions.sh b/test/common/ricsim_api_functions.sh index 435c208f..2953eb0a 100644 --- a/test/common/ricsim_api_functions.sh +++ b/test/common/ricsim_api_functions.sh @@ -58,7 +58,7 @@ __RICSIM_kube_scale_zero() { # This function is called for prestarted apps not managed by the test script. __RICSIM_kube_scale_zero_and_wait() { #__kube_scale_and_wait_all_resources $KUBE_A1SIM_NAMESPACE app $KUBE_A1SIM_NAMESPACE"-"$RIC_SIM_PREFIX - __kube_scale_and_wait_all_resources $KUBE_A1SIM_NAMESPACE app # the values of the app label is not known + __kube_scale_and_wait_all_resources $KUBE_A1SIM_NAMESPACE app $KUBE_A1SIM_NAMESPACE"-a1simulator" } # Delete all kube resouces for the app @@ -116,6 +116,12 @@ __RICSIM_statisics_setup() { done } +# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied +# args: - +__RICSIM_test_requirements() { + : +} + ####################################################### @@ -257,7 +263,6 @@ start_ric_simulators() { done fi else - __check_included_image 'RICSIM' if [ $? -eq 1 ]; then echo -e $RED"The Near-RT RIC Simulator app is not included as managed in this test script"$ERED @@ -335,7 +340,11 @@ get_kube_sim_host() { __find_sim_host() { if [ $RUNMODE == "KUBE" ]; then ricname=$(echo "$1" | tr '_' '-') # Kube does not accept underscore in names as docker do - ric_setname="${ricname%-*}" #Extract the stateful set name + if [ -z "$RIC_SIM_COMMON_SVC_NAME" ]; then + ric_setname="${ricname%-*}" #Extract the stateful set name + else + ric_setname=$RIC_SIM_COMMON_SVC_NAME # Use the common svc name in the host name of the sims + fi echo $RIC_SIM_HTTPX"://"$ricname.$ric_setname.$KUBE_A1SIM_NAMESPACE":"$RIC_SIM_PORT else if [ $DOCKER_COMPOSE_VERION == "V1" ]; then