X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fcommon%2Fa1pms_api_functions.sh;h=bdf363e7c7f707c23d9e2a1b17335d8241074726;hb=refs%2Fchanges%2F81%2F11781%2F1;hp=e39187274414cdbbf1e4e7bd3f1a51a205a8a937;hpb=d03286355ba8f11aacabbee178fe5cb084be7b51;p=nonrtric.git diff --git a/test/common/a1pms_api_functions.sh b/test/common/a1pms_api_functions.sh index e3918727..bdf363e7 100644 --- a/test/common/a1pms_api_functions.sh +++ b/test/common/a1pms_api_functions.sh @@ -25,7 +25,7 @@ # arg: (selects staging, snapshot, release etc) # is present only for images with staging, snapshot,release tags __A1PMS_imagesetup() { - __check_and_create_image_var A1PMS "A1PMS_IMAGE" "A1PMS_IMAGE_BASE" "A1PMS_IMAGE_TAG" $1 "$A1PMS_DISPLAY_NAME" + __check_and_create_image_var A1PMS "A1PMS_IMAGE" "A1PMS_IMAGE_BASE" "A1PMS_IMAGE_TAG" $1 "$A1PMS_DISPLAY_NAME" "" } # Pull image from remote repo or use locally built image @@ -62,12 +62,12 @@ __A1PMS_kube_scale_zero() { } # Scale kubernetes resources to zero and wait until this has been accomplished, if relevant. If not relevant to scale, then do no action. -# This function is called for prestarted apps not managed by the test script. +# This function is called for pre-started apps not managed by the test script. __A1PMS_kube_scale_zero_and_wait() { __kube_scale_and_wait_all_resources $KUBE_NONRTRIC_NAMESPACE app "$KUBE_NONRTRIC_NAMESPACE"-policymanagementservice } -# Delete all kube resouces for the app +# Delete all kube resources for the app # This function is called for apps managed by the test script. __A1PMS_kube_delete_all() { __kube_delete_all_resources $KUBE_NONRTRIC_NAMESPACE autotest A1PMS @@ -75,7 +75,7 @@ __A1PMS_kube_delete_all() { # Store docker logs # This function is called for apps managed by the test script. -# args: +# args: __A1PMS_store_docker_logs() { if [ $RUNMODE == "KUBE" ]; then kubectl $KUBECONF logs -l "autotest=A1PMS" -n $KUBE_NONRTRIC_NAMESPACE --tail=-1 > $1$2_a1pms.log 2>&1 @@ -92,11 +92,11 @@ __A1PMS_initial_setup() { export A1PMS_SIDECAR_JWT_FILE="" } -# Set app short-name, app name and namespace for logging runtime statistics of kubernets pods or docker containers +# Set app short-name, app name and namespace for logging runtime statistics of kubernetes pods or docker containers # For docker, the namespace shall be excluded -# This function is called for apps managed by the test script as well as for prestarted apps. +# This function is called for apps managed by the test script as well as for pre-started apps. # args: - -__A1PMS_statisics_setup() { +__A1PMS_statistics_setup() { if [ $RUNMODE == "KUBE" ]; then echo "A1PMS $A1PMS_APP_NAME $KUBE_NONRTRIC_NAMESPACE" else @@ -238,7 +238,7 @@ start_a1pms() { __check_included_image "A1PMS" retcode_i=$? - # Check if app shall only be used by the testscipt + # Check if app shall only be used by the test script __check_prestarted_image "A1PMS" retcode_p=$? @@ -456,13 +456,13 @@ start_stopped_a1pms() { } -# Function to perpare the consul configuration according to the current simulator configuration +# Function to prepare the a1pms configuration according to the current simulator configuration # args: SDNC|NOSDNC [ ] # (Function for test scripts) prepare_a1pms_config() { echo -e $BOLD"Prepare A1PMS config"$EBOLD - echo " Writing consul config for "$A1PMS_APP_NAME" to file: "$2 + echo " Writing a1pms config for "$A1PMS_APP_NAME" to file: "$2 if [ $# != 2 ] && [ $# != 4 ]; then ((RES_CONF_FAIL++)) @@ -567,13 +567,9 @@ prepare_a1pms_config() { ric_id=${ric%.*.*} #extract pod id from full hosthame ric_id=$(echo "$ric_id" | tr '-' '_') else - if [ $DOCKER_COMPOSE_VERSION == "V1" ]; then - ric_id=$ric - else - ric_id=$(echo "$ric" | tr '-' '_') #ric id still needs underscore as it is different from the container name - fi + ric_id=$(echo "$ric" | tr '-' '_') #ric var still needs underscore as it is different from the container name fi - echo " Found a1 sim: "$ric_id + echo " Found a1 sim: "$ric config_json=$config_json"\n \"name\": \"$ric_id\"," xricfound=0