WIP: Add bscnat ttcn3 docker image

The config file still needs adaptation

Change-Id: Ibeebb0325d3d1976225666eb28db0741df2e66f0
This commit is contained in:
Daniel Willmann 2018-10-29 17:30:41 +01:00
parent efee158a0e
commit 448bafe27c
6 changed files with 184 additions and 0 deletions

View File

@ -0,0 +1,30 @@
[ORDERED_INCLUDE]
"/osmo-ttcn3-hacks/Common.cfg"
"/osmo-ttcn3-hacks/bsc-nat/BSCNAT_Tests.default"
[LOGGING]
*.JUnitLogger.testsuite_name := "BSCNAT_Tests"
[TESTPORT_PARAMETERS]
[MODULE_PARAMETERS]
mp_bsc_port := 49999;
mp_bsc_ip := "127.0.0.1";
mp_msc_port := 5100;
mp_msc_ip := "127.0.0.1";
mp_nat_port := 5000;
mp_nat_ip := "127.0.0.1";
#mp_ipa_mgcp_uses_osmo_ext := true;
mp_mgcp_uses_udp := true;
mp_callagent_ip := "127.0.0.1";
mp_callagent_udp_port := 2727;
mp_mgw_ip := "127.0.0.1";
mp_mgw_udp_port := 2427;
[MAIN_CONTROLLER]
[EXECUTE]
BSCNAT_Tests.control
#BSCNAT_Tests.TC_recv_dump

View File

@ -0,0 +1,32 @@
FROM laforge/debian-stretch-titan
RUN mkdir /root/projects && (cd /root/projects && ln -sf / git)
RUN git clone git://git.osmocom.org/osmo-ttcn3-hacks.git
RUN cd osmo-ttcn3-hacks && \
git checkout -f -B master origin/master && \
make deps
RUN git config --global user.email docker@dock.er && \
git config --global user.name "Dock Er"
ARG OSMO_TTCN3_BRANCH="master"
ADD http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
RUN cd osmo-ttcn3-hacks && \
git fetch && \
git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \
make bsc-nat
VOLUME /data
RUN ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-start.sh / && \
ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-stop.sh /
COPY BSCNAT_Tests.cfg /data/BSCNAT_Tests.cfg
CMD cd /data && \
/osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/bsc-nat/BSCNAT_Tests; \
exit_code=$?; \
/osmo-ttcn3-hacks/log_merge.sh BSCNAT_Tests --rm; \
exit $exit_code

View File

@ -0,0 +1,3 @@
RUN_ARGS?=--sysctl net.ipv6.conf.all.disable_ipv6=0 --rm --network sigtran --ip 172.18.2.202 -v bscnat-test-vol:/data
include ../make/Makefile

View File

@ -0,0 +1,19 @@
nat
bsc 0
token BSC0
location_area_code 1
description bsc
max-endpoints 32
paging forbidden 0
bsc 1
token BSC1
location_area_code 2
description bsc
max-endpoints 32
paging forbidden 0
bsc 2
token BSC2
location_area_code 3
description bsc
max-endpoints 32
paging forbidden 0

33
ttcn3-bscnat-test/jenkins.sh Executable file
View File

@ -0,0 +1,33 @@
#!/bin/sh
. ../jenkins-common.sh
mkdir $VOL_BASE_DIR/bscnat-tester
cp BSCNAT_Tests.cfg $VOL_BASE_DIR/bscnat-tester/
mkdir $VOL_BASE_DIR/bscnat
cp osmo-bsc-nat.cfg $VOL_BASE_DIR/bscnat/
cp bscs.config $VOL_BASE_DIR/bscnat/
network_create 172.18.11.0/24
echo Starting container with BSCNAT
docker run --rm \
--network $NET_NAME --ip 172.18.11.20 \
-v $VOL_BASE_DIR/bscnat:/data \
--name ${BUILD_TAG}-bscnat -d \
$REPO_USER/osmo-nitb-master /usr/local/bin/osmo-bsc_nat -c /data/osmo-bsc-nat.cfg
echo Starting container with BSCNAT testsuite
docker run --rm \
--network $NET_NAME --ip 172.18.11.203 \
-e "TTCN3_PCAP_PATH=/data" \
-v $VOL_BASE_DIR/bscnat-tester:/data \
--name ${BUILD_TAG}-ttcn3-bscnat-test \
$REPO_USER/ttcn3-bscnat-test
echo Stopping containers
docker container kill ${BUILD_TAG}-bscnat
network_remove
collect_logs

View File

@ -0,0 +1,67 @@
!
! OsmoBSCNAT (0.12.0.266-2daa9) configuration saved from vty
!!
!
log stderr
logging filter all 1
logging color 1
logging timestamp 1
logging level rll notice
logging level cc notice
logging level mm notice
logging level rr notice
logging level rsl notice
logging level nm info
logging level mncc notice
logging level pag notice
logging level meas notice
logging level sccp debug
logging level msc notice
logging level mgcp notice
logging level ho notice
logging level db notice
logging level ref notice
logging level gprs debug
logging level ns info
logging level bssgp debug
logging level llc debug
logging level sndcp debug
logging level nat notice
logging level ctrl notice
logging level smpp debug
logging level lglobal notice
logging level llapd notice
logging level linp notice
logging level lmux notice
logging level lmi notice
logging level lmib notice
logging level lsms notice
!
line vty
no login
!
mgcp
bind ip 127.0.0.1
bind port 2427
rtp bts-base 4000
rtp net-base 16000
rtp ip-dscp 0
no rtcp-omit
sdp audio-payload number 126
sdp audio-payload name AMR/8000
loop 0
number endpoints 1
call-agent ip 127.0.0.1
rtp transcoder-base 0
transcoder-remote-base 4000
nat
msc ip 127.0.0.1
msc port 5100
token foo
timeout auth 2
timeout ping 20
timeout pong 5
ip-dscp 0
bscs-config-file bscs.config
access-list msceven imsi-allow ^[0-9]*[24680]$
access-list mscodd imsi-allow ^[0-9]*[13579]$