lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

April 2024

  • 1 participants
  • 1128 discussions
[S] Change in osmo-ttcn3-hacks[master]: SGP32Definitions_Templates: add missing new line at the end of file
by laforge 24 Apr '24

24 Apr '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36604?usp=email ) ( 3 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: SGP32Definitions_Templates: add missing new line at the end of file ...................................................................... SGP32Definitions_Templates: add missing new line at the end of file Related: SYS#6563 Change-Id: I0e7c3b514ba6569c3707ae20ed213591ca7d0e1c --- M library/euicc/SGP32Definitions_Templates.ttcn 1 file changed, 11 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/library/euicc/SGP32Definitions_Templates.ttcn b/library/euicc/SGP32Definitions_Templates.ttcn index 9964628..140ab6e 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: 4 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: SGP32Definitions_Templates: rename tx_provideEimPackageResultResponse
by laforge 24 Apr '24

24 Apr '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36607?usp=email ) ( 3 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: SGP32Definitions_Templates: rename tx_provideEimPackageResultResponse ...................................................................... SGP32Definitions_Templates: rename tx_provideEimPackageResultResponse The template tr_provideEimPackageResultResponse and ts_provideEimPackageResultResponse should be renamed to tr_provideEimPackageResultResponse_eimAck and ts_provideEimPackageResultResponse_eimAck as the TODO message says. Related: SYS#6563 Change-Id: I68536eec6d04364efdbbbd5205788cf5c8ab3028 --- M library/euicc/SGP32Definitions_Templates.ttcn 1 file changed, 16 insertions(+), 3 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve diff --git a/library/euicc/SGP32Definitions_Templates.ttcn b/library/euicc/SGP32Definitions_Templates.ttcn index 1a33be4..36d77b4 100644 --- a/library/euicc/SGP32Definitions_Templates.ttcn +++ b/library/euicc/SGP32Definitions_Templates.ttcn @@ -363,15 +363,14 @@ } /* GSMA SGP.32, section 6.3.2.7 */ -/* TODO rename tr_provideEimPackageResultResponse to something like tr_provideEimPackageResultResponse_eimAck */ template (present) EsipaMessageFromEimToIpa -tr_provideEimPackageResultResponse := { +tr_provideEimPackageResultResponse_eimAck := { provideEimPackageResultResponse := { eimAcknowledgements := * } } template (value) EsipaMessageFromEimToIpa -ts_provideEimPackageResultResponse(template (value) EimAcknowledgements eimAcknowledgements := {}) := { +ts_provideEimPackageResultResponse_eimAck(template (value) EimAcknowledgements eimAcknowledgements := {}) := { provideEimPackageResultResponse := { eimAcknowledgements := eimAcknowledgements } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36607?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: I68536eec6d04364efdbbbd5205788cf5c8ab3028 Gerrit-Change-Number: 36607 Gerrit-PatchSet: 4 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: SGP32Definitions_Templates: add template tr_provideEimPackageResult_e...
by laforge 24 Apr '24

24 Apr '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36608?usp=email ) ( 3 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: SGP32Definitions_Templates: add template tr_provideEimPackageResult_ePRAndNotif ...................................................................... SGP32Definitions_Templates: add template tr_provideEimPackageResult_ePRAndNotif Add a new template to verify the provideEimPackageResult request (ESipa) from the IPAd Related: SYS#6563 Change-Id: I86231f0e9dcef90abf60757cc55895863ad2b1b3 --- M library/euicc/SGP32Definitions_Templates.ttcn 1 file changed, 22 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/library/euicc/SGP32Definitions_Templates.ttcn b/library/euicc/SGP32Definitions_Templates.ttcn index 36d77b4..29e7579 100644 --- a/library/euicc/SGP32Definitions_Templates.ttcn +++ b/library/euicc/SGP32Definitions_Templates.ttcn @@ -363,6 +363,15 @@ } /* GSMA SGP.32, section 6.3.2.7 */ +template (present) EsipaMessageFromIpaToEim +tr_provideEimPackageResult_ePRAndNotif := { + provideEimPackageResult := { + ePRAndNotifications := { + euiccPackageResult := ?, + notificationList := ? + } + } +} template (present) EsipaMessageFromEimToIpa tr_provideEimPackageResultResponse_eimAck := { provideEimPackageResultResponse := { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36608?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: I86231f0e9dcef90abf60757cc55895863ad2b1b3 Gerrit-Change-Number: 36608 Gerrit-PatchSet: 4 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: SGP32Definitions_Templates: add new set of templates to support rollback
by laforge 24 Apr '24

