Harald Welte has submitted this change and it was merged. Change subject: bsc: Add VTY module to BSC_Tests ......................................................................
bsc: Add VTY module to BSC_Tests Change-Id: Ia78f1231f56fc5f3b003bccc850ea109ed4ed2d8 --- M bsc/BSC_Tests.cfg M bsc/BSC_Tests.ttcn M bsc/gen_links.sh M bsc/regen_makefile.sh 4 files changed, 26 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/bsc/BSC_Tests.cfg b/bsc/BSC_Tests.cfg index c31c9eb..44bbf61 100644 --- a/bsc/BSC_Tests.cfg +++ b/bsc/BSC_Tests.cfg @@ -12,6 +12,14 @@ [TESTPORT_PARAMETERS] #*.*.udpReuseAddress := "yes"; +*.BSCVTY.CTRL_MODE := "client" +*.BSCVTY.CTRL_HOSTNAME := "127.0.0.1" +*.BSCVTY.CTRL_PORTNUM := "4242" +*.BSCVTY.CTRL_LOGIN_SKIPPED := "yes" +*.BSCVTY.CTRL_DETECT_SERVER_DISCONNECTED := "yes" +*.BSCVTY.CTRL_READMODE := "buffered" +*.BSCVTY.CTRL_CLIENT_CLEANUP_LINEFEED := "yes" +*.BSCVTY.PROMPT1 := "OsmoBSC> " [MODULE_PARAMETERS] #mp_bsc_rsl_port := 3003; @@ -30,6 +38,7 @@ #}; #mp_ipa_mgcp_uses_osmo_ext := true; +Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoBSC"; [MAIN_CONTROLLER] diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index cb2b41e..9ab3b2c 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -37,6 +37,9 @@ import from Osmocom_CTRL_Types all; import from Osmocom_CTRL_Adapter all; +import from Osmocom_VTY_Functions all; +import from TELNETasp_PortType all; + import from MobileL3_CommonIE_Types all; import from MobileL3_Types all; import from L3_Templates all; @@ -63,6 +66,7 @@ port IPA_RSL_PT IPA_RSL[NUM_BTS]; var MGCP_Emulation_CT vc_MGCP; + port TELNETasp_PT BSCVTY; var BSSAP_Adapter g_bssap; /* for old legacy-tests only */ @@ -235,6 +239,12 @@ vc_MGCP.start(MGCP_Emulation.main(ops, mgcp_pars, id)); } +private function f_init_vty(charstring id) runs on test_CT { + map(self:BSCVTY, system:BSCVTY); + f_vty_set_prompts(BSCVTY); + f_vty_transceive(BSCVTY, "enable"); +} + /* global initialization function * \param nr_bts Number of BTSs we should start/bring up * \param handler_mode Start an RSL_Emulation_CT component (true) or not (false) */ @@ -258,6 +268,7 @@ f_ipa_ctrl_start(mp_bsc_ip, mp_bsc_ctrl_port); f_init_mgcp("VirtMSC"); + f_init_vty("VirtMSC"); for (i := 0; i < nr_bts; i := i+1) { /* wait until osmo-bts-omldummy has respawned */ diff --git a/bsc/gen_links.sh b/bsc/gen_links.sh index e807ca5..c80ae64 100755 --- a/bsc/gen_links.sh +++ b/bsc/gen_links.sh @@ -75,6 +75,10 @@ FILES="RTP_EncDec.cc RTP_Types.ttcn" gen_links $DIR $FILES +DIR=$BASEDIR/titan.TestPorts.TELNETasp/src +FILES="TELNETasp_PT.cc TELNETasp_PT.hh TELNETasp_PortType.ttcn" +gen_links $DIR $FILES + DIR=../library -FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn Native_Functions.ttcn Native_FunctionDefs.cc IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn RSL_Emulation.ttcn MGCP_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc BSSAP_CodecPort.ttcn BSSAP_Adapter.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn RTP_CodecPort.ttcn RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc RTP_Emulation.ttcn IuUP_Types.ttcn IuUP_EncDec.cc IuUP_Emulation.ttcn GSUP_Types.ttcn" +FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn RSL_Emulation.ttcn MGCP_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc BSSAP_CodecPort.ttcn BSSAP_Adapter.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn RTP_CodecPort.ttcn RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc RTP_Emulation.ttcn IuUP_Types.ttcn IuUP_EncDec.cc IuUP_Emulation.ttcn GSUP_Types.ttcn" gen_links $DIR $FILES diff --git a/bsc/regen_makefile.sh b/bsc/regen_makefile.sh index 08eaae4..0b8e1fa 100755 --- a/bsc/regen_makefile.sh +++ b/bsc/regen_makefile.sh @@ -2,6 +2,6 @@ MAIN=BSC_Tests.ttcn -FILES="*.ttcn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SCTPasp_PT.cc RTP_EncDec.cc SDP_EncDec.cc RTP_CodecPort_CtrlFunctDef.cc MGCP_CodecPort_CtrlFunctDef.cc IuUP_EncDec.cc Native_FunctionDefs.cc *.c" +FILES="*.ttcn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SCTPasp_PT.cc RTP_EncDec.cc SDP_EncDec.cc RTP_CodecPort_CtrlFunctDef.cc MGCP_CodecPort_CtrlFunctDef.cc IuUP_EncDec.cc Native_FunctionDefs.cc TELNETasp_PT.cc *.c" ../regen-makefile.sh $MAIN $FILES -- To view, visit https://gerrit.osmocom.org/6394 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia78f1231f56fc5f3b003bccc850ea109ed4ed2d8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte <lafo...@gnumonks.org> Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org> Gerrit-Reviewer: Jenkins Builder