X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fcommon%2Fcp_api_functions.sh;h=8e720dd32720431dc872516bda144c52f2f304e8;hb=HEAD;hp=f9f689a7cd121dc0012d84f4bfab3b446d3a3fa2;hpb=712794e78f2c8f1b2aa57ef687deed6bc47c6b10;p=nonrtric.git diff --git a/test/common/cp_api_functions.sh b/test/common/cp_api_functions.sh index f9f689a7..8e720dd3 100644 --- a/test/common/cp_api_functions.sh +++ b/test/common/cp_api_functions.sh @@ -26,7 +26,7 @@ # arg: (selects staging, snapshot, release etc) # is present only for images with staging, snapshot,release tags __CP_imagesetup() { - __check_and_create_image_var CP "CONTROL_PANEL_IMAGE" "CONTROL_PANEL_IMAGE_BASE" "CONTROL_PANEL_IMAGE_TAG" $1 "$CONTROL_PANEL_DISPLAY_NAME" + __check_and_create_image_var CP "CONTROL_PANEL_IMAGE" "CONTROL_PANEL_IMAGE_BASE" "CONTROL_PANEL_IMAGE_TAG" $1 "$CONTROL_PANEL_DISPLAY_NAME" "" } # Pull image from remote repo or use locally built image @@ -63,12 +63,12 @@ __CP_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. __CP_kube_scale_zero_and_wait() { echo -e " CP replicas kept as is" } -# 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. __CP_kube_delete_all() { __kube_delete_all_resources $KUBE_NONRTRIC_NAMESPACE autotest CP @@ -76,7 +76,7 @@ __CP_kube_delete_all() { # Store docker logs # This function is called for apps managed by the test script. -# args: +# args: __CP_store_docker_logs() { if [ $RUNMODE == "KUBE" ]; then kubectl $KUBECONF logs -l "autotest=CP" -n $KUBE_NONRTRIC_NAMESPACE --tail=-1 > $1$2_control-panel.log 2>&1 @@ -92,11 +92,11 @@ __CP_initial_setup() { use_control_panel_http } -# 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: - -__CP_statisics_setup() { +__CP_statistics_setup() { if [ $RUNMODE == "KUBE" ]; then echo "CP $CONTROL_PANEL_APP_NAME $KUBE_NONRTRIC_NAMESPACE" else @@ -172,14 +172,14 @@ __control_panel_export_vars() { export NRT_GATEWAY_APP_NAME export NRT_GATEWAY_EXTERNAL_PORT - export POLICY_AGENT_EXTERNAL_SECURE_PORT + export A1PMS_EXTERNAL_SECURE_PORT export ICS_EXTERNAL_SECURE_PORT if [ $RUNMODE == "KUBE" ]; then export NGW_DOMAIN_NAME=$NRT_GATEWAY_APP_NAME.$KUBE_NONRTRIC_NAMESPACE.svc.cluster.local # suffix needed for nginx name resolution export CP_NGINX_RESOLVER=$CONTROL_PANEL_NGINX_KUBE_RESOLVER else - export POLICY_AGENT_DOMAIN_NAME=$POLICY_AGENT_APP_NAME + export A1PMS_DOMAIN_NAME=$A1PMS_APP_NAME export ICS_DOMAIN_NAME=$ICS_APP_NAME export NGW_DOMAIN_NAME=$NRT_GATEWAY_APP_NAME @@ -200,7 +200,7 @@ start_control_panel() { __check_included_image "CP" 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 "CP" retcode_p=$? @@ -276,7 +276,7 @@ start_control_panel() { dest_file=$SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_HOST_MNT_DIR/$CONTROL_PANEL_CONFIG_FILE - envsubst '${NGW_DOMAIN_NAME},${CP_NGINX_RESOLVER},${NRT_GATEWAY_EXTERNAL_PORT},${POLICY_AGENT_EXTERNAL_SECURE_PORT},${ICS_EXTERNAL_SECURE_PORT},${POLICY_AGENT_DOMAIN_NAME},${ICS_DOMAIN_NAME},${CONTROL_PANEL_PATH_POLICY_PREFIX},${CONTROL_PANEL_PATH_ICS_PREFIX} ,${CONTROL_PANEL_PATH_ICS_PREFIX2}' < $1 > $dest_file + envsubst '${NGW_DOMAIN_NAME},${CP_NGINX_RESOLVER},${NRT_GATEWAY_EXTERNAL_PORT},${A1PMS_EXTERNAL_SECURE_PORT},${ICS_EXTERNAL_SECURE_PORT},${A1PMS_DOMAIN_NAME},${ICS_DOMAIN_NAME},${CONTROL_PANEL_PATH_POLICY_PREFIX},${CONTROL_PANEL_PATH_ICS_PREFIX} ,${CONTROL_PANEL_PATH_ICS_PREFIX2}' < $1 > $dest_file __start_container $CONTROL_PANEL_COMPOSE_DIR "" NODOCKERARGS 1 $CONTROL_PANEL_APP_NAME