24 Apr '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36609?usp=email ) ( 3 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: SGP32Definitions_Templates: add new set of templates to support rollback ...................................................................... SGP32Definitions_Templates: add new set of templates to support rollback This patch adds a number of templates that are needed to test profile rollback. Related: SYS#6563 Change-Id: I6db76afb102bf011655b7dbca9cff07b8116eb8d --- M library/euicc/SGP32Definitions_EncDec.cc M library/euicc/SGP32Definitions_Templates.ttcn M library/euicc/SGP32Definitions_Types.ttcn 3 files changed, 91 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/library/euicc/SGP32Definitions_EncDec.cc b/library/euicc/SGP32Definitions_EncDec.cc index 4dfcc6b..a457943 100644 --- a/library/euicc/SGP32Definitions_EncDec.cc +++ b/library/euicc/SGP32Definitions_EncDec.cc @@ -109,5 +109,39 @@ return msg; } +OCTETSTRING enc__ProfileRollbackRequest(const ProfileRollbackRequest &msg) { + TTCN_Buffer buf; + + buf.clear(); + msg.encode(ProfileRollbackRequest_descr_, buf, TTCN_EncDec::CT_BER, BER_ENCODE_DER); + return OCTETSTRING(buf.get_len(), buf.get_data()); +} + +ProfileRollbackRequest dec__ProfileRollbackRequest(const OCTETSTRING &stream) { + TTCN_Buffer buf; + ProfileRollbackRequest msg; + buf.put_os(stream); + + msg.decode(ProfileRollbackRequest_descr_, buf, TTCN_EncDec::CT_BER, BER_ACCEPT_ALL); + return msg; +} + +OCTETSTRING enc__ProfileRollbackResponse(const ProfileRollbackResponse &msg) { + TTCN_Buffer buf; + + buf.clear(); + msg.encode(ProfileRollbackResponse_descr_, buf, TTCN_EncDec::CT_BER, BER_ENCODE_DER); + return OCTETSTRING(buf.get_len(), buf.get_data()); +} + +ProfileRollbackResponse dec__ProfileRollbackResponse(const OCTETSTRING &stream) { + TTCN_Buffer buf; + ProfileRollbackResponse msg; + buf.put_os(stream); + + msg.decode(ProfileRollbackResponse_descr_, buf, TTCN_EncDec::CT_BER, BER_ACCEPT_ALL); + return msg; +} + } diff --git a/library/euicc/SGP32Definitions_Templates.ttcn b/library/euicc/SGP32Definitions_Templates.ttcn index 29e7579..c178a9c 100644 --- a/library/euicc/SGP32Definitions_Templates.ttcn +++ b/library/euicc/SGP32Definitions_Templates.ttcn @@ -437,4 +437,43 @@ } } +/* GSMA SGP.32, section 5.9.16 */ +template (present) ProfileRollbackRequest +tr_profileRollbackRequest := { + refreshFlag := ? +} +template (value) ProfileRollbackRequest +ts_profileRollbackRequest := { + refreshFlag := false +} +template (present) ProfileRollbackResponse +tr_profileRollbackResponse := { + cmdResult := ?, + eUICCPackageResult := ? +} +template (value) ProfileRollbackResponse +ts_profileRollbackResponse := { + cmdResult := 0, + eUICCPackageResult := { + euiccPackageResultSigned := { + euiccPackageResultDataSigned := { + eimId := "myEim", + counterValue := 333, + transactionId := omit, + seqNumber := 1234, + euiccResult := { + { + enableResult := 0 + }, + { + rollbackResult := 0 + } + } + }, + euiccSignEPR := 'AABBCCDDEEFF'O + } + } +} + + } diff --git a/library/euicc/SGP32Definitions_Types.ttcn b/library/euicc/SGP32Definitions_Types.ttcn index 44a1a07..4b68e67 100644 --- a/library/euicc/SGP32Definitions_Types.ttcn +++ b/library/euicc/SGP32Definitions_Types.ttcn @@ -18,7 +18,10 @@ external function dec_GetEimConfigurationDataResponse(in octetstring stream) return GetEimConfigurationDataResponse; external function enc_GetEimConfigurationDataResponse(in GetEimConfigurationDataResponse msg) return octetstring; -external function dec_AddInitialEimResponse(in octetstring stream) return AddInitialEimResponse; -external function enc_AddInitialEimResponse(in AddInitialEimResponse msg) return octetstring; +external function dec_ProfileRollbackRequest(in octetstring stream) return ProfileRollbackRequest; +external function enc_ProfileRollbackRequest(in ProfileRollbackRequest msg) return octetstring; + +external function dec_ProfileRollbackResponse(in octetstring stream) return ProfileRollbackResponse; +external function enc_ProfileRollbackResponse(in ProfileRollbackResponse msg) return octetstring; } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36609?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: I6db76afb102bf011655b7dbca9cff07b8116eb8d Gerrit-Change-Number: 36609 Gerrit-PatchSet: 4 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: HTTP_Adapter: allow API users to specifiy custom header
by laforge 24 Apr '24

