- cntr=0
- for ric in $rics; do
- if [ $cntr -gt 0 ]; then
- config_json=$config_json"\n ,"
- fi
- config_json=$config_json"\n {"
- config_json=$config_json"\n \"name\": \"$ric\","
- if [ $AGENT_STAND_ALONE -eq 0 ]; then
- config_json=$config_json"\n \"baseUrl\": \"$RIC_SIM_HTTPX://$ric:$RIC_SIM_PORT\","
- else
- config_json=$config_json"\n \"baseUrl\": \"$RIC_SIM_HTTPX://localhost:$(__find_sim_port $ric)\","
- fi
- if [ $1 == "SDNC" ]; then
- config_json=$config_json"\n \"controller\": \"$SDNC_APP_NAME\","
- elif [ $1 == "SDNC_ONAP" ]; then
- config_json=$config_json"\n \"controller\": \"$SDNC_ONAP_APP_NAME\","
- fi
- config_json=$config_json"\n \"managedElementIds\": ["
- config_json=$config_json"\n \"me1_$ric\","
- config_json=$config_json"\n \"me2_$ric\""
- config_json=$config_json"\n ]"
- config_json=$config_json"\n }"
- let cntr=cntr+1
- done
-
- config_json=$config_json"\n ]"
- config_json=$config_json"\n}"
-
-
- printf "$config_json">$2
-
- echo ""
-}
-
-
-# Start Consul and CBS
-# args: -
-# (Function for test scripts)
-start_consul_cbs() {
-
- echo -e $BOLD"Starting Consul and CBS"$EBOLD
-
- __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 unsecure $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 secure $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 or ricsim_g3) 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 <count> <interface-id>
-# (Function for test scripts)
-start_ric_simulators() {
-
- echo -e $BOLD"Starting RIC Simulators"$EBOLD
-
- RIC1=$RIC_SIM_PREFIX"_g1"
- RIC2=$RIC_SIM_PREFIX"_g2"
- RIC3=$RIC_SIM_PREFIX"_g3"