BSC CBSP: apply changes to 'cbc' vty section, switch server<->client modes
With Icaa2775cc20a99227dabe38a775ff808b374cf98, osmo-bsc no longer allows configuring CBSP as both server and client at the same time, and the 'cbc' VTY section has a different structure. Adjust the 'cbc' section in osmo-bsc.cfg. For each CBSP test init, switch osmo-bsc's CBSP link to server or client mode by new vty command 'cbc' / 'mode (server|client|disabled)'. Related: Icaa2775cc20a99227dabe38a775ff808b374cf98 (osmo-bsc) Related: I9e9760121265b3661f1c179610e975cf7a0873f1 (docker-playground) Related: OS#4702 Change-Id: I7eea0dd39de50ed80af79e0f10c836b8685d8644
This commit is contained in:
parent
c03eb12b58
commit
cec2d802ad
|
@ -37,6 +37,9 @@ import from CBSP_Templates all;
|
|||
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,14 @@ var ASP_RSL_Unitdata rx;
|
|||
}
|
||||
}
|
||||
|
||||
private function f_vty_set_cbsp_mode(TELNETasp_PT pt, charstring mode) {
|
||||
f_vty_enter_config(pt);
|
||||
f_vty_transceive(pt, "cbc");
|
||||
f_vty_transceive(pt, "mode " & mode);
|
||||
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 +122,9 @@ private function f_init(float guard_timeout := 30.0) runs on cbsp_test_CT {
|
|||
}
|
||||
private function f_cbsp_init_client() runs on cbsp_test_CT {
|
||||
f_init();
|
||||
f_vty_set_cbsp_mode(BSCVTY, "server");
|
||||
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 +133,9 @@ private function f_cbsp_init_server(uint16_t cbsp_msg_id, uint16_t cbsp_ser_no,
|
|||
timer T := 10.0;
|
||||
|
||||
f_init(guard_timeout := guard_timeout);
|
||||
|
||||
f_vty_set_cbsp_mode(BSCVTY, "client");
|
||||
|
||||
CBSP_Adapter.f_bind(mp_cbc_ip, mp_cbc_port);
|
||||
|
||||
T.start;
|
||||
|
|
|
@ -424,6 +424,10 @@ bsc
|
|||
ctrl
|
||||
bind 127.0.0.1
|
||||
cbc
|
||||
remote-ip 127.0.0.1
|
||||
remote-port 48049
|
||||
listen-port 48050
|
||||
mode disabled
|
||||
client
|
||||
remote-ip 127.0.0.1
|
||||
remote-port 48049
|
||||
server
|
||||
local-ip 127.0.0.1
|
||||
local-port 48050
|
||||
|
|
Loading…
Reference in New Issue