dexter has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/pysim/+/42043?usp=email )
Change subject: esim/http_json_api: add alternative API interface
......................................................................
esim/http_json_api: add alternative API interface
unfortunately the API changes introduced in change
I277aa90fddb5171c4bf6c3436259aa371d30d092
broke the API interface of http_json_api.py. This was taken into
account and necessary to introduce add the server functionality next
to the already existing client functionality. The changes to the API
were minimal and all code locations that use http_json_api.py
were re-aligned.
Unfortunately it was not clear at this point in time that there are
out-of-tree projects that could be affected by API changes in
http_json_api.py
To mitigate the problem this patch introduces an alternative API
interface to the JsonHttpApiFunction base class. This alternative
API interface works like the old API interface when the class is
instantiated in the original way. To make use of the revised client
the API use has to pass an additional keyword argument that defines
the role.
Related: SYS#7866
Change-Id: I2a5d4b59b12e08d5eae7a1215814d3a69c8921f6
---
M pySim/esim/http_json_api.py
1 file changed, 53 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/43/42043/2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42043?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I2a5d4b59b12e08d5eae7a1215814d3a69c8921f6
Gerrit-Change-Number: 42043
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-CC: Jenkins Builder
pespin has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42044?usp=email )
Change subject: cosmetic: xua_rkm: Improve description of adding ASP to AS
......................................................................
cosmetic: xua_rkm: Improve description of adding ASP to AS
Change-Id: I57c6a810e081b0968cf2dc24357214a4cebe533b
---
M src/xua_rkm.c
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/44/42044/2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42044?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I57c6a810e081b0968cf2dc24357214a4cebe533b
Gerrit-Change-Number: 42044
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-CC: Jenkins Builder
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42044?usp=email )
Change subject: cosmetic: xua_rkm: Improve description of adding ASP to AS
......................................................................
cosmetic: xua_rkm: Improve description of adding ASP to AS
Change-Id: I57c6a810e081b0968cf2dc24357214a4cebe533b
---
M src/xua_rkm.c
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/44/42044/1
diff --git a/src/xua_rkm.c b/src/xua_rkm.c
index cf4e508..d9b1b9d 100644
--- a/src/xua_rkm.c
+++ b/src/xua_rkm.c
@@ -308,7 +308,10 @@
}
}
- /* Success: Add just-create AS to connected ASP + report success */
+ /* Make sure ASP is associated to AS:
+ * - If AS was just created
+ * - If we just learned through RKM that this ASP is serving this AS (rctx)
+ */
if (ss7_as_add_asp(as, asp) < 0) {
LOGPASP(asp, DLSS7, LOGL_ERROR, "RKM: Cannot associate ASP to AS %s\n", as->cfg.name);
msgb_append_reg_res(resp, rk_id, M3UA_RKM_REG_ERR_INSUFF_RESRC, 0);
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42044?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I57c6a810e081b0968cf2dc24357214a4cebe533b
Gerrit-Change-Number: 42044
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Jenkins Builder has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/42043?usp=email )
Change subject: esim/http_json_api: add alternative API interface
......................................................................
Patch Set 1:
(1 comment)
File pySim/esim/http_json_api.py:
Robot Comment from checkpatch (run ID ):
https://gerrit.osmocom.org/c/pysim/+/42043/comment/5ba21b99_9ba959f4?usp=em… :
PS1, Line 233: # Depreacted: With the advent of the server role (JsonHttpApiServer) the API had to be changed. To maintain
'Depreacted' may be misspelled - perhaps 'Deprecated'?
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42043?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I2a5d4b59b12e08d5eae7a1215814d3a69c8921f6
Gerrit-Change-Number: 42043
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Wed, 04 Feb 2026 11:47:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/42043?usp=email )
Change subject: esim/http_json_api: add alternative API interface
......................................................................
esim/http_json_api: add alternative API interface
unfortunately the API changes introduced in change
I277aa90fddb5171c4bf6c3436259aa371d30d092
broke the API interface of http_json_api.py. This was taken into
account and necessary to introduce add the server functionality next
to the already existing client functionality. The changes to the API
were minimal and all code locations that use http_json_api.py
were re-aligned.
Unfortunately it was not clear at this point in time that there are
out-of-tree projects that could be affected by API changes in
http_json_api.py
To mitigate the problem this patch introduces an alternative API
interface to the JsonHttpApiFunction base class. This alternative
API interface works like the old API interface when the class is
instantiated in the original way. To make use of the revised client
the API use has to pass an additional keyword argument that defines
the role.
Related: SYS#7866
Change-Id: I2a5d4b59b12e08d5eae7a1215814d3a69c8921f6
---
M pySim/esim/http_json_api.py
1 file changed, 53 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/43/42043/1
diff --git a/pySim/esim/http_json_api.py b/pySim/esim/http_json_api.py
index 28022ff..d6b8433 100644
--- a/pySim/esim/http_json_api.py
+++ b/pySim/esim/http_json_api.py
@@ -19,6 +19,7 @@
import requests
import logging
import json
+from re import match
from typing import Optional
import base64
from twisted.web.server import Request
@@ -210,18 +211,67 @@
# additional custom HTTP headers (server responses)
extra_http_res_headers = {}
+ def __new__(cls, *args, role = None, **kwargs):
+ """
+ Args:
+ args: (see JsonHttpApiClient and JsonHttpApiServer)
+ role: role ('server' or 'client') in which the JsonHttpApiFunction should be created.
+ kwargs: (see JsonHttpApiClient and JsonHttpApiServer)
+ """
+
+ # Create a dictionary with the class attributes of this class (the properties listed above and the encode_
+ # decode_ methods below). The dictionary will not include any dunder/magic methods
+ cls_attr = { attr_name: getattr(cls, attr_name) for attr_name in dir(cls) if not match("__.*__", attr_name) }
+
+ # Normal instantiation as JsonHttpApiFunction:
+ if len(args) == 0:
+ return type(cls.__name__, (abc.ABC,), cls_attr)()
+
+ # Instantiation as as JsonHttpApiFunction with a JsonHttpApiClient or JsonHttpApiServer base
+ role = kwargs.get('role', 'legacy_client')
+ if role == 'legacy_client':
+ # Depreacted: With the advent of the server role (JsonHttpApiServer) the API had to be changed. To maintain
+ # compatibility with existing code (out-of-tree) the original behaviour and API interface and behaviour had
+ # to be preserved. Already existing JsonHttpApiFunction definitions will still work and the related objects
+ # may still be created on the original way: my_api_func = MyApiFunc(url_prefix, func_req_id, self.session)
+ print("I am a legacy client")
+ logger.warning('implicit role (falling back to legacy JsonHttpApiClient) is deprecated, please specify role explcitly')
+ result = type(cls.__name__, (JsonHttpApiClient,), cls_attr)(None, *args, **kwargs)
+ result.api_func = result
+ result.legacy = True
+ return result
+ elif role == 'client':
+ # Create a JsonHttpApiFunction in client role
+ # Example: my_api_func = MyApiFunc(url_prefix, func_req_id, self.session, role='client')
+ print("I am a client")
+ result = type(cls.__name__, (JsonHttpApiClient,), cls_attr)(None, *args, **kwargs)
+ result.api_func = result
+ return result
+ elif role == 'server':
+ # Create a JsonHttpApiFunction in server role
+ # Example: my_api_func = MyApiFunc(url_prefix, func_req_id, self.session, role='server')
+ print("I am a server")
+ result = type(cls.__name__, (JsonHttpApiServer,), cls_attr)(None, *args, **kwargs)
+ result.api_func = result
+ return result
+ else:
+ raise ValueError('Invalid role \'%s\' specified' % role)
+
def encode_client(self, data: dict) -> dict:
"""Validate an encode input dict into JSON-serializable dict for request body."""
output = {}
-
for p in self.input_mandatory:
if not p in data:
raise ValueError('Mandatory input parameter %s missing' % p)
for p, v in data.items():
p_class = self.input_params.get(p)
if not p_class:
- logger.warning('Unexpected/unsupported input parameter %s=%s', p, v)
- output[p] = v
+ if hasattr(self, 'legacy') and self.legacy is True:
+ logger.warning('implicit header-field definition is deprecated, defaulting to header-field should appear in input_params')
+ output[p] = JsonRequestHeader.encode(v)
+ else:
+ logger.warning('Unexpected/unsupported input parameter %s=%s', p, v)
+ output[p] = v
else:
output[p] = p_class.encode(v)
return output
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42043?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I2a5d4b59b12e08d5eae7a1215814d3a69c8921f6
Gerrit-Change-Number: 42043
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42041?usp=email )
Change subject: tcap: Log vty msg in CS7_ROLE_SG
......................................................................
tcap: Log vty msg in CS7_ROLE_SG
This code was placed in the wrong section, since tcap features can only
be enabled in SG mode (STP).
Change-Id: I77cf19bdc8fa29dd4a28773ac0f954850cd76e1b
---
M src/ss7_as_vty.c
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/41/42041/1
diff --git a/src/ss7_as_vty.c b/src/ss7_as_vty.c
index 2d919bb..80359aa 100644
--- a/src/ss7_as_vty.c
+++ b/src/ss7_as_vty.c
@@ -684,6 +684,7 @@
"'point-code override dpc PC' configured in its routing-key. Fix your config!%s",
as->cfg.name, VTY_NEWLINE);
}
+ } else {
#ifdef WITH_TCAP_LOADSHARING
if (as->cfg.loadshare.tcap.enabled && as->cfg.mode != OSMO_SS7_AS_TMOD_LOADSHARE)
vty_out(vty, "%% AS '%s' TCAP routing is enabled, but only works in traffic-mode loadshare!%s",
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42041?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I77cf19bdc8fa29dd4a28773ac0f954850cd76e1b
Gerrit-Change-Number: 42041
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Attention is currently required from: fixeria, laforge, neels, osmith, pespin.
Timur Davydov has posted comments on this change by Timur Davydov. ( https://gerrit.osmocom.org/c/libosmocore/+/41813?usp=email )
Change subject: Add Emscripten build support and JS callback logging backend
......................................................................
Patch Set 27:
(1 comment)
File src/core/logging_emscripten.c:
https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/dd6290f7_0641ea2e?… :
PS27, Line 49: rc = vsnprintf(msg, sizeof(msg), format, ap);
> BTW, you are losing context information here, like file&line. […]
Thanks for the suggestion.
In the web/Emscripten case the log output is primarily used in a Vue 3 component to give a high-level view of the current system state, not for detailed debugging. Because of that, file and line information is intentionally not exposed or consumed on the JS side.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41813?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ia8d5f4bb6570b5e055826f3a051e5e5896866e31
Gerrit-Change-Number: 41813
Gerrit-PatchSet: 27
Gerrit-Owner: Timur Davydov <dtv.comp(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 04 Feb 2026 11:31:25 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>