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
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 {