Updated image tags for tests
Updated python req for simulators
Configurable basepath for hostpath persistent volumes
Issue-ID: NONRTRIC-728
Signed-off-by: BjornMagnussonXA <bjorn.magnusson@est.tech>
Change-Id: I352cf68afd655b1c458f77de4c70e87ba083bb3d
diff --git a/test/common/clean_kube.sh b/test/common/clean_kube.sh
index 8a0453b..f0bdfe6 100755
--- a/test/common/clean_kube.sh
+++ b/test/common/clean_kube.sh
@@ -176,7 +176,9 @@
echo "Usage: clean_kube.sh [--kubeconfig <kube-config-file>]"
}
-if [ $# -eq 1 ]; then
+if [ $# -eq 0 ]; then
+:
+elif [ $# -eq 1 ]; then
print_usage
exit
elif [ $# -eq 2 ]; then
diff --git a/test/common/clean_kube_ns.sh b/test/common/clean_kube_ns.sh
index 0a016d2..807a88a 100755
--- a/test/common/clean_kube_ns.sh
+++ b/test/common/clean_kube_ns.sh
@@ -36,7 +36,9 @@
echo "Usage: clean_kube_ns.sh [--kubeconfig <kube-config-file>]"
}
-if [ $# -eq 1 ]; then
+if [ $# -eq 0 ]; then
+:
+elif [ $# -eq 1 ]; then
print_usage
exit
elif [ $# -eq 2 ]; then
diff --git a/test/common/ics_api_functions.sh b/test/common/ics_api_functions.sh
index 05638af..a18bf72 100644
--- a/test/common/ics_api_functions.sh
+++ b/test/common/ics_api_functions.sh
@@ -192,6 +192,7 @@
export ICS_DATA_PVC_NAME=$ICS_APP_NAME"-pvc"
#Create a unique path for the pv each time to prevent a previous volume to be reused
export ICS_PV_PATH="icsdata-"$(date +%s)
+ export HOST_PATH_BASE_DIR
if [ $1 == "PROXY" ]; then
export ICS_HTTP_PROXY_CONFIG_PORT=$HTTP_PROXY_CONFIG_PORT #Set if proxy is started
@@ -285,7 +286,7 @@
# Keep the initial worker node in case the pod need to be "restarted" - must be made to the same node due to a volume mounted on the host
if [ $retcode_i -eq 0 ]; then
- __ICS_WORKER_NODE=$(kubectl get pod -l "autotest=ICS" -n $KUBE_NONRTRIC_NAMESPACE -o jsonpath='{.items[*].spec.nodeName}')
+ __ICS_WORKER_NODE=$(kubectl $KUBECONF get pod -l "autotest=ICS" -n $KUBE_NONRTRIC_NAMESPACE -o jsonpath='{.items[*].spec.nodeName}')
if [ -z "$__ICS_WORKER_NODE" ]; then
echo -e $YELLOW" Cannot find worker node for pod for $ICS_APP_NAME, persistency may not work"$EYELLOW
fi
@@ -394,7 +395,7 @@
return 0
fi
- # Tie the PMS to the same worker node it was initially started on
+ # Tie the ICS to the same worker node it was initially started on
# A PVC of type hostPath is mounted to PMS, for persistent storage, so the PMS must always be on the node which mounted the volume
if [ -z "$__ICS_WORKER_NODE" ]; then
echo -e $RED" No initial worker node found for pod "$RED
@@ -1104,7 +1105,8 @@
if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
query="/data-producer/v1/info-producers"
if [ $# -gt 1 ] && [ $2 != "NOTYPE" ]; then
- query=$query"?info_type_id=$2"
+ query=$query"?info_type_id=$2&infoTypeId=$2" #info_type_id changed to infoTypeId in F-release.
+ #Remove info_type_id when F-release is no longer supported
fi
else
query="/ei-producer/v1/eiproducers"
diff --git a/test/common/pa_api_functions.sh b/test/common/pa_api_functions.sh
index 9a0a162..dd4af66 100644
--- a/test/common/pa_api_functions.sh
+++ b/test/common/pa_api_functions.sh
@@ -209,6 +209,7 @@
##Create a unique path for the pv each time to prevent a previous volume to be reused
export POLICY_AGENT_PV_PATH="padata-"$(date +%s)
export POLICY_AGENT_CONTAINER_MNT_DIR
+ export HOST_PATH_BASE_DIR
if [ $1 == "PROXY" ]; then
export AGENT_HTTP_PROXY_CONFIG_PORT=$HTTP_PROXY_CONFIG_PORT #Set if proxy is started
diff --git a/test/common/ricsim_api_functions.sh b/test/common/ricsim_api_functions.sh
index a366a9d..01e193d 100644
--- a/test/common/ricsim_api_functions.sh
+++ b/test/common/ricsim_api_functions.sh
@@ -253,7 +253,7 @@
# Create app
input_yaml=$SIM_GROUP"/"$RIC_SIM_COMPOSE_DIR"/"app.yaml
- output_yaml=$PWD/tmp/pa_${1}_app.yaml
+ output_yaml=$PWD/tmp/ric_${1}_app.yaml
__kube_create_instance app $RIC_SIM_SET_NAME $input_yaml $output_yaml
#Using only instance from index 1 to keep compatability with docker
diff --git a/test/common/test_env-onap-istanbul.sh b/test/common/test_env-onap-istanbul.sh
index a1f59f5..89dc68b 100644
--- a/test/common/test_env-onap-istanbul.sh
+++ b/test/common/test_env-onap-istanbul.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# ============LICENSE_START===============================================
-# Copyright (C) 2020 Nordix Foundation. All rights reserved.
+# Copyright (C) 2021 Nordix Foundation. All rights reserved.
# ========================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -76,10 +76,10 @@
# SDNC A1 Controller remote image and tag
SDNC_A1_CONTROLLER_IMAGE_BASE="onap/sdnc-image"
-SDNC_A1_CONTROLLER_IMAGE_TAG_LOCAL="2.2.5-SNAPSHOT" ###CHECK THIS
-SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_SNAPSHOT="2.2.5-STAGING-latest"
-SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE="2.2.5-STAGING-latest" #Will use snapshot repo
-SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_RELEASE="2.2.4"
+SDNC_A1_CONTROLLER_IMAGE_TAG_LOCAL="2.2.6-SNAPSHOT" ###CHECK THIS
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_SNAPSHOT="2.2.6-STAGING-latest"
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE="2.2.6-STAGING-latest" #Will use snapshot repo
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_RELEASE="2.2.5"
#SDNC DB remote image and tag
#The DB is part of SDNC so handled in the same way as SDNC
diff --git a/test/common/test_env-onap-jakarta.sh b/test/common/test_env-onap-jakarta.sh
index b5b6c39..0910ce7 100644
--- a/test/common/test_env-onap-jakarta.sh
+++ b/test/common/test_env-onap-jakarta.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# ============LICENSE_START===============================================
-# Copyright (C) 2020 Nordix Foundation. All rights reserved.
+# Copyright (C) 2021 Nordix Foundation. All rights reserved.
# ========================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -86,12 +86,12 @@
SDNC_DB_IMAGE_BASE="mariadb"
SDNC_DB_IMAGE_TAG_REMOTE_PROXY="10.5"
-# ICS image and tag - used e release
+# ICS image and tag - using e release
ICS_IMAGE_BASE="o-ran-sc/nonrtric-information-coordinator-service"
-ICS_IMAGE_TAG_REMOTE_RELEASE_ORAN="1.2.0"
+ICS_IMAGE_TAG_REMOTE_RELEASE_ORAN="1.2.1"
#Note: Update var ICS_FEATURE_LEVEL if image version is changed
-# Control Panel image and tag - used e release
+# Control Panel image and tag - using e release
CONTROL_PANEL_IMAGE_BASE="o-ran-sc/nonrtric-controlpanel"
CONTROL_PANEL_IMAGE_TAG_REMOTE_RELEASE_ORAN="2.3.0"
@@ -101,7 +101,7 @@
# RAPP Catalogue image and tags - used e release
RAPP_CAT_IMAGE_BASE="o-ran-sc/nonrtric-r-app-catalogue"
-RAPP_CAT_IMAGE_TAG_REMOTE_RELEASE_ORAN="1.0.1"
+RAPP_CAT_IMAGE_TAG_REMOTE_RELEASE_ORAN="1.0.2"
# Near RT RIC Simulator image and tags - used e release
diff --git a/test/common/test_env-oran-e-release.sh b/test/common/test_env-oran-e-release.sh
index 9a89270..f48ae6f 100755
--- a/test/common/test_env-oran-e-release.sh
+++ b/test/common/test_env-oran-e-release.sh
@@ -60,17 +60,17 @@
# Policy Agent base image and tags
POLICY_AGENT_IMAGE_BASE="o-ran-sc/nonrtric-a1-policy-management-service"
-POLICY_AGENT_IMAGE_TAG_LOCAL="2.3.0-SNAPSHOT"
-POLICY_AGENT_IMAGE_TAG_REMOTE_SNAPSHOT="2.3.0-SNAPSHOT"
-POLICY_AGENT_IMAGE_TAG_REMOTE="2.3.0"
-POLICY_AGENT_IMAGE_TAG_REMOTE_RELEASE="2.3.0"
+POLICY_AGENT_IMAGE_TAG_LOCAL="2.3.1-SNAPSHOT"
+POLICY_AGENT_IMAGE_TAG_REMOTE_SNAPSHOT="2.3.1-SNAPSHOT"
+POLICY_AGENT_IMAGE_TAG_REMOTE="2.3.1"
+POLICY_AGENT_IMAGE_TAG_REMOTE_RELEASE="2.3.1"
# ICS image and tags
ICS_IMAGE_BASE="o-ran-sc/nonrtric-information-coordinator-service"
-ICS_IMAGE_TAG_LOCAL="1.2.0-SNAPSHOT"
-ICS_IMAGE_TAG_REMOTE_SNAPSHOT="1.2.0-SNAPSHOT"
-ICS_IMAGE_TAG_REMOTE="1.2.0"
-ICS_IMAGE_TAG_REMOTE_RELEASE="1.2.0"
+ICS_IMAGE_TAG_LOCAL="1.2.1-SNAPSHOT"
+ICS_IMAGE_TAG_REMOTE_SNAPSHOT="1.2.1-SNAPSHOT"
+ICS_IMAGE_TAG_REMOTE="1.2.1"
+ICS_IMAGE_TAG_REMOTE_RELEASE="1.2.1"
#Note: Update var ICS_FEATURE_LEVEL if image version is changed
#Control Panel image and tags
@@ -116,10 +116,10 @@
# RAPP Catalogue image and tags
RAPP_CAT_IMAGE_BASE="o-ran-sc/nonrtric-r-app-catalogue"
-RAPP_CAT_IMAGE_TAG_LOCAL="1.0.1-SNAPSHOT"
-RAPP_CAT_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.1-SNAPSHOT"
-RAPP_CAT_IMAGE_TAG_REMOTE="1.0.1"
-RAPP_CAT_IMAGE_TAG_REMOTE_RELEASE="1.0.1"
+RAPP_CAT_IMAGE_TAG_LOCAL="1.0.2-SNAPSHOT"
+RAPP_CAT_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.2-SNAPSHOT"
+RAPP_CAT_IMAGE_TAG_REMOTE="1.0.2"
+RAPP_CAT_IMAGE_TAG_REMOTE_RELEASE="1.0.2"
# Near RT RIC Simulator image and tags - same version as cherry
@@ -131,24 +131,24 @@
# DMAAP Mediator Service
DMAAP_MED_IMAGE_BASE="o-ran-sc/nonrtric-dmaap-mediator-producer"
-DMAAP_MED_IMAGE_TAG_LOCAL="1.0.0-SNAPSHOT"
-DMAAP_MED_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.0-SNAPSHOT"
-DMAAP_MED_IMAGE_TAG_REMOTE="1.0.0"
-DMAAP_MED_IMAGE_TAG_REMOTE_RELEASE="1.0.0"
+DMAAP_MED_IMAGE_TAG_LOCAL="1.0.1-SNAPSHOT"
+DMAAP_MED_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.1-SNAPSHOT"
+DMAAP_MED_IMAGE_TAG_REMOTE="1.0.1"
+DMAAP_MED_IMAGE_TAG_REMOTE_RELEASE="1.0.1"
# DMAAP Adapter Service
DMAAP_ADP_IMAGE_BASE="o-ran-sc/nonrtric-dmaap-adaptor"
-DMAAP_ADP_IMAGE_TAG_LOCAL="1.0.0-SNAPSHOT"
-DMAAP_ADP_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.0-SNAPSHOT"
-DMAAP_ADP_IMAGE_TAG_REMOTE="1.0.0"
-DMAAP_ADP_IMAGE_TAG_REMOTE_RELEASE="1.0.0"
+DMAAP_ADP_IMAGE_TAG_LOCAL="1.0.1-SNAPSHOT"
+DMAAP_ADP_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.1-SNAPSHOT"
+DMAAP_ADP_IMAGE_TAG_REMOTE="1.0.1"
+DMAAP_ADP_IMAGE_TAG_REMOTE_RELEASE="1.0.1"
# Helm Manager
HELM_MANAGER_IMAGE_BASE="o-ran-sc/nonrtric-helm-manager"
-HELM_MANAGER_IMAGE_TAG_LOCAL="1.1.0-SNAPSHOT"
-HELM_MANAGER_IMAGE_TAG_REMOTE_SNAPSHOT="1.1.0-SNAPSHOT"
-HELM_MANAGER_IMAGE_TAG_REMOTE="1.1.0"
-HELM_MANAGER_IMAGE_TAG_REMOTE_RELEASE="1.1.0"
+HELM_MANAGER_IMAGE_TAG_LOCAL="1.1.1-SNAPSHOT"
+HELM_MANAGER_IMAGE_TAG_REMOTE_SNAPSHOT="1.1.1-SNAPSHOT"
+HELM_MANAGER_IMAGE_TAG_REMOTE="1.1.1"
+HELM_MANAGER_IMAGE_TAG_REMOTE_RELEASE="1.1.1"
#Consul remote image and tag
CONSUL_IMAGE_BASE="consul"
@@ -536,7 +536,7 @@
#MAAP_ADP_CONTAINER_MNT_DIR="/var/dmaap-adaptor-service" # Mounted dir in the container
#DMAAP_MED_ACTUATOR="/actuator/loggers/org.oransc.information" # Url for trace/debug
#DMAAP_MED_CERT_MOUNT_DIR="./cert"
-DMAAP_MED_ALIVE_URL="/status" # Base path for alive check
+DMAAP_MED_ALIVE_URL="/health_check" # Base path for alive check
DMAAP_MED_COMPOSE_DIR="dmaapmed" # Dir in simulator_group for docker-compose
#MAAP_MED_CONFIG_MOUNT_PATH="/app" # Internal container path for configuration
DMAAP_MED_DATA_MOUNT_PATH="/configs" # Path in container for data file
diff --git a/test/common/test_env-oran-f-release.sh b/test/common/test_env-oran-f-release.sh
index 3bafdb4..8051d70 100755
--- a/test/common/test_env-oran-f-release.sh
+++ b/test/common/test_env-oran-f-release.sh
@@ -67,10 +67,10 @@
# ICS image and tags
ICS_IMAGE_BASE="o-ran-sc/nonrtric-information-coordinator-service"
-ICS_IMAGE_TAG_LOCAL="1.2.0-SNAPSHOT"
-ICS_IMAGE_TAG_REMOTE_SNAPSHOT="1.2.0-SNAPSHOT"
-ICS_IMAGE_TAG_REMOTE="1.2.0"
-ICS_IMAGE_TAG_REMOTE_RELEASE="1.2.0"
+ICS_IMAGE_TAG_LOCAL="1.3.0-SNAPSHOT"
+ICS_IMAGE_TAG_REMOTE_SNAPSHOT="1.3.0-SNAPSHOT"
+ICS_IMAGE_TAG_REMOTE="1.3.0"
+ICS_IMAGE_TAG_REMOTE_RELEASE="1.3.0"
#Note: Update var ICS_FEATURE_LEVEL if image version is changed
#Control Panel image and tags
@@ -83,9 +83,9 @@
# Gateway image and tags
NRT_GATEWAY_IMAGE_BASE="o-ran-sc/nonrtric-gateway"
-NRT_GATEWAY_IMAGE_TAG_LOCAL="1.0.0-SNAPSHOT"
-NRT_GATEWAY_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.0-SNAPSHOT"
-NRT_GATEWAY_IMAGE_TAG_REMOTE="1.0.0"
+NRT_GATEWAY_IMAGE_TAG_LOCAL="1.1.0-SNAPSHOT"
+NRT_GATEWAY_IMAGE_TAG_REMOTE_SNAPSHOT="1.1.0-SNAPSHOT"
+NRT_GATEWAY_IMAGE_TAG_REMOTE="1.1.0"
NRT_GATEWAY_IMAGE_TAG_REMOTE_RELEASE="1.0.0"
@@ -116,18 +116,18 @@
# RAPP Catalogue image and tags
RAPP_CAT_IMAGE_BASE="o-ran-sc/nonrtric-r-app-catalogue"
-RAPP_CAT_IMAGE_TAG_LOCAL="1.0.1-SNAPSHOT"
-RAPP_CAT_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.1-SNAPSHOT"
-RAPP_CAT_IMAGE_TAG_REMOTE="1.0.1"
-RAPP_CAT_IMAGE_TAG_REMOTE_RELEASE="1.0.1"
+RAPP_CAT_IMAGE_TAG_LOCAL="1.1.0-SNAPSHOT"
+RAPP_CAT_IMAGE_TAG_REMOTE_SNAPSHOT="1.1.0-SNAPSHOT"
+RAPP_CAT_IMAGE_TAG_REMOTE="1.1.0"
+RAPP_CAT_IMAGE_TAG_REMOTE_RELEASE="1.1.0"
# Near RT RIC Simulator image and tags - same version as cherry
RIC_SIM_IMAGE_BASE="o-ran-sc/a1-simulator"
RIC_SIM_IMAGE_TAG_LOCAL="latest"
-RIC_SIM_IMAGE_TAG_REMOTE_SNAPSHOT="2.2.0-SNAPSHOT"
-RIC_SIM_IMAGE_TAG_REMOTE="2.2.0"
-RIC_SIM_IMAGE_TAG_REMOTE_RELEASE="2.2.0"
+RIC_SIM_IMAGE_TAG_REMOTE_SNAPSHOT="2.3.0-SNAPSHOT"
+RIC_SIM_IMAGE_TAG_REMOTE="2.3.0"
+RIC_SIM_IMAGE_TAG_REMOTE_RELEASE="2.3.0"
# DMAAP Mediator Service
DMAAP_MED_IMAGE_BASE="o-ran-sc/nonrtric-dmaap-mediator-producer"
diff --git a/test/common/testcase_common.sh b/test/common/testcase_common.sh
index a94d3e2..66e6dfa 100755
--- a/test/common/testcase_common.sh
+++ b/test/common/testcase_common.sh
@@ -29,7 +29,7 @@
echo " [--use-staging-image <app-nam>+] [--use-release-image <app-nam>+] [--image-repo <repo-address>]"
echo " [--repo-policy local|remote] [--cluster-timeout <timeout-in seconds>] [--print-stats]"
echo " [--override <override-environment-filename>] [--pre-clean] [--gen-stats] [--delete-namespaces]"
- echo " [--delete-containers] [--endpoint-stats] [--kubeconfig <config-file>]"
+ echo " [--delete-containers] [--endpoint-stats] [--kubeconfig <config-file>] [--host-path-dir <local-host-dir>]"
}
if [ $# -eq 1 ] && [ "$1" == "help" ]; then
@@ -65,6 +65,7 @@
echo "--delete-containers - Delete docker containers before starting tests - but only those created by the test scripts. Docker mode only."
echo "--endpoint-stats - Collect endpoint statistics"
echo "--kubeconfig - Configure kubectl to use cluster specific cluster config file"
+ echo "--host-path-dir - (Base-)path on local-hostmounted to all VMs (nodes), for hostpath volumes in kube"
echo ""
echo "List of app short names supported: "$APP_SHORT_NAMES
exit 0
@@ -270,6 +271,14 @@
#Var to configure kubectl from a config file.
KUBECONF=""
+#Var pointing to dir mounted to each kubernetes node (master and workers)
+#Persistent volumes using "hostpath" are allocated beneath the point.
+#Typically it is a dir on local host mounted to each VM running the master and worker.
+#So the intention is make this dir available so the PODs can be restarted on any
+#node and still access the persistent data
+#If not set from cmd line, the path is defaults to "/tmp"
+HOST_PATH_BASE_DIR=""
+
#File to keep deviation messages
DEVIATION_FILE=".tmp_deviations"
rm $DEVIATION_FILE &> /dev/null
@@ -837,6 +846,21 @@
fi
fi
fi
+ if [ $paramerror -eq 0 ]; then
+ if [ "$1" == "--host-path-dir" ]; then
+ shift;
+ if [ -z "$1" ]; then
+ paramerror=1
+ if [ -z "$paramerror_str" ]; then
+ paramerror_str="No path found for : '--host-path-dir'"
+ fi
+ else
+ HOST_PATH_BASE_DIR=$1
+ shift
+ foundparm=0
+ fi
+ fi
+ fi
done
echo ""
@@ -1020,7 +1044,7 @@
else
if [ $RUNMODE == "KUBE" ]; then
echo " kubectl is installed and using versions:"
- echo $(kubectl version --short=true) | indent2
+ echo $(kubectl $KUBECONF version --short=true) | indent2
res=$(kubectl $KUBECONF cluster-info 2>&1)
if [ $? -ne 0 ]; then
echo -e "$BOLD$RED############################################# $ERED$EBOLD"
@@ -1052,6 +1076,16 @@
fi
echo " Node(s) and container runtime config"
kubectl $KUBECONF get nodes -o wide | indent2
+ echo ""
+ if [ -z "$HOST_PATH_BASE_DIR" ]; then
+ HOST_PATH_BASE_DIR="/tmp"
+ echo " Persistent volumes will be mounted to $HOST_PATH_BASE_DIR on applicable node"
+ echo " No guarantee that persistent volume data is available on all nodes in the cluster"
+ else
+ echo "Persistent volumes will be mounted to base dir: $HOST_PATH_BASE_DIR"
+ echo "Assuming this dir is mounted from each node to a dir on the localhost or other"
+ echo "file system available to all nodes"
+ fi
fi
fi