move f_vty_config() from MSC_Tests to Osmocom_VTY_Functions

Change-Id: Ie7373c28b1d2b76f8d637ac6c86976fd341e3e2c
This commit is contained in:
Harald Welte 2018-02-16 22:10:33 +01:00
parent 1967d47ea1
commit 872ce17d35
3 changed files with 39 additions and 11 deletions

View File

@ -109,4 +109,16 @@ module Osmocom_VTY_Functions {
f_vty_transceive(pt, "timeslot " & int2str(ts));
}
function f_vty_config(TELNETasp_PT pt, charstring config_node, charstring cmd)
{
/* enter config mode; enter node */
f_vty_enter_config(pt);
f_vty_transceive(pt, config_node);
/* execute command */
f_vty_transceive(pt, cmd);
/* leave config mode */
f_vty_transceive(pt, "end");
}
}

View File

@ -381,17 +381,6 @@ function f_start_handler(void_fn fn, charstring id, integer imsi_suffix) runs on
return vc_conn;
}
function f_vty_config(TELNETasp_PT pt, charstring config_node, charstring cmd)
{
/* enter config mode; enter node */
f_vty_enter_config(pt);
f_vty_transceive(pt, config_node);
/* execute command */
f_vty_transceive(pt, cmd);
/* leave config mode */
f_vty_transceive(pt, "end");
}
private function f_tc_lu_imsi_noauth_tmsi(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {
f_init_handler(pars);
f_perform_lu(true);

27
sgsn/SGSN_Tests.default Normal file
View File

@ -0,0 +1,27 @@
[LOGGING]
"IPA-CTRL-IPA".FileMask := ERROR | WARNING;
[TESTPORT_PARAMETERS]
*.SGSNVTY.CTRL_MODE := "client"
*.SGSNVTY.CTRL_HOSTNAME := "127.0.0.1"
*.SGSNVTY.CTRL_PORTNUM := "4254"
*.SGSNVTY.CTRL_LOGIN_SKIPPED := "yes"
*.SGSNVTY.CTRL_DETECT_SERVER_DISCONNECTED := "yes"
*.SGSNVTY.CTRL_READMODE := "buffered"
*.SGSNVTY.CTRL_CLIENT_CLEANUP_LINEFEED := "yes"
*.SGSNVTY.PROMPT1 := "OsmoSGSN> "
[MODULE_PARAMETERS]
#NS_Emulation.mp_local_ip := "192.168.100.239"
NS_Emulation.mp_local_udp_port := 21000
#NS_Emulation.mp_remote_ip := "192.168.100.196"
NS_Emulation.mp_remote_udp_port := 23000
NS_Emulation.mp_nsvci := 97
NS_Emulation.mp_nsei := 96
Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoSGSN";
[MAIN_CONTROLLER]
[EXECUTE]
SGSN_Tests.control