pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40762?usp=email )
Change subject: pgw: Use templates to generate UECUPS commands
......................................................................
pgw: Use templates to generate UECUPS commands
This way if commands are extended with optional fields, we don't need to
update these since default params in templates will take care of it.
Related: SYS#7073
Depends: osmo-uecups.git Change-Id If524b0a122d1217fcd39e4633835a1a7d0620c7a
Change-Id: I4de6623318fe2abf9807702251fe420eb14de2cc
---
M deps/Makefile
M pgw/PGW_Tests.ttcn
2 files changed, 9 insertions(+), 8 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/62/40762/1
diff --git a/deps/Makefile b/deps/Makefile
index 0f710e8..b0b18b3 100644
--- a/deps/Makefile
+++ b/deps/Makefile
@@ -124,7 +124,7 @@
titan.TestPorts.UDPasp_commit= 54176e95850654e5e8b0ffa2f1b5f35c412b949c
titan.TestPorts.UNIX_DOMAIN_SOCKETasp_commit= R.2.A-13-gd34ab71
titan.TestPorts.USB_commit= a9470fdc99c82fbf988f4508c3161118c9106e28
-osmo-uecups_commit= 8362efef7c6fa341eb947a75786878e0685767b7
+osmo-uecups_commit= 0eb4f08a31fd1d7aac6ffe9c6a60503f17c01787
all: $(foreach dir,$(ALL_REPOS),$(dir)/update)
clean: $(foreach dir,$(ALL_REPOS),$(dir)/clean)
diff --git a/pgw/PGW_Tests.ttcn b/pgw/PGW_Tests.ttcn
index c63568e..1ba58f4 100644
--- a/pgw/PGW_Tests.ttcn
+++ b/pgw/PGW_Tests.ttcn
@@ -702,7 +702,7 @@
g_gtpu6_remote := rx_fteid.iPv6_Address;
}
- var UECUPS_CreateTun uecups_create := {
+ var template (value) UECUPS_CreateTun uecups_create := ts_UECUPS_CreateTun(
tx_teid := oct2int(g_pars.bearer.teid_remote),
rx_teid := oct2int(g_pars.bearer.teid_local),
user_addr_type := IPV4,
@@ -711,7 +711,7 @@
remote_gtp_ep := valueof(ts_UECUPS_SockAddr(g_gtpu4_remote)),
tun_dev_name := g_pars.tun_dev_name,
tun_netns_name := g_pars.tun_netns_name
- };
+ );
/* create tunnel in daemon */
if (isbound(g_ip4_addr)) {
@@ -889,10 +889,11 @@
/* destroy tunnel in daemon */
if (isbound(g_pars.bearer.teid_local)) {
- var UECUPS_DestroyTun uecups_destroy := {
+ var template (value) UECUPS_DestroyTun uecups_destroy;
+ uecups_destroy := ts_UECUPS_DestroyTun(
local_gtp_ep := valueof(ts_UECUPS_SockAddr(f_inet_addr(mp_local_hostname_u))),
rx_teid := oct2int(g_pars.bearer.teid_local)
- };
+ );
/* FIXME: what about IPv4/IPv6 differentiation? */
f_gtp1u_destroy_tunnel(uecups_destroy);
}
@@ -901,13 +902,13 @@
private function f_run_prog_init(charstring command) runs on PGW_Session_CT return
UECUPS_StartProgram
{
- var UECUPS_StartProgram sprog := {
+ var template (value) UECUPS_StartProgram sprog := ts_UECUPS_StartProgram(
command := command,
environment := {},
run_as_user := mp_run_prog_as_user,
tun_netns_name := g_pars.tun_netns_name
- };
- return sprog;
+ );
+ return valueof(sprog);
}
private function f_run_prog_unique_log_path() runs on PGW_Session_CT return charstring
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40762?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I4de6623318fe2abf9807702251fe420eb14de2cc
Gerrit-Change-Number: 40762
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>