dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36604?usp=email )
Change subject: SGP32Definitions_Templates: add missing new line at the endo of file
......................................................................
SGP32Definitions_Templates: add missing new line at the endo of file
Related: SYS#6563
Change-Id: I0e7c3b514ba6569c3707ae20ed213591ca7d0e1c
---
M library/euicc/SGP32Definitions_Templates.ttcn
1 file changed, 11 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/04/36604/1
diff --git a/library/euicc/SGP32Definitions_Templates.ttcn b/library/euicc/SGP32Definitions_Templates.ttcn
index f22778c..a8e0730 100644
--- a/library/euicc/SGP32Definitions_Templates.ttcn
+++ b/library/euicc/SGP32Definitions_Templates.ttcn
@@ -430,4 +430,4 @@
}
}
-}
\ No newline at end of file
+}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36604?usp=email
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: I0e7c3b514ba6569c3707ae20ed213591ca7d0e1c
Gerrit-Change-Number: 36604
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36603?usp=email )
Change subject: HTTP_Adapter: put HTTP config options into a record
......................................................................
HTTP_Adapter: put HTTP config options into a record
The function f_http_init currently takes only two config options. For the
moment this is not a problem, but the amount of additional options may grow
in the future. So let's put the options in a record to have them separate.
Change-Id: I4c1c204ea38d76d5fdd7e539d56ca2bf9f693d7d
Related: SYS#6824
---
M cbc/CBC_Tests.ttcn
M library/HTTP_Adapter.ttcn
M remsim/RemsimServer_Tests.ttcn
3 files changed, 35 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/03/36603/1
diff --git a/cbc/CBC_Tests.ttcn b/cbc/CBC_Tests.ttcn
index 2f1ad7f..18f9e6d 100644
--- a/cbc/CBC_Tests.ttcn
+++ b/cbc/CBC_Tests.ttcn
@@ -187,7 +187,12 @@
}
private function f_init(integer num_bsc := 0, integer num_mme := 0) runs on test_CT {
- f_http_init(mp_cbc_host, mp_cbc_ecbe_port);
+ var HTTP_Adapter_cfg http_adapter_cfg;
+ http_adapter_cfg := {
+ host := mp_cbc_host,
+ http_port := mp_cbc_ecbe_port
+ };
+ f_http_init(http_adapter_cfg);
g_num_bsc := num_bsc;
for (var integer i := 0; i < g_num_bsc; i := i + 1) {
diff --git a/library/HTTP_Adapter.ttcn b/library/HTTP_Adapter.ttcn
index c54d599..b9448ff 100644
--- a/library/HTTP_Adapter.ttcn
+++ b/library/HTTP_Adapter.ttcn
@@ -23,10 +23,16 @@
var integer g_http_port;
};
-function f_http_init(charstring host, integer http_port) runs on http_CT {
+type record HTTP_Adapter_cfg {
+ charstring host,
+ integer http_port
+}
+
+function f_http_init(HTTP_Adapter_cfg cfg) runs on http_CT {
map(self:HTTP, system:HTTP);
- g_http_host := host;
- g_http_port := http_port;
+ g_http_host := cfg.host;
+ g_http_port := cfg.http_port;
+ g_use_ssl := use_ssl;
}
template (value) Connect ts_HTTP_Connect(template (value) charstring hostname,
diff --git a/remsim/RemsimServer_Tests.ttcn b/remsim/RemsimServer_Tests.ttcn
index 6d2b27d..7307faf 100644
--- a/remsim/RemsimServer_Tests.ttcn
+++ b/remsim/RemsimServer_Tests.ttcn
@@ -68,7 +68,12 @@
function f_rsres_init() runs on http_CT {
- f_http_init(mp_server_ip, mp_rsres_port);
+ var HTTP_Adapter_cfg http_adapter_cfg;
+ http_adapter_cfg := {
+ host := mp_server_ip,
+ http_port := mp_rsres_port
+ };
+ f_http_init(http_adapter_cfg);
f_rsres_post_reset();
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36603?usp=email
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: I4c1c204ea38d76d5fdd7e539d56ca2bf9f693d7d
Gerrit-Change-Number: 36603
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: pespin.
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36504?usp=email )
Change subject: HTTP_Adapter: allow API users to specifiy custom header
......................................................................
Patch Set 2:
(4 comments)
File library/HTTP_Adapter.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36504/comment/a703254b_c50d…
PS1, Line 41: function ts_HTTP_Header(template charstring body := omit,
> I'd prefer having this one prefixed "f_ts_", since it's actually a function. […]
Done
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36504/comment/c033169a_48c0…
PS1, Line 42: template charstring host := omit,
> template (omit) charstring
Done
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36504/comment/2752abad_bcf7…
PS1, Line 55: if (ispresent(body)) {
> I'm not sure ispresent() can be used this way, or only for optional fields in a record. […]
I have verified that it works with ispresent(), but if (not istemplatekind(body, "omit")) also works.
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36504/comment/05a2da73_5e25…
PS1, Line 59: /* Add custom header lines, already existing headers (name) are updated */
> I think it makes sense to move this to a separate function "merge_headers()" or "overlay_headers()". […]
Done
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36504?usp=email
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: I115fd14254e0957c0955649aeb47059dc180bf57
Gerrit-Change-Number: 36504
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 19 Apr 2024 11:55:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment