X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fcommon%2Fdmaapmed_api_functions.sh;h=ef99ee1e98110e03f621ffe9aef3b48b10461260;hb=542d2dbfd8df1fcb011fea3d69d539c5c5fe3667;hp=16e1ad70195f988794a62f0064c63e737cfffdd5;hpb=663566c28930429775ea9921f0e32ddf5253da28;p=nonrtric.git diff --git a/test/common/dmaapmed_api_functions.sh b/test/common/dmaapmed_api_functions.sh index 16e1ad70..ef99ee1e 100644 --- a/test/common/dmaapmed_api_functions.sh +++ b/test/common/dmaapmed_api_functions.sh @@ -92,6 +92,24 @@ __DMAAPMED_initial_setup() { use_dmaapmed_http } +# Set app short-name, app name and namespace for logging runtime statistics of kubernets 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. +# args: - +__DMAAPMED_statisics_setup() { + if [ $RUNMODE == "KUBE" ]; then + echo "DMAAPMED $DMAAP_MED_APP_NAME $KUBE_NONRTRIC_NAMESPACE" + else + echo "DMAAPMED $DMAAP_MED_APP_NAME" + fi +} + +# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied +# args: - +__DMAAPMED_test_requirements() { + : +} + ####################################################### # Set http as the protocol to use for all communication to the Dmaap mediator @@ -112,7 +130,7 @@ use_dmaapmed_https() { # args: __dmaapmed_set_protocoll() { echo -e $BOLD"$DMAAP_MED_DISPLAY_NAME protocol setting"$EBOLD - echo -e " Using $BOLD http $EBOLD towards $DMAAP_MED_DISPLAY_NAME" + echo -e " Using $BOLD $1 $EBOLD towards $DMAAP_MED_DISPLAY_NAME" ## Access to Dmaap mediator @@ -147,7 +165,7 @@ __dmaapmed_export_vars() { export DMAAP_MED_DATA_MOUNT_PATH export DMAAP_MED_HOST_MNT_DIR - export DMAAP_MED_DATA_FILE + export DMAAP_MED_CONTR_DATA_FILE export DMAAP_MED_DATA_CONFIGMAP_NAME=$DMAAP_MED_APP_NAME"-data" if [ $1 == "PROXY" ]; then @@ -165,11 +183,13 @@ __dmaapmed_export_vars() { fi # paths to other components - export ECS_SERVICE_PATH + export ICS_SERVICE_PATH export DMAAP_MED_CONF_SELF_HOST=$(echo $DMAAP_MED_SERVICE_PATH | cut -d: -f1-2) export DMAAP_MED_CONF_SELF_PORT=$(echo $DMAAP_MED_SERVICE_PATH | cut -d: -f3) export MR_SERVICE_PATH + export MR_KAFKA_SERVICE_PATH + } # Start the Dmaap mediator @@ -215,7 +235,7 @@ start_dmaapmed() { __dmaapmed_export_vars $1 # Create config map for data - data_json=$PWD/tmp/$DMAAP_MED_DATA_FILE + data_json=$PWD/tmp/$DMAAP_MED_CONTR_DATA_FILE if [ $# -lt 2 ]; then #create empty dummy file echo "{}" > $data_json @@ -250,7 +270,7 @@ start_dmaapmed() { __dmaapmed_export_vars $1 - dest_file=$SIM_GROUP/$DMAAP_MED_COMPOSE_DIR/$DMAAP_MED_HOST_MNT_DIR/$DMAAP_MED_DATA_FILE + dest_file=$SIM_GROUP/$DMAAP_MED_COMPOSE_DIR/$DMAAP_MED_HOST_MNT_DIR/$DMAAP_MED_CONTR_DATA_FILE envsubst < $2 > $dest_file