X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fcommon%2Fcontrol_panel_api_functions.sh;h=8c0b41f5ea09db9cbaca08a76c900bf9e8635ceb;hb=02a72fd14966d3a7f26e6ef93f1a045607348f14;hp=7620667fb192f5caee993c7f9dc0a45966b579b8;hpb=520b912bce8eebb3e272c9ccfa3378b01dfd200b;p=nonrtric.git diff --git a/test/common/control_panel_api_functions.sh b/test/common/control_panel_api_functions.sh index 7620667f..8c0b41f5 100644 --- a/test/common/control_panel_api_functions.sh +++ b/test/common/control_panel_api_functions.sh @@ -35,7 +35,7 @@ __CP_imagesetup() { # Shall be used for images that does not allow overriding # Both var may contain: 'remote', 'remote-remove' or 'local' __CP_imagepull() { - __check_and_pull_image $1 "$CONTROL_PANEL_DISPLAY_NAME" $CONTROL_PANEL_APP_NAME $CONTROL_PANEL_IMAGE + __check_and_pull_image $1 "$CONTROL_PANEL_DISPLAY_NAME" $CONTROL_PANEL_APP_NAME CONTROL_PANEL_IMAGE } # Build image (only for simulator or interfaces stubs owned by the test environment) @@ -46,9 +46,13 @@ __CP_imagebuild() { } # 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: __CP_image_data() { echo -e "$CONTROL_PANEL_DISPLAY_NAME\t$(docker images --format $1 $CONTROL_PANEL_IMAGE)" >> $2 + if [ ! -z "$CONTROL_PANEL_IMAGE_SOURCE" ]; then + echo -e "-- source image --\t$(docker images --format $1 $CONTROL_PANEL_IMAGE_SOURCE)" >> $2 + fi } # Scale kubernetes resources to zero @@ -151,7 +155,7 @@ start_control_panel() { if [ $retcode_i -eq 0 ]; then - echo -e " Creating $CP_APP_NAME app and expose service" + echo -e " Creating $CONTROL_PANEL_APP_NAME app and expose service" #Export all vars needed for service and deployment export CONTROL_PANEL_APP_NAME @@ -164,9 +168,14 @@ start_control_panel() { export CONTROL_PANEL_CONFIG_MOUNT_PATH export CONTROL_PANEL_CONFIG_FILE export CP_CONFIG_CONFIGMAP_NAME=$CONTROL_PANEL_APP_NAME"-config" + export CP_PROXY_CONFIGMAP_NAME=$CONTROL_PANEL_APP_NAME"-proxy" - export NGW_DOMAIN_NAME=$NRT_GATEWAY_APP_NAME.$KUBE_NONRTRIC_NAMESPACE + export NGW_DOMAIN_NAME=$NRT_GATEWAY_APP_NAME.$KUBE_NONRTRIC_NAMESPACE.svc.cluster.local # suffix needed for nginx name resolution export NRT_GATEWAY_EXTERNAL_PORT + export CONTROL_PANEL_PATH_POLICY_PREFIX + export CONTROL_PANEL_PATH_ECS_PREFIX + + export CP_NGINX_RESOLVER=$CONTROL_PANEL_NGINX_KUBE_RESOLVER #Check if nonrtric namespace exists, if not create it __kube_create_namespace $KUBE_NONRTRIC_NAMESPACE @@ -244,11 +253,14 @@ start_control_panel() { export CONTROL_PANEL_CONFIG_FILE export CONTROL_PANEL_DISPLAY_NAME export NGW_DOMAIN_NAME=$NRT_GATEWAY_APP_NAME + export CONTROL_PANEL_PATH_POLICY_PREFIX + export CONTROL_PANEL_PATH_ECS_PREFIX + + export CP_NGINX_RESOLVER=$CONTROL_PANEL_NGINX_DOCKER_RESOLVER dest_file=$SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_HOST_MNT_DIR/$CONTROL_PANEL_CONFIG_FILE - envsubst '${NGW_DOMAIN_NAME},${NRT_GATEWAY_EXTERNAL_PORT},${POLICY_AGENT_EXTERNAL_SECURE_PORT},${ECS_EXTERNAL_SECURE_PORT},${POLICY_AGENT_DOMAIN_NAME},${ECS_DOMAIN_NAME}' < $1 > $dest_file - #envsubst < $1 > $dest_file + envsubst '${NGW_DOMAIN_NAME},${CP_NGINX_RESOLVER},${NRT_GATEWAY_EXTERNAL_PORT},${POLICY_AGENT_EXTERNAL_SECURE_PORT},${ECS_EXTERNAL_SECURE_PORT},${POLICY_AGENT_DOMAIN_NAME},${ECS_DOMAIN_NAME},${CONTROL_PANEL_PATH_POLICY_PREFIX},${CONTROL_PANEL_PATH_ECS_PREFIX}' < $1 > $dest_file __start_container $CONTROL_PANEL_COMPOSE_DIR "" NODOCKERARGS 1 $CONTROL_PANEL_APP_NAME