ttcn3: Allow remote hosts (sysmobts) to access RSL srv inside TTCN3 docker

And extra IP address is required/requested on the docker host because
the BSC handling the OML instance is binding to it's address, so we
cannot ask docker to use that one because it fails binding to it.

Change-Id: I734fba91db535d7b183ddc7f51d324a6cd2eaf6f
This commit is contained in:
Pau Espin 2018-10-15 17:20:50 +02:00
parent f6166144b5
commit a52855614a
4 changed files with 10 additions and 6 deletions

View File

@ -1 +1,2 @@
- ttcn3_bts_tests:trx
- ttcn3_bts_tests:sysmo

View File

@ -3,8 +3,9 @@ set -x
RUNDIR="$1"
JUNIT_TTCN3_DST_FILE="$2"
L2_SOCKET_PATH="$3"
PCU_SOCKET_PATH="$4"
BSC_RSL_ADDR="$3"
L2_SOCKET_PATH="$4"
PCU_SOCKET_PATH="$5"
# Absolute path to this script
SCRIPT=$(readlink -f "$0")
@ -27,7 +28,7 @@ DOCKER_NAME="$BUILD_TAG-$SUITE_NAME"
network_create() {
NET=$1
echo Creating network $NET_NAME
docker network create --internal --subnet $NET $NET_NAME
docker network create --subnet $NET $NET_NAME
}
network_remove() {
@ -70,6 +71,7 @@ else
fi
docker run --rm \
--network $NET_NAME --ip 172.18.9.10 \
-p ${BSC_RSL_ADDR}:3003:3003 \
-e "TTCN3_PCAP_PATH=/data" \
--mount type=bind,source=$VOL_BASE_DIR/bts-tester,destination=/data \
--mount type=bind,source="$(dirname "$L2_SOCKET_PATH")",destination=/data/unix_l2 \

View File

@ -1,6 +1,6 @@
resources:
ip_address:
- times: 7 # msc, bsc, hlr, stp, mgw, sgsn, ggsn
- times: 8 # msc, bsc, hlr, stp, mgw, sgsn, ggsn
bts:
- times: 1
osmocon_phone:

View File

@ -30,7 +30,8 @@ stp_dummy.start()
msc_dummy.start()
mgw_dummy.start()
bsc.set_rsl_ip('172.18.9.10')
nat_rsl_ip = suite.ip_address().get('addr')
bsc.set_rsl_ip(nat_rsl_ip)
bsc.bts_add(bts)
sgsn_dummy.bts_add(bts)
@ -52,7 +53,7 @@ if bts.bts_type() == 'osmo-bts-trx':
else: # PCU unix socket not available locally
pcu_available = False
pcu_sk = ''
docker_cmd = (script_file, str(script_run_dir), junit_ttcn3_dst_file, osmocon.l2_socket_path(), pcu_sk)
docker_cmd = (script_file, str(script_run_dir), junit_ttcn3_dst_file, nat_rsl_ip, osmocon.l2_socket_path(), pcu_sk)
print('Creating template')
mytemplate = Template(filename=bts_tmpl_file)