24 Apr '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36504?usp=email ) Change subject: HTTP_Adapter: allow API users to specifiy custom header ...................................................................... HTTP_Adapter: allow API users to specifiy custom header At the moment HTTP_Adapter can only make requests with a fixed pre-defined HTTP header. However, some application may require additional custom header lines or different values than the ones specified in the pre-defined HTTP header. Related: SYS#6824 Change-Id: I115fd14254e0957c0955649aeb47059dc180bf57 --- M library/HTTP_Adapter.ttcn 1 file changed, 68 insertions(+), 10 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/library/HTTP_Adapter.ttcn b/library/HTTP_Adapter.ttcn index 0885f05..b302a80 100644 --- a/library/HTTP_Adapter.ttcn +++ b/library/HTTP_Adapter.ttcn @@ -15,6 +15,7 @@ import from HTTPmsg_Types all; import from HTTPmsg_PortType all; +import from Native_Functions all; type component http_CT { port HTTPmsg_PT HTTP; @@ -37,24 +38,65 @@ } template (value) Close ts_HTTP_Close := { client_id := omit }; -template (value) HeaderLines ts_HTTP_Header(charstring body, charstring host) := { - { header_name := "Host", header_value := host }, - { header_name := "Content-Type", header_value := "application/json" }, - { header_name := "Content-Length", header_value := int2str(lengthof(body)) } +/* function to add HeaderLines to a an existing set of HeaderLines. HeaderLines that are already present, are updated. */ +function f_overlay_HTTP_Header(HeaderLines hdr, HeaderLines additional_hdr) return template (value) HeaderLines +{ + var integer i; + var integer k; + var boolean updated; + + for (i := 0; i < lengthof(additional_hdr); i := i+1) { + updated := false; + for (k := 0; k < lengthof(hdr); k := k+1) { + if (f_str_tolower(hdr[k].header_name) == f_str_tolower(additional_hdr[i].header_name)) { + hdr[k] := additional_hdr[i]; + updated := true; + } + } + if (updated == false) { + hdr := hdr & { additional_hdr[i] }; + } + } + + return hdr; +} + +template (value) HeaderLine ts_HeaderLine(charstring header_name, charstring header_value) := { + header_name := header_name, + header_value := header_value +} + +function f_ts_HTTP_Header(template (omit) charstring body := omit, + template (omit) charstring host := omit, + HeaderLines custom_hdr := { }) +return template (value) HeaderLines { + var HeaderLines hdr := { }; + + /* Build default header */ + if (not istemplatekind(host, "omit")) { + hdr := hdr & {valueof(ts_HeaderLine("Host", valueof(host)))}; + } + hdr := hdr & {{ header_name := "Content-Type", header_value := "application/json" }}; + if (not istemplatekind(body, "omit")) { + hdr := hdr & {valueof(ts_HeaderLine("Content-Length", int2str(lengthof(body))))}; + } + + return f_overlay_HTTP_Header(hdr, custom_hdr); } template (value) HTTPMessage ts_HTTP_Req(charstring url, charstring method := "GET", charstring body := "", integer v_maj := 1, integer v_min := 1, - charstring host) := { + charstring host, + HeaderLines custom_hdr := { }) := { request := { client_id := omit, method := method, uri := url, version_major := v_maj, version_minor := v_min, - header := valueof(ts_HTTP_Header(body, host)), + header := valueof(f_ts_HTTP_Header(body, host, custom_hdr)), body := body } } @@ -73,11 +115,12 @@ template HTTPMessage tr_HTTP_Resp2xx := tr_HTTP_Resp((200..299)); -function f_http_tx_request(charstring url, charstring method := "GET", charstring body := "") +function f_http_tx_request(charstring url, charstring method := "GET", charstring body := "", + HeaderLines custom_hdr := { }) runs on http_CT { HTTP.send(ts_HTTP_Connect(g_http_host, g_http_port)); HTTP.receive(Connect_result:?); - HTTP.send(ts_HTTP_Req(url, method, body, host := g_http_host & ":" & int2str(g_http_port))); + HTTP.send(ts_HTTP_Req(url, method, body, host := g_http_host & ":" & int2str(g_http_port), custom_hdr := custom_hdr)); } function f_http_rx_response(template HTTPMessage exp := tr_HTTP_Resp2xx, float tout := 2.0) @@ -104,9 +147,9 @@ /* run a HTTP request and return the response */ function f_http_transact(charstring url, charstring method := "GET", charstring body := "", template HTTPMessage exp := tr_HTTP_Resp2xx, - float tout := 2.0) + float tout := 2.0, HeaderLines custom_hdr := { }) runs on http_CT return HTTPMessage { - f_http_tx_request(url, method, body); + f_http_tx_request(url, method, body, custom_hdr); return f_http_rx_response(exp, tout); } -- 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: 5 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: HTTP_Adapter: put HTTP config options into a record
by laforge 24 Apr '24

