Change in osmo-ttcn3-hacks[master]: MGCP_Test: add control interface to MGW testsuite

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.org
Fri Aug 20 08:14:57 UTC 2021


dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24820 )

Change subject: MGCP_Test: add control interface to MGW testsuite
......................................................................

MGCP_Test: add control interface to MGW testsuite

The testsuite for osmo-mgw does not use the control interface yet.

Change-Id: I7324802bf6e692ce8b7d9b269dd2385a7d3d0d77
---
M mgw/MGCP_Test.ttcn
M mgw/gen_links.sh
M mgw/regen_makefile.sh
3 files changed, 13 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  osmith: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn
index b0891f5..b5b91f0 100644
--- a/mgw/MGCP_Test.ttcn
+++ b/mgw/MGCP_Test.ttcn
@@ -34,6 +34,9 @@
 	import from StatsD_CodecPort all;
 	import from StatsD_CodecPort_CtrlFunct all;
 	import from StatsD_Checker all;
+	import from Osmocom_CTRL_Functions all;
+	import from Osmocom_CTRL_Types all;
+	import from Osmocom_CTRL_Adapter all;
 
 	const charstring c_mgw_domain := "mgw";
 	const charstring c_mgw_ep_rtpbridge := "rtpbridge/";
@@ -41,7 +44,7 @@
 	/* any variables declared in the component will be available to
 	 * all functions that 'run on' the named component, similar to
 	 * class members in C++ */
-	type component dummy_CT extends StatsD_ConnHdlr {
+	type component dummy_CT extends StatsD_ConnHdlr, CTRL_Adapter_CT {
 		port MGCP_CODEC_PT MGCP;
 		var boolean initialized := false;
 		var ConnectionId g_mgcp_conn_id := -1;
@@ -78,6 +81,7 @@
 		PortNumber mp_local_rtp_port_base := 10000;
 		PortNumber mp_local_osmux_port := 1985;
 		PortNumber mp_mgw_statsd_port := 8125;
+		PortNumber mp_mgw_ctrl_port := 4267;
 	}
 
 	private function f_vty_enable_osmux(boolean osmux_on) runs on dummy_CT {
@@ -155,6 +159,8 @@
 			f_statsd_reset();
 		}
 
+		f_ipa_ctrl_start_client(mp_remote_ipv4, mp_mgw_ctrl_port);
+
 		if (isvalue(ep)) {
 			/* do a DLCX on all connections of the EP */
 			f_dlcx_ignore(valueof(ep));
diff --git a/mgw/gen_links.sh b/mgw/gen_links.sh
index 6ca53a6..d591277 100755
--- a/mgw/gen_links.sh
+++ b/mgw/gen_links.sh
@@ -46,6 +46,9 @@
 FILES+="Osmocom_VTY_Functions.ttcn "
 FILES+="RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc "
 FILES+="StatsD_Types.ttcn StatsD_CodecPort.ttcn StatsD_CodecPort_CtrlFunct.ttcn StatsD_CodecPort_CtrlFunctdef.cc StatsD_Checker.ttcn "
+FILES+="IPA_Types.ttcn IPA_Emulation.ttcnpp IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc "
+FILES+="Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn "
+
 gen_links $DIR $FILES
 
 ignore_pp_results
diff --git a/mgw/regen_makefile.sh b/mgw/regen_makefile.sh
index 2368c77..46dd587 100755
--- a/mgw/regen_makefile.sh
+++ b/mgw/regen_makefile.sh
@@ -1,5 +1,7 @@
 #!/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 OSMUX_CodecPort_CtrlFunctDef.cc IuUP_EncDec.cc Native_FunctionDefs.cc TELNETasp_PT.cc IP_EncDec.cc StatsD_CodecPort_CtrlFunctdef.cc "
+FILES="*.ttcn *.ttcnpp IPA_CodecPort_CtrlFunctDef.cc 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 OSMUX_CodecPort_CtrlFunctDef.cc IuUP_EncDec.cc Native_FunctionDefs.cc TELNETasp_PT.cc IP_EncDec.cc StatsD_CodecPort_CtrlFunctdef.cc "
+
+export CPPFLAGS_TTCN3="-DIPA_EMULATION_CTRL"
 
 ../regen-makefile.sh MGCP_Test.ttcn $FILES

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24820
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I7324802bf6e692ce8b7d9b269dd2385a7d3d0d77
Gerrit-Change-Number: 24820
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-CC: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210820/a88dc8e8/attachment.htm>


More information about the gerrit-log mailing list