scripts/regen_doc: use SUBNET variable

Add a $SUBNET parameter and use it throughout the script, similar to
other ttcn3-*/jenkins.sh scripts. This is in preparation for figuring
out a free network in network_create() automatically in a future patch.

Related: OS#5802
Change-Id: I3bda4bd7280469ad5ee02104295134a2e0b768e3
This commit is contained in:
Oliver Smith 2022-12-22 12:33:35 +01:00
parent 68cddfad72
commit 9a2556824a
1 changed files with 11 additions and 4 deletions

View File

@ -21,7 +21,8 @@ fi
docker_images_require \
"$NAME-$IMAGE_SUFFIX"
network_create 16
SUBNET=16
network_create "$SUBNET"
container_create() {
CONTAINERNAME=$1
@ -35,15 +36,21 @@ container_create() {
}
container_create "$NAME-$IMAGE_SUFFIX" 172.18.16.23
container_create "$NAME-$IMAGE_SUFFIX" "172.18.$SUBNET.23"
# Get asciidoc counter info
${OSMO_INTERACT_VTY} \
-c "enable;show asciidoc counters" -p "$PORT" -H 172.18.16.23 -O "$COUNTERFILE"
-c "enable;show asciidoc counters" \
-p "$PORT" \
-H "172.18.$SUBNET.23" \
-O "$COUNTERFILE"
# Get vty reference
${OSMO_INTERACT_VTY} \
-X -p "$PORT" -H 172.18.16.23 -O "$VTYFILE"
-X \
-p "$PORT" \
-H "172.18.$SUBNET.23" \
-O "$VTYFILE"
docker container kill "${BUILD_TAG}-$NAME-$IMAGE_SUFFIX"