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
[M] Change in osmo-ttcn3-hacks[master]: asterisk: Use Titan TEXT encoder to implement AMI record enc/dec
by pespin 19 Apr '24

19 Apr '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36610?usp=email ) Change subject: asterisk: Use Titan TEXT encoder to implement AMI record enc/dec ...................................................................... asterisk: Use Titan TEXT encoder to implement AMI record enc/dec f_ami_wait_for_prompt_str had to be fixed since it was returning content like this: "Response: Success\nMessage: Authentication accepted" Instead, the TEXT encoding expects: "Response: Success\nMessage: Authentication accepted\n" which is actually more in line with proper expectancies. Change-Id: If179e45307a7e42b81b28db6ee4b7bf5eeb8b5f1 --- M asterisk/AMI_Functions.ttcn 1 file changed, 34 insertions(+), 48 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/10/36610/1 diff --git a/asterisk/AMI_Functions.ttcn b/asterisk/AMI_Functions.ttcn index 53a7964..d5139f5 100644 --- a/asterisk/AMI_Functions.ttcn +++ b/asterisk/AMI_Functions.ttcn @@ -32,8 +32,21 @@ type record AMI_Field { charstring key, charstring val +} with { + encode "TEXT" + variant "SEPARATOR(': ', ':\s+')" }; -type set of AMI_Field AMI_Msg; + +type set of AMI_Field AMI_Msg with { + encode "TEXT" + variant "SEPARATOR('\r\n', '(\r\n)|[\n]')" + variant "END('\r\n', '(\r\n)|[\n]')" +}; + +external function enc_AMI_Msg(in AMI_Msg msg) return charstring + with { extension "prototype(convert) encode(TEXT)" } +external function dec_AMI_Msg(in charstring stream) return AMI_Msg + with { extension "prototype(convert) decode(TEXT)" } template (value) AMI_Field ts_AMI_Field(template (value) charstring key, @@ -102,49 +115,6 @@ * Functions: */ -function f_AMI_Field_from_str(charstring str) return AMI_Field { - var AMI_Field field; - /* "each field is a key value pair delineated by a ':'. - * A single space MUST follow the ':' and precede the value. "*/ - var integer pos := f_strstr(str, ": ", 0); - if (pos < 0) { - Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, - log2str("Failed parsing AMI_Field: ", str)); - } - field.key := substr(str, 0, pos); - /* skip ": " */ - pos := pos + 2; - field.val := substr(str, pos, lengthof(str) - pos); - return field; -} - -function f_AMI_Msg_from_str(charstring str) return AMI_Msg { - var AMI_Msg msg := {}; - var Misc_Helpers.ro_charstring lines := f_str_split(str, "\n"); - - for (var integer i := 0; i < lengthof(lines); i := i + 1) { - var charstring line := lines[i]; - var AMI_Field field := f_AMI_Field_from_str(lines[i]); - msg := msg & { field }; - } - return msg; -} - -function f_AMI_Field_to_str(AMI_Field field) return charstring { - return field.key & ": " & field.val; -} - -function f_AMI_Msg_to_str(AMI_Msg msg) return charstring { - var charstring str := ""; - - for (var integer i := 0; i < lengthof(msg); i := i + 1) { - str := str & f_AMI_Field_to_str(msg[i]) & "\r\n"; - } - - str := str & "\r\n"; - return str; -} - private function f_ami_wait_for_prompt_str(TELNETasp_PT pt, charstring log_label := "(?)") return charstring { var charstring rx, buf := ""; @@ -153,7 +123,7 @@ T.start(mp_ami_prompt_timeout); alt { - [] pt.receive(pattern "\n") { }; + [] pt.receive(pattern "\n") { buf := buf & "\n" }; [] pt.receive(charstring:?) -> value rx { buf := buf & rx; repeat }; [] pt.receive(integer:?) -> value fd { if (fd == -1) { @@ -174,7 +144,7 @@ function f_ami_wait_for_prompt(TELNETasp_PT pt, charstring log_label := "(?)") return AMI_Msg { var charstring buf := f_ami_wait_for_prompt_str(pt, log_label); - var AMI_Msg msg := f_AMI_Msg_from_str(buf); + var AMI_Msg msg := dec_AMI_Msg(buf); return msg; } @@ -185,9 +155,9 @@ } function f_ami_transceive_ret(TELNETasp_PT pt, template (value) AMI_Msg tx_msg) return AMI_Msg { - var charstring tx_txt := f_AMI_Msg_to_str(valueof(tx_msg)); + var charstring tx_txt := enc_AMI_Msg(valueof(tx_msg)); var charstring resp_txt := f_ami_transceive_ret_str(pt, tx_txt); - return f_AMI_Msg_from_str(resp_txt); + return dec_AMI_Msg(resp_txt); } function f_ami_transceive_match(TELNETasp_PT pt, -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36610?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: If179e45307a7e42b81b28db6ee4b7bf5eeb8b5f1 Gerrit-Change-Number: 36610 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[XL] Change in osmo-ttcn3-hacks[master]: IPAd_Tests: add testsuite for an IPAd
by pespin 19 Apr '24

