- config_json=$config_json"\n \"userName\": \"$SDNC_ONAP_USER\","
- config_json=$config_json"\n \"password\": \"$SDNC_ONAP_PWD\""
- config_json=$config_json"\n }"
- config_json=$config_json"\n ],"
- fi
-
-
- config_json=$config_json"\n \"streams_publishes\": {"
- config_json=$config_json"\n \"dmaap_publisher\": {"
- config_json=$config_json"\n \"type\": \"$MR_APP_NAME\","
- config_json=$config_json"\n \"dmaap_info\": {"
- if [ $AGENT_STAND_ALONE -eq 0 ]; then
- config_json=$config_json"\n \"topic_url\": \"$MR_HTTPX://$MR_APP_NAME:$MR_PORT$MR_WRITE_URL\""
- else
- config_json=$config_json"\n \"topic_url\": \"$MR_HTTPX://localhost:$MR_LOCAL_PORT$MR_WRITE_URL\""
- fi
- config_json=$config_json"\n }"
- config_json=$config_json"\n }"
- config_json=$config_json"\n },"
- config_json=$config_json"\n \"streams_subscribes\": {"
- config_json=$config_json"\n \"dmaap_subscriber\": {"
- config_json=$config_json"\n \"type\": \"$MR_APP_NAME\","
- config_json=$config_json"\n \"dmaap_info\": {"
- if [ $AGENT_STAND_ALONE -eq 0 ]; then
- config_json=$config_json"\n \"topic_url\": \"$MR_HTTPX://$MR_APP_NAME:$MR_PORT$MR_READ_URL\""
- else
- config_json=$config_json"\n \"topic_url\": \"$MR_HTTPX://localhost:$MR_LOCAL_PORT$MR_READ_URL\""
- fi
- config_json=$config_json"\n }"
- config_json=$config_json"\n }"
- config_json=$config_json"\n },"
-
- config_json=$config_json"\n \"ric\": ["
-
- rics=$(docker ps | grep $RIC_SIM_PREFIX | awk '{print $NF}')
-
- if [ $? -ne 0 ] || [ -z "$rics" ]; then
- echo -e $RED" FAIL - the names of the running RIC Simulator cannot be retrieved." $ERED
- ((RES_CONF_FAIL++))
- return 1
- fi
-
- 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