24 Apr '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36603?usp=email ) ( 6 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )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, 36 insertions(+), 9 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/cbc/CBC_Tests.ttcn b/cbc/CBC_Tests.ttcn index 2f1ad7f..57f4d9e 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_Params http_adapter_pars; + http_adapter_pars := { + http_host := mp_cbc_host, + http_port := mp_cbc_ecbe_port + }; + f_http_init(http_adapter_pars); 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 9ad1e4a..c06aa38 100644 --- a/library/HTTP_Adapter.ttcn +++ b/library/HTTP_Adapter.ttcn @@ -19,14 +19,17 @@ type component http_CT { port HTTPmsg_PT HTTP; - var charstring g_http_host; - var integer g_http_port; + var HTTP_Adapter_Params g_pars; }; -function f_http_init(charstring host, integer http_port) runs on http_CT { +type record HTTP_Adapter_Params { + charstring http_host, + integer http_port +}; + +function f_http_init(HTTP_Adapter_Params pars) runs on http_CT { map(self:HTTP, system:HTTP); - g_http_host := host; - g_http_port := http_port; + g_pars := pars; } template (value) Connect ts_HTTP_Connect(template (value) charstring hostname, @@ -125,9 +128,9 @@ function f_http_tx_request(charstring url, charstring method := "GET", template charstring body := omit, HeaderLines custom_hdr := { }) runs on http_CT { - HTTP.send(ts_HTTP_Connect(g_http_host, g_http_port)); + HTTP.send(ts_HTTP_Connect(g_pars.http_host, g_pars.http_port)); HTTP.receive(Connect_result:?); - HTTP.send(ts_HTTP_Req(url, method, body, host := g_http_host & ":" & int2str(g_http_port), custom_hdr := custom_hdr)); + HTTP.send(ts_HTTP_Req(url, method, body, host := g_pars.http_host & ":" & int2str(g_pars.http_port), custom_hdr := custom_hdr)); } function f_http_rx_response(template HTTPMessage exp := tr_HTTP_Resp2xx, float tout := 2.0) diff --git a/remsim/RemsimServer_Tests.ttcn b/remsim/RemsimServer_Tests.ttcn index 6d2b27d..94529b2 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_Params http_adapter_pars; + http_adapter_pars := { + http_host := mp_server_ip, + http_port := mp_rsres_port + }; + f_http_init(http_adapter_pars); 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: 7 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: HTTP_Adapter: allow body to be "omit"
by laforge 24 Apr '24

