# <pull-policy-original> Shall be used for images that does not allow overriding
# Both var may contain: 'remote', 'remote-remove' or 'local'
__RICSIM_imagepull() {
- __check_and_pull_image $1 "$RIC_SIM_DISPLAY_NAME" $RIC_SIM_PREFIX"_"$RIC_SIM_BASE $RIC_SIM_IMAGE
+ __check_and_pull_image $1 "$RIC_SIM_DISPLAY_NAME" $RIC_SIM_PREFIX"_"$RIC_SIM_BASE RIC_SIM_IMAGE
}
# 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: <docker-images-format-string> <file-to-append>
__RICSIM_image_data() {
echo -e "$RIC_SIM_DISPLAY_NAME\t$(docker images --format $1 $RIC_SIM_IMAGE)" >> $2
+ if [ ! -z "$RIC_SIM_IMAGE_SOURCE" ]; then
+ echo -e "-- source image --\t$(docker images --format $1 $RIC_SIM_IMAGE_SOURCE)" >> $2
+ fi
}
# Scale kubernetes resources to zero
__find_sim_host() {
if [ $RUNMODE == "KUBE" ]; then
ricname=$(echo "$1" | tr '_' '-')
- for timeout in {1..60}; do
+ for timeout in {1..500}; do # long waiting time needed in case of starting large number of sims
host=$(kubectl get pod $ricname -n $KUBE_NONRTRIC_NAMESPACE -o jsonpath='{.status.podIP}' 2> /dev/null)
if [ ! -z "$host" ]; then
echo $RIC_SIM_HTTPX"://"$host":"$RIC_SIM_PORT
echo ${FUNCNAME[1]} "line: "${BASH_LINENO[1]} >> $HTTPLOG
proxyflag=""
if [ $RUNMODE == "KUBE" ]; then
- if [ ! -z "$CLUSTER_KUBE_PROXY_NODEPORT" ]; then
- proxyflag=" --proxy http://localhost:$CLUSTER_KUBE_PROXY_NODEPORT"
+ if [ ! -z "$KUBE_PROXY_PATH" ]; then
+ if [ $KUBE_PROXY_HTTPX == "http" ]; then
+ proxyflag=" --proxy $KUBE_PROXY_PATH"
+ else
+ proxyflag=" --proxy-insecure --proxy $KUBE_PROXY_PATH"
+ fi
fi
fi
echo " CMD: $2 $proxyflag" >> $HTTPLOG
# (Function for test scripts)
sim_post_delete_all() {
__log_conf_start $@
- if [ $# -ne 3 ]; then
+ if [ $# -ne 2 ]; then
__print_err "<response-code> <numericic-id>" $@
return 1
fi