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/.
dexter gerrit-no-reply at lists.osmocom.orgdexter has uploaded this change for review. ( https://gerrit.osmocom.org/12981 Change subject: MGCP_Test: Add VTY access ...................................................................... MGCP_Test: Add VTY access The MGCP_Test testsuite currenty lacks VTY access capabilities, lets add them so that future testcases can access the VTY in order to change options on the fly. Depends: osmo-ttcn3-hacks Ife949c61156222de3026280071226ef6f5dbd959 Change-Id: If383f81af3306f8f5bdf50152498ae1303d390df Related: OS#3807 --- M mgw/MGCP_Test.default M mgw/MGCP_Test.ttcn M mgw/gen_links.sh M mgw/regen_makefile.sh 4 files changed, 37 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/81/12981/1 diff --git a/mgw/MGCP_Test.default b/mgw/MGCP_Test.default index 16027cc..4336033 100644 --- a/mgw/MGCP_Test.default +++ b/mgw/MGCP_Test.default @@ -2,12 +2,22 @@ FileMask := LOG_ALL | TTCN_MATCHING; [TESTPORT_PARAMETERS] +*.MGWVTY.CTRL_MODE := "client" +*.MGWVTY.CTRL_HOSTNAME := "127.0.0.1" +*.MGWVTY.CTRL_PORTNUM := "4243" +*.MGWVTY.CTRL_LOGIN_SKIPPED := "yes" +*.MGWVTY.CTRL_DETECT_SERVER_DISCONNECTED := "yes" +*.MGWVTY.CTRL_READMODE := "buffered" +*.MGWVTY.CTRL_CLIENT_CLEANUP_LINEFEED := "yes" +*.MGWVTY.CTRL_DETECT_CONNECTION_ESTABLISHMENT_RESULT := "yes" +*.MGWVTY.PROMPT1 := "OsmoMGW> " [MODULE_PARAMETERS] mp_local_udp_port := 2727; mp_local_ip:= "127.0.0.1"; mp_remote_udp_port := 2427; mp_remote_ip:= "127.0.0.1"; +Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoMGW"; [MAIN_CONTROLLER] diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn index 9adeb2a..9eff8c2 100644 --- a/mgw/MGCP_Test.ttcn +++ b/mgw/MGCP_Test.ttcn @@ -9,6 +9,12 @@ import from RTP_CodecPort_CtrlFunct all; import from RTP_Emulation all; import from IPL4asp_Types all; + import from General_Types all; + import from Native_Functions all; + import from IPCP_Types all; + import from IP_Types all; + import from Osmocom_VTY_Functions all; + import from TELNETasp_PortType all; const charstring c_mgw_domain := "mgw"; const charstring c_mgw_ep_rtpbridge := "rtpbridge/"; @@ -24,6 +30,8 @@ var RTP_Emulation_CT vc_RTPEM[3]; port RTPEM_CTRL_PT RTPEM[3]; + + port TELNETasp_PT MGWVTY; }; function get_next_trans_id() runs on dummy_CT return MgcpTransId { @@ -44,6 +52,12 @@ PortNumber mp_local_rtp_port_base := 10000; } + private function f_init_vty() runs on dummy_CT { + map(self:MGWVTY, system:MGWVTY); + f_vty_set_prompts(MGWVTY); + f_vty_transceive(MGWVTY, "enable"); + } + private function f_rtpem_init(inout RTP_Emulation_CT comp_ref, integer i) runs on dummy_CT { comp_ref := RTP_Emulation_CT.create("RTPEM" & int2str(i)); @@ -85,6 +99,8 @@ /* do a DLCX on all connections of the EP */ f_dlcx_ignore(valueof(ep)); } + + f_init_vty(); } testcase TC_selftest() runs on dummy_CT { diff --git a/mgw/gen_links.sh b/mgw/gen_links.sh index 8b2def7..632f2e3 100755 --- a/mgw/gen_links.sh +++ b/mgw/gen_links.sh @@ -29,10 +29,20 @@ FILES="RTP_EncDec.cc RTP_Types.ttcn" gen_links $DIR $FILES +DIR=$BASEDIR/titan.ProtocolModules.IP/src +FILES="IP_EncDec.cc IP_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="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc " FILES+="RTP_CodecPort.ttcn RTP_Emulation.ttcn IuUP_Types.ttcn IuUP_Emulation.ttcn IuUP_EncDec.cc " +FILES+="Native_Functions.ttcn Native_FunctionDefs.cc IPCP_Types.ttcn " +FILES+="Osmocom_VTY_Functions.ttcn " gen_links $DIR $FILES ignore_pp_results diff --git a/mgw/regen_makefile.sh b/mgw/regen_makefile.sh index 2b7d1f4..64a4fc5 100755 --- a/mgw/regen_makefile.sh +++ b/mgw/regen_makefile.sh @@ -1,5 +1,5 @@ #!/bin/sh -FILES="*.ttcn SDP_EncDec.cc *.c MGCP_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc RTP_EncDec.cc RTP_CodecPort_CtrlFunctDef.cc IuUP_EncDec.cc " +FILES="*.ttcn SDP_EncDec.cc *.c MGCP_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc RTP_EncDec.cc RTP_CodecPort_CtrlFunctDef.cc IuUP_EncDec.cc Native_FunctionDefs.cc TELNETasp_PT.cc IP_EncDec.cc " ../regen-makefile.sh MGCP_Test.ttcn $FILES -- To view, visit https://gerrit.osmocom.org/12981 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If383f81af3306f8f5bdf50152498ae1303d390df Gerrit-Change-Number: 12981 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190220/27af868d/attachment.htm>