19 Apr '24
Attention is currently required from: dexter, fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36229?usp=email ) Change subject: IPAd_Tests: add testsuite for an IPAd ...................................................................... Patch Set 3: (1 comment) File ipad/IPAd_Tests.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36229/comment/7d086b52_f220… PS1, Line 445: for (i := 0; i < sizeof(esipa_res.getBoundProfilePackageResponseEsipa.getBoundProfilePackageOkEsipa.boundProfilePackage.firstSequenceOf87); i := i + 1) { > I do not know if this looks much nicer ;-/ […] lol. But at least you have it once, not 6 times. So your eyes only need to do the large line parsing once. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36229?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: Ic9ea8c69e56a2e8ddf0f506861ece6d40cbcb06d Gerrit-Change-Number: 36229 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Fri, 19 Apr 2024 14:09:23 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: SGP32Definitions_Templates: add new set of templates to support rollback
by pespin 19 Apr '24

19 Apr '24
Attention is currently required from: dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36609?usp=email ) Change subject: SGP32Definitions_Templates: add new set of templates to support rollback ...................................................................... Patch Set 1: Code-Review+1 (1 comment) Patchset: PS1: I wonder why do we need one encoding function for each message. Couldn't we have a generic "message" structure/union holding all the others, and then have 1 enc and 1 dec functions? That's how most of the other procols work usually. -- 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: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Fri, 19 Apr 2024 14:07:01 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: SGP32Definitions_Templates: add template tr_provideEimPackageResult_e...
by pespin 19 Apr '24

19 Apr '24
Attention is currently required from: dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36608?usp=email ) Change subject: SGP32Definitions_Templates: add template tr_provideEimPackageResult_ePRAndNotif ...................................................................... Patch Set 1: Code-Review+1 -- 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: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Fri, 19 Apr 2024 14:05:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: SGP32Definitions_Templates: rename tx_provideEimPackageResultResponse
by pespin 19 Apr '24

19 Apr '24
Attention is currently required from: dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36607?usp=email ) Change subject: SGP32Definitions_Templates: rename tx_provideEimPackageResultResponse ...................................................................... Patch Set 1: Code-Review+1 -- 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: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Fri, 19 Apr 2024 14:05:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: SGP32Definitions_Templates: use enable instead of configureAutoEnable...
by pespin 19 Apr '24

19 Apr '24
Attention is currently required from: dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36606?usp=email ) Change subject: SGP32Definitions_Templates: use enable instead of configureAutoEnable PSMO ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36606?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: Ia364d5f6d510545988dc88cacdd15a2c03cc5d8b Gerrit-Change-Number: 36606 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Fri, 19 Apr 2024 14:05:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: SGP32Definitions_Templates: remove unrelated template parameter
by pespin 19 Apr '24

19 Apr '24
Attention is currently required from: dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36605?usp=email ) Change subject: SGP32Definitions_Templates: remove unrelated template parameter ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36605?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: I365fe15a22a98ced5c6a5d13b2700df1df13014b Gerrit-Change-Number: 36605 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Fri, 19 Apr 2024 14:04:48 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: SGP32Definitions_Templates: add missing new line at the endo of file
by pespin 19 Apr '24

19 Apr '24
Attention is currently required from: dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36604?usp=email ) Change subject: SGP32Definitions_Templates: add missing new line at the endo of file ...................................................................... Patch Set 1: (1 comment) Commit Message: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36604/comment/365a9afe_6238… PS1, Line 7: SGP32Definitions_Templates: add missing new line at the endo of file endo of -- 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-Reviewer: Jenkins Builder Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Fri, 19 Apr 2024 14:04:35 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: HTTP_Adapter: Allow API users to enable/disable SSL
by pespin 19 Apr '24

19 Apr '24
Attention is currently required from: dexter, laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36506?usp=email ) Change subject: HTTP_Adapter: Allow API users to enable/disable SSL ...................................................................... Patch Set 2: (1 comment) File library/HTTP_Adapter.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36506/comment/b629870e_d6e2… PS1, Line 27: function f_http_init(charstring host, integer http_port, boolean use_ssl := false) runs on http_CT { > Yes, we should do this rather sooner than later. […] For the sake of having it similar to other testsuites, usually we call these "HTTP_Adapter_Params" and call it "pars", then have a "g_pars := pars" in f_http_init() so you don't need to assign params one by one like you so in line 35. Then, use eg. "g_pars.use_ssl" -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36506?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: I6487deea50cd9b4ed4905d9a3a78e00def8ea319 Gerrit-Change-Number: 36506 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Fri, 19 Apr 2024 14:04:20 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: HTTP_Adapter: allow body to be "omit"
by pespin 19 Apr '24

19 Apr '24
Attention is currently required from: dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36505?usp=email ) Change subject: HTTP_Adapter: allow body to be "omit" ...................................................................... Patch Set 2: (2 comments) File library/HTTP_Adapter.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36505/comment/cd661cf5_aab3… PS1, Line 85: msg.request := { > I am not agreeing here. […] why can't you just do something like: function f_ts_body_or_empty(template (omit) body) return template (value) charstring { if (istemplatekind(body, "omit") { return ""; } return body } template (value) HTTPMessage ts_HTTP_Req(charstring url, charstring method := "GET", template charstring body := omit, integer v_maj := 1, integer v_min := 1, charstring host, HeaderLines custom_hdr := { }) := { .request := { client_id := omit, method := method, uri := url, version_major := v_maj, version_minor := v_min, header := valueof(f_ts_HTTP_Header(body, host, custom_hdr)) body := f_ts_body_or_empty(body) } } Btw, I wonder why can't just also just pass a "body := omit" to it? What's wrong with that? File library/HTTP_Adapter.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36505/comment/9db23800_6828… PS2, Line 100: if (ispresent(body)) { I'm not that sure this ispresent(body) directly on a variable is what you are actually want. Did you validate it? You may need istemplatekind("omit")? You are also already using templatekind for the same stuff way up in the file. -- 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: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Fri, 19 Apr 2024 14:02:14 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • ...
  • 113
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.