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

dexter gerrit-no-reply at lists.osmocom.org
Fri Jul 2 13:30:09 UTC 2021


dexter has uploaded this change for review. ( 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, 15 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/20/24820/1

diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn
index 307f0a8..d36eb4c 100644
--- a/mgw/MGCP_Test.ttcn
+++ b/mgw/MGCP_Test.ttcn
@@ -30,6 +30,9 @@
 	import from IP_Types all;
 	import from Osmocom_VTY_Functions all;
 	import from TELNETasp_PortType 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/";
@@ -37,7 +40,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 {
+	type component dummy_CT extends CTRL_Adapter_CT {
 		port MGCP_CODEC_PT MGCP;
 		var boolean initialized := false;
 		var ConnectionId g_mgcp_conn_id := -1;
@@ -71,6 +74,7 @@
 		charstring mp_remote_ipv6 := "::1";
 		PortNumber mp_local_rtp_port_base := 10000;
 		PortNumber mp_local_osmux_port := 1985;
+		PortNumber mp_mgw_ctrl_port := 4267;
 	}
 
 	private function f_vty_enable_osmux(boolean osmux_on) runs on dummy_CT {
@@ -143,6 +147,8 @@
 			}
 		}
 
+		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 8893954..a4f11f6 100755
--- a/mgw/gen_links.sh
+++ b/mgw/gen_links.sh
@@ -37,6 +37,8 @@
 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 "
@@ -45,6 +47,9 @@
 FILES+="Native_Functions.ttcn Native_FunctionDefs.cc IPCP_Types.ttcn "
 FILES+="Osmocom_VTY_Functions.ttcn "
 FILES+="RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc "
+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 4662933..cd4a734 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 "
+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"
+
+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: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210702/f7d19471/attachment.htm>


More information about the gerrit-log mailing list