hlr: Integrate VTY and CTRL support
Change-Id: I3fbc26a98d31df6d4753848bba655a517801d686
diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn
index 60268b7..c48592e 100644
--- a/hlr/HLR_Tests.ttcn
+++ b/hlr/HLR_Tests.ttcn
@@ -3,10 +3,17 @@
import from GSUP_Types all;
import from IPA_Emulation all;
-type component test_CT {
+import from Osmocom_CTRL_Adapter all;
+
+import from Osmocom_VTY_Functions all;
+import from TELNETasp_PortType all;
+
+type component test_CT extends CTRL_Adapter_CT {
var IPA_Emulation_CT vc_IPA;
var IPA_CCM_Parameters ccm_pars;
port IPA_GSUP_PT GSUP;
+
+ port TELNETasp_PT VTY;
};
modulepar {
@@ -15,6 +22,12 @@
integer mp_hlr_ctrl_port := 4259;
};
+function f_init_vty() runs on test_CT {
+ map(self:VTY, system:VTY);
+ f_vty_set_prompts(VTY);
+ f_vty_transceive(VTY, "enable");
+}
+
function f_init() runs on test_CT {
ccm_pars := c_IPA_default_ccm_pars;
ccm_pars.name := "Osmocom TTCN-3 GSUP Simulator";
@@ -23,6 +36,10 @@
map(vc_IPA:IPA_PORT, system:IPA_CODEC_PT);
connect(vc_IPA:IPA_GSUP_PORT, self:GSUP);
vc_IPA.start(IPA_Emulation.main_client(mp_hlr_ip, mp_hlr_gsup_port, "", -1, ccm_pars));
+
+ f_init_vty();
+
+ f_ipa_ctrl_start(mp_hlr_ip, mp_hlr_ctrl_port);
}
testcase TC_gsup_sai_err_invalid_imsi() runs on test_CT {