From 9a2556824a1317784a214c49dd031f6f51bf51e8 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Thu, 22 Dec 2022 12:33:35 +0100 Subject: [PATCH] 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 --- scripts/regen_doc.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/scripts/regen_doc.sh b/scripts/regen_doc.sh index cd3c5602..012c12a9 100755 --- a/scripts/regen_doc.sh +++ b/scripts/regen_doc.sh @@ -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"