-# (Function for test scripts)
-start_consul_cbs() {
-
- echo -e $BOLD"Starting Consul and CBS"$EBOLD
- __check_included_image 'CONSUL'
- if [ $? -eq 1 ]; then
- echo -e $RED"The Consul image has not been checked for this test run due to arg to the test script"$ERED
- echo -e $RED"Consul will not be started"$ERED
- exit
- fi
- __start_container consul_cbs NODOCKERARGS "$CONSUL_APP_NAME" "$CONSUL_EXTERNAL_PORT" "/ui/dc1/kv" "http" \
- "$CBS_APP_NAME" "$CBS_EXTERNAL_PORT" "/healthcheck" "http"
-}
-
-###########################
-### RIC Simulator functions
-###########################
-
-use_simulator_http() {
- echo -e "Using $BOLD http $EBOLD towards the simulators"
- export RIC_SIM_HTTPX="http"
- export RIC_SIM_LOCALHOST=$RIC_SIM_HTTPX"://localhost:"
- export RIC_SIM_PORT=$RIC_SIM_INTERNAL_PORT
- echo ""
-}
-
-use_simulator_https() {
- echo -e "Using $BOLD https $EBOLD towards the simulators"
- export RIC_SIM_HTTPX="https"
- export RIC_SIM_LOCALHOST=$RIC_SIM_HTTPX"://localhost:"
- export RIC_SIM_PORT=$RIC_SIM_INTERNAL_SECURE_PORT
- echo ""
-}
-
-# Start one group (ricsim_g1, ricsim_g2 .. ricsim_g5) with a number of RIC Simulators using a given A interface
-# 'ricsim' may be set on command line to other prefix
-# args: ricsim_g1|ricsim_g2|ricsim_g3|ricsim_g4|ricsim_g5 <count> <interface-id>
-# (Function for test scripts)
-start_ric_simulators() {
-
- echo -e $BOLD"Starting RIC Simulators"$EBOLD
-
- __check_included_image 'RICSIM'
- if [ $? -eq 1 ]; then
- echo -e $RED"The Near-RT RIC Simulator image has not been checked for this test run due to arg to the test script"$ERED
- echo -e $RED"The Near-RT RIC Simulartor(s) will not be started"$ERED
- exit
- fi
-
- RIC1=$RIC_SIM_PREFIX"_g1"
- RIC2=$RIC_SIM_PREFIX"_g2"
- RIC3=$RIC_SIM_PREFIX"_g3"
- RIC4=$RIC_SIM_PREFIX"_g4"
- RIC5=$RIC_SIM_PREFIX"_g5"
-
- if [ $# != 3 ]; then
- ((RES_CONF_FAIL++))
- __print_err "need three args, $RIC1|$RIC2|$RIC3|$RIC4|$RIC5 <count> <interface-id>" $@
- exit 1
- fi
- echo " $2 simulators using basename: $1 on interface: $3"
- #Set env var for simulator count and A1 interface vesion for the given group
- if [ $1 == "$RIC1" ]; then
- G1_COUNT=$2
- G1_A1_VERSION=$3
- elif [ $1 == "$RIC2" ]; then
- G2_COUNT=$2
- G2_A1_VERSION=$3
- elif [ $1 == "$RIC3" ]; then
- G3_COUNT=$2
- G3_A1_VERSION=$3
- elif [ $1 == "$RIC4" ]; then
- G4_COUNT=$2
- G4_A1_VERSION=$3
- elif [ $1 == "$RIC5" ]; then
- G5_COUNT=$2
- G5_A1_VERSION=$3
- else
- ((RES_CONF_FAIL++))
- __print_err "need three args, $RIC1|$RIC2|$RIC3|$RIC4|$RIC5 <count> <interface-id>" $@
- exit 1
- fi
-
- # Create .env file to compose project, all ric container will get this prefix
- echo "COMPOSE_PROJECT_NAME="$RIC_SIM_PREFIX > $SIM_GROUP/ric/.env