echo $YELLOW"Warning: No rics found for the configuration"$EYELLOW
fi
else
- rics=$(docker ps --filter "name=$RIC_SIM_PREFIX" --filter "network=$DOCKER_SIM_NWNAME" --filter "label=a1sim" --filter "status=running" --format {{.Names}})
- 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
+ rics=$(docker ps --filter "name=$RIC_SIM_PREFIX" --filter "network=$DOCKER_SIM_NWNAME" --filter "label=a1sim" --filter "status=running" --format {{.Names}})
oranrics=$(docker ps --filter "name=$RIC_SIM_PREFIX" --filter "network=$DOCKER_SIM_NWNAME" --filter "label=orana1sim" --filter "status=running" --format {{.Names}})
+
+ rics="$rics $oranrics"
+
if [ $? -ne 0 ] || [ -z "$rics" ]; then
- echo -e $RED" FAIL - the names of the running RIC Simulator cannot be retrieved." $ERED
+ echo -e $RED" FAIL - the names of the running RIC Simulator or ORAN RIC cannot be retrieved." $ERED
((RES_CONF_FAIL++))
- return 1
+ exit 1
fi
- rics="$rics $oranrics"
fi
cntr=0
for ric in $rics; do
ric_id=${ric%.*.*} #extract pod id from full hosthame
ric_id=$(echo "$ric_id" | tr '-' '_')
else
- if [ $DOCKER_COMPOSE_VERSION == "V1" ]; then
- ric_id=$ric
- else
- ric_id=$(echo "$ric" | tr '-' '_') #ric id still needs underscore as it is different from the container name
- fi
+ ric_id=$(echo "$ric" | tr '-' '_') #ric var still needs underscore as it is different from the container name
fi
- echo " Found a1 sim: "$ric_id
+ echo " Found a1 sim: "$ric
config_json=$config_json"\n \"name\": \"$ric_id\","
xricfound=0