Change in osmo-ttcn3-hacks[master]: BSC CBSP: configure cbc per f_vty_transceive, not osmo-bsc.cfg

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/.

neels gerrit-no-reply at lists.osmocom.org
Wed Aug 26 15:54:31 UTC 2020


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19831 )


Change subject: BSC CBSP: configure cbc per f_vty_transceive, not osmo-bsc.cfg
......................................................................

BSC CBSP: configure cbc per f_vty_transceive, not osmo-bsc.cfg

since Icf901848e666f079d14450962f0a1d74b0996c56, osmo-bsc no longer allows
configuring CBSP as both server and client at the same time.

Remove the 'cbc' section from osmo-bsc.cfg, and instead configure the CBSP link
as client or as server via f_vty_transceive().

This requires the 'cbc' / 'restart' command, added in osmo-bsc
I5724369527cf38bd7b82f3db5e2b44254d22f8d5

Related: Icf901848e666f079d14450962f0a1d74b0996c56 (osmo-bsc)
Related: I5724369527cf38bd7b82f3db5e2b44254d22f8d5 (osmo-bsc)
Change-Id: I7eea0dd39de50ed80af79e0f10c836b8685d8644
---
M bsc/BSC_Tests_CBSP.ttcn
M bsc/osmo-bsc.cfg
2 files changed, 30 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/31/19831/1

diff --git a/bsc/BSC_Tests_CBSP.ttcn b/bsc/BSC_Tests_CBSP.ttcn
index 498f484..11599e3 100644
--- a/bsc/BSC_Tests_CBSP.ttcn
+++ b/bsc/BSC_Tests_CBSP.ttcn
@@ -37,6 +37,9 @@
 import from CBSP_Adapter all;
 import from CBSP_CodecPort all;
 
+import from Osmocom_VTY_Functions all;
+import from TELNETasp_PortType all;
+
 modulepar {
 	charstring mp_cbc_ip := "0.0.0.0";
 	integer mp_cbc_port := 48049;
@@ -102,6 +105,28 @@
 	}
 }
 
+private function f_vty_configure_osmo_bsc_as_cbsp_client(TELNETasp_PT pt) {
+	f_vty_enter_config(pt);
+	f_vty_transceive(pt, "cbc");
+	f_vty_transceive(pt, "no listen-port");
+	f_vty_transceive(pt, "remote-ip " & mp_test_ip);
+	f_vty_transceive(pt, "remote-port " & int2str(mp_cbc_port));
+	f_vty_transceive(pt, "restart", strict := false); /* (at time of writing, 'restart' is not yet in latest) */
+	f_vty_transceive(pt, "exit");
+	f_vty_transceive(pt, "exit");
+}
+
+private function f_vty_configure_osmo_bsc_as_cbsp_server(TELNETasp_PT pt) {
+	f_vty_enter_config(pt);
+	f_vty_transceive(pt, "cbc");
+	f_vty_transceive(pt, "no remote-ip");
+	f_vty_transceive(pt, "listen-ip " & mp_bsc_ip);
+	f_vty_transceive(pt, "listen-port " & int2str(mp_bsc_cbsp_port));
+	f_vty_transceive(pt, "restart", strict := false); /* (at time of writing, 'restart' is not yet in latest) */
+	f_vty_transceive(pt, "exit");
+	f_vty_transceive(pt, "exit");
+}
+
 private function f_init(float guard_timeout := 30.0) runs on cbsp_test_CT {
 	BSC_Tests.f_init(guard_timeout := guard_timeout);
 	activate(as_IgnRSL((tr_RSL_BCCH_INFO, tr_RSL_SACCH_FILL,
@@ -111,9 +136,9 @@
 }
 private function f_cbsp_init_client() runs on cbsp_test_CT {
 	f_init();
+	f_vty_configure_osmo_bsc_as_cbsp_server(BSCVTY);
 	CBSP_Adapter.f_connect(mp_bsc_ip, mp_bsc_cbsp_port, "", -1);
-	/* FIXME: osmo-bsc should probably still send a CBSP RESTART, but to get the current tests running, let's first
-	 * ignore this aspect */
+	CBSP[0].receive(tr_CBSP_Recv(?, tr_CBSP_RESTART(?, CBSP_BC_MSGT_CBS, ?)));
 	setverdict(pass);
 }
 
@@ -122,6 +147,9 @@
 	timer T := 10.0;
 
 	f_init(guard_timeout := guard_timeout);
+
+	f_vty_configure_osmo_bsc_as_cbsp_client(BSCVTY);
+
 	CBSP_Adapter.f_bind(mp_cbc_ip, mp_cbc_port);
 
 	T.start;
diff --git a/bsc/osmo-bsc.cfg b/bsc/osmo-bsc.cfg
index f8be2cd..6a7c31a 100644
--- a/bsc/osmo-bsc.cfg
+++ b/bsc/osmo-bsc.cfg
@@ -423,7 +423,3 @@
  no missing-msc-text
 ctrl
  bind 127.0.0.1
-cbc
- remote-ip 127.0.0.1
- remote-port 48049
- listen-port 48050

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19831
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I7eea0dd39de50ed80af79e0f10c836b8685d8644
Gerrit-Change-Number: 19831
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200826/f4d0a743/attachment.htm>


More information about the gerrit-log mailing list