24 Apr '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36505?usp=email ) ( 5 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: HTTP_Adapter: allow body to be "omit" ...................................................................... HTTP_Adapter: allow body to be "omit" In HTTP not all requests have a body. At the moment we describe a missing body with body := "". This is not 100% correct since the rest of the code interprets this as a present body with zero length and will put a content_length = 0 header line into the HTTP header, even in the GET request. This will most likely be ignored by any HTTP server, but it is still not 100% spec compliant. Related: SYS#6824 Change-Id: Ifedc8c2a590835663d1ba0b08b1fe4d54bdd0fff --- M library/HTTP_Adapter.ttcn 1 file changed, 29 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/library/HTTP_Adapter.ttcn b/library/HTTP_Adapter.ttcn index b302a80..9ad1e4a 100644 --- a/library/HTTP_Adapter.ttcn +++ b/library/HTTP_Adapter.ttcn @@ -84,9 +84,16 @@ return f_overlay_HTTP_Header(hdr, custom_hdr); } +function f_ts_body_or_empty(template (omit) charstring body) return template (value) charstring { + if (istemplatekind(body, "omit")) { + return ""; + } + return body; +} + template (value) HTTPMessage ts_HTTP_Req(charstring url, charstring method := "GET", - charstring body := "", + template (omit) charstring body := omit, integer v_maj := 1, integer v_min := 1, charstring host, HeaderLines custom_hdr := { }) := { @@ -96,8 +103,8 @@ uri := url, version_major := v_maj, version_minor := v_min, - header := valueof(f_ts_HTTP_Header(body, host, custom_hdr)), - body := body + header := f_ts_HTTP_Header(body, host, custom_hdr), + body := f_ts_body_or_empty(body) } } @@ -115,7 +122,7 @@ template HTTPMessage tr_HTTP_Resp2xx := tr_HTTP_Resp((200..299)); -function f_http_tx_request(charstring url, charstring method := "GET", charstring body := "", +function f_http_tx_request(charstring url, charstring method := "GET", template charstring body := omit, HeaderLines custom_hdr := { }) runs on http_CT { HTTP.send(ts_HTTP_Connect(g_http_host, g_http_port)); @@ -146,7 +153,7 @@ /* run a HTTP request and return the response */ function f_http_transact(charstring url, charstring method := "GET", - charstring body := "", template HTTPMessage exp := tr_HTTP_Resp2xx, + template (omit) charstring body := omit, template HTTPMessage exp := tr_HTTP_Resp2xx, float tout := 2.0, HeaderLines custom_hdr := { }) runs on http_CT return HTTPMessage { f_http_tx_request(url, method, body, custom_hdr); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36505?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: Ifedc8c2a590835663d1ba0b08b1fe4d54bdd0fff Gerrit-Change-Number: 36505 Gerrit-PatchSet: 6 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: HTTP_Adapter: allow API users to specifiy custom header
by laforge 24 Apr '24

24 Apr '24
Attention is currently required from: dexter. laforge 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 5: Code-Review+2 -- 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: 5 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Wed, 24 Apr 2024 17:18:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: HTTP_Adapter: allow API users to specifiy custom header
by laforge 24 Apr '24

24 Apr '24
Attention is currently required from: dexter. laforge 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 5: Code-Review+1 -- 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: 5 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Wed, 24 Apr 2024 17:18:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-cbc[master]: .deb/.rpm: add osmocom user during package install
by laforge 24 Apr '24

24 Apr '24
Attention is currently required from: msuraev, osmith. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-cbc/+/29717?usp=email ) Change subject: .deb/.rpm: add osmocom user during package install ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/29717?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-cbc Gerrit-Branch: master Gerrit-Change-Id: Ifcc882125a22d8f2e1bfcd19622aed4e8a723e6c Gerrit-Change-Number: 29717 Gerrit-PatchSet: 3 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Wed, 24 Apr 2024 17:17:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • ...
  • 113
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.