export RIC_SIM_HTTPX="http"
export RIC_SIM_LOCALHOST=$RIC_SIM_HTTPX"://localhost:"
export RIC_SIM_PORT=$RIC_SIM_INTERNAL_PORT
-export RIC_SIM_CERT_MOUNT_DIR="./fakedir" #Fake dir so that the sim container does not find any cert
+export RIC_SIM_CERT_MOUNT_DIR="./cert"
export MR_HTTPX="http"
export MR_PORT=$MR_INTERNAL_PORT
# (Not for test scripts)
__find_sim_port() {
name=$1" " #Space appended to prevent matching 10 if 1 is desired....
- cmdstr="docker ps --filter name=${name} --format \"{{.Names}} {{.Ports}}\" | grep '${name}' | sed s/0.0.0.0:// | cut -f 2 -d ' ' | cut -f 1 -d '-'"
- cmdstr="docker ps --filter name=${name} --format \"{{.Names}} {{.Ports}}\" | grep '${name}' | cut -f 3 -d ',' | sed s/0.0.0.0:// | cut -f 2 -d ' ' | cut -f 1 -d '-'"
-
- res=$(eval $cmdstr)
+ cmdstr="docker inspect --format='{{(index (index .NetworkSettings.Ports \"$RIC_SIM_PORT/tcp\") 0).HostPort}}' ${name}"
+ res=$(eval $cmdstr)
if [[ "$res" =~ ^[0-9]+$ ]]; then
echo $res
else
export RIC_SIM_HTTPX="http"
export RIC_SIM_LOCALHOST=$RIC_SIM_HTTPX"://localhost:"
export RIC_SIM_PORT=$RIC_SIM_INTERNAL_PORT
- export RIC_SIM_CERT_MOUNT_DIR="./fakedir" #Fake dir so that the sim container does not find any cert
echo ""
}
export RIC_SIM_HTTPX="https"
export RIC_SIM_LOCALHOST=$RIC_SIM_HTTPX"://localhost:"
export RIC_SIM_PORT=$RIC_SIM_INTERNAL_SECURE_PORT
- export RIC_SIM_CERT_MOUNT_DIR="./cert"
echo ""
}