Change in ...docker-playground[master]: Add script to regenerate VTY and counter documentation

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

daniel gerrit-no-reply at lists.osmocom.org
Fri Jun 7 12:57:29 UTC 2019


daniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/14403


Change subject: Add script to regenerate VTY and counter documentation
......................................................................

Add script to regenerate VTY and counter documentation

This script needs access to the VTY interface, so I changed some
remaining config files to bind the VTY interface to 0.0.0.0.

There are a couple of services that do that already.

Change-Id: Ic5cf7f59de0c18d4c5568b89433c2b11db2a72a5
---
M osmo-bsc-master/osmo-bsc.cfg
M osmo-hlr-master/osmo-hlr.cfg
M osmo-hnbgw-master/osmo-hnbgw.cfg
M osmo-mgw-master/osmo-mgw.cfg
M osmo-msc-master/osmo-msc.cfg
M osmo-sip-master/osmo-sip-connector.cfg
A scripts/regen_doc.sh
7 files changed, 53 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/03/14403/1

diff --git a/osmo-bsc-master/osmo-bsc.cfg b/osmo-bsc-master/osmo-bsc.cfg
index cb0059d..7ce9173 100644
--- a/osmo-bsc-master/osmo-bsc.cfg
+++ b/osmo-bsc-master/osmo-bsc.cfg
@@ -46,6 +46,7 @@
 !
 line vty
  no login
+ bind 0.0.0.0
 !
 e1_input
  e1_line 0 driver ipa
diff --git a/osmo-hlr-master/osmo-hlr.cfg b/osmo-hlr-master/osmo-hlr.cfg
index f3be518..9d8b125 100644
--- a/osmo-hlr-master/osmo-hlr.cfg
+++ b/osmo-hlr-master/osmo-hlr.cfg
@@ -11,6 +11,7 @@
  logging level linp error
 !
 line vty
+ no login
  bind 0.0.0.0
 ctrl
  bind 0.0.0.0
diff --git a/osmo-hnbgw-master/osmo-hnbgw.cfg b/osmo-hnbgw-master/osmo-hnbgw.cfg
index 8bffd76..4c7e75b 100644
--- a/osmo-hnbgw-master/osmo-hnbgw.cfg
+++ b/osmo-hnbgw-master/osmo-hnbgw.cfg
@@ -19,6 +19,9 @@
  logging level lctrl notice
  logging level lgtp notice
  logging level lstats notice
+line vty
+ no login
+ bind 0.0.0.0
 cs7 instance 0
  point-code 0.23.5
  asp asp-clnt-OsmoHNBGW 2905 0 m3ua
diff --git a/osmo-mgw-master/osmo-mgw.cfg b/osmo-mgw-master/osmo-mgw.cfg
index 44653e3..682c4ed 100644
--- a/osmo-mgw-master/osmo-mgw.cfg
+++ b/osmo-mgw-master/osmo-mgw.cfg
@@ -31,6 +31,7 @@
 !
 line vty
  no login
+ bind 0.0.0.0
 !
 mgcp
   bind ip 172.18.0.180
diff --git a/osmo-msc-master/osmo-msc.cfg b/osmo-msc-master/osmo-msc.cfg
index 91c9eee..929e88c 100644
--- a/osmo-msc-master/osmo-msc.cfg
+++ b/osmo-msc-master/osmo-msc.cfg
@@ -3,6 +3,7 @@
 !
 line vty
  no login
+ bind 0.0.0.0
 !
 network
  network country code 1
diff --git a/osmo-sip-master/osmo-sip-connector.cfg b/osmo-sip-master/osmo-sip-connector.cfg
index ad42969..5a0b4f5 100644
--- a/osmo-sip-master/osmo-sip-connector.cfg
+++ b/osmo-sip-master/osmo-sip-connector.cfg
@@ -1,3 +1,6 @@
+line vty
+ no login
+ bind 0.0.0.0
 app
 mncc
   socket-path /tmp/bsc_mncc
diff --git a/scripts/regen_doc.sh b/scripts/regen_doc.sh
new file mode 100755
index 0000000..7c7529f
--- /dev/null
+++ b/scripts/regen_doc.sh
@@ -0,0 +1,43 @@
+#!/bin/sh +x
+
+. ../jenkins-common.sh
+
+NAME="$1"
+PORT="$2"
+COUNTERFILE="$3"
+VTYFILE="$4"
+
+IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}"
+if [ -z "$OSMO_INTERACT_VTY" ]; then
+	OSMO_INTERACT_VTY="osmo-interact-vty.py"
+fi
+
+docker_images_require \
+	"$NAME-$IMAGE_SUFFIX"
+
+network_create 172.18.12.0/24
+
+container_create() {
+	CONTAINERNAME=$1
+	IP_ADDR=$2
+
+	docker run --rm --network ${NET_NAME} --ip ${IP_ADDR} \
+		--name ${BUILD_TAG}-${CONTAINERNAME} -d \
+		${REPO_USER}/${CONTAINERNAME}
+
+
+}
+
+container_create "$NAME-$IMAGE_SUFFIX" 172.18.12.23
+
+# Get asciidoc counter info
+${OSMO_INTERACT_VTY} \
+	-c "enable;show asciidoc counters" -p "$PORT" -H 172.18.12.23 -O "$COUNTERFILE"
+
+# Get vty reference
+${OSMO_INTERACT_VTY} \
+	-X -p "$PORT" -H 172.18.12.23 -O "$VTYFILE"
+
+docker container kill "${BUILD_TAG}-$NAME-$IMAGE_SUFFIX"
+
+network_remove

-- 
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/14403
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ic5cf7f59de0c18d4c5568b89433c2b11db2a72a5
Gerrit-Change-Number: 14403
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190607/ffda227c/attachment.htm>


More information about the gerrit-log mailing list