pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/41505?usp=email )
Change subject: xua_rkm: remove unneeded check rkm_dyn_allocated
......................................................................
xua_rkm: remove unneeded check rkm_dyn_allocated
This is always true, as per checks done further above in the same
function.
Change-Id: I2977ddd4aa476172e61b76f7a6501f0af9d25062
---
M src/xua_rkm.c
1 file changed, 4 insertions(+), 7 deletions(-)
Approvals:
laforge: Looks good to me, approved
daniel: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/src/xua_rkm.c b/src/xua_rkm.c
index 44a0eb3..d88fda7 100644
--- a/src/xua_rkm.c
+++ b/src/xua_rkm.c
@@ -428,13 +428,10 @@
* we should refuse RKM DEREG if the ASP is still ACTIVE */
osmo_fsm_inst_dispatch(as->fi, XUA_ASPAS_ASP_DOWN_IND, asp);
- /* if we were dynamically allocated, release the associated
- * route and destroy the AS */
- if (as->rkm_dyn_allocated) {
- /* remove route + AS definition */
- ss7_route_destroy(rt);
- osmo_ss7_as_destroy(as);
- }
+ /* Release the associated route and destroy the dynamically allocated AS */
+ ss7_route_destroy(rt);
+ osmo_ss7_as_destroy(as);
+
/* report success */
msgb_append_dereg_res(resp, M3UA_RKM_DEREG_SUCCESS, rctx);
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/41505?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I2977ddd4aa476172e61b76f7a6501f0af9d25062
Gerrit-Change-Number: 41505
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: dexter.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/41508?usp=email
to look at the new patch set (#4).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: card_key_provider: add PostgreSQL support
......................................................................
card_key_provider: add PostgreSQL support
The Card Key Provider currently only has support for CSV files
as input. Unfortunately using CSV files does not scale very well
when the card inventory is very large and continously updated.
In this case a centralized storage in the form of a database
is the more suitable approach.
This patch adds a PostgreSQL support next to the existing CSV
file support. It also adds an importer tool to import existing
CSV files into the database.
Change-Id: Icba625c02a60d7e1f519b506a46bda5ded0537d3
Related: SYS#7725
---
M README.md
A contrib/csv-to-pgsql.py
M docs/card-key-provider.rst
M pySim-shell.py
M pySim/card_key_provider.py
M requirements.txt
M setup.py
7 files changed, 592 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/08/41508/4
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41508?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: Icba625c02a60d7e1f519b506a46bda5ded0537d3
Gerrit-Change-Number: 41508
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Attention is currently required from: dexter.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/41508?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: card_key_provider: add PostgreSQL support
......................................................................
card_key_provider: add PostgreSQL support
The Card Key Provider currently only has support for CSV files
as input. Unfortunately using CSV files does not scale very well
when the card inventory is very large and continously updated.
In this case a centralized storage in the form of a database
is the more suitable approach.
This patch adds a PostgreSQL support next to the existing CSV
file support. It also adds an importer tool to import existing
CSV files into the database.
Change-Id: Icba625c02a60d7e1f519b506a46bda5ded0537d3
Related: SYS#7725
---
M README.md
A contrib/csv-to-pgsql.py
M docs/card-key-provider.rst
M pySim-shell.py
M pySim/card_key_provider.py
M requirements.txt
M setup.py
7 files changed, 592 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/08/41508/3
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41508?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: Icba625c02a60d7e1f519b506a46bda5ded0537d3
Gerrit-Change-Number: 41508
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Attention is currently required from: dexter.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/41508?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: card_key_provider: add PostgreSQL support
......................................................................
card_key_provider: add PostgreSQL support
The Card Key Provider currently only has support for CSV files
as input. Unfortunately using CSV files does not scale very well
when the card inventory is very large and continously updated.
In this case a centralized storage in the form of a database
is the more suitable approach.
This patch adds a PostgreSQL support next to the existing CSV
file support. It also adds an importer tool to import existing
CSV files into the database.
Change-Id: Icba625c02a60d7e1f519b506a46bda5ded0537d3
Related: SYS#7725
---
A contrib/csv-to-pgsql.py
M docs/card-key-provider.rst
M pySim-shell.py
M pySim/card_key_provider.py
4 files changed, 589 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/08/41508/2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41508?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: Icba625c02a60d7e1f519b506a46bda5ded0537d3
Gerrit-Change-Number: 41508
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Attention is currently required from: daniel, fixeria, laforge, pespin.
osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-dev/+/41496?usp=email )
Change subject: all.desp: libosmo-sigtran depends on libosmo-asn1-tcap
......................................................................
Patch Set 1:
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/osmo-dev/+/41496/comment/71f558d1_08743ed9?usp… :
PS1, Line 9: --enable-tcap-loadsharing
> Is that going to be picked up by osmo-ttcn3-hacks. […]
You would need to add it to https://gitea.osmocom.org/ttcn3/osmo-ttcn3-hacks/src/commit/acd272346c99da2…, then yes (alternative to https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41497).
Having the opts file would have the advantage that other users of osmo-dev could also enable the option easily (on the other hand, we could also add that file there later on if somebody needs it).
--
To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/41496?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: Ibc51a818b859d40ab8a34d9299d0f955cf6d966e
Gerrit-Change-Number: 41496
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: osmith <osmith(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-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 26 Nov 2025 07:11:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/41481?usp=email )
Change subject: card_key_provider: refactor code and optimize out get_field method
......................................................................
card_key_provider: refactor code and optimize out get_field method
The method get_field in the base class can be optimized out. This
also allows us to remove code dup in the card_key_provider_get_field
function.
Let's also fix the return code behavior. A get method in a
CardKeyProvider implementation should always return None in case
nothing is found. Also it should not crash in that case. This will
allow the card_key_provider_get function to move on to the next
CardKeyProvider. In case no CardKeyProvider yields any results, an
exception is appropriate since it is pointless to continue execution
with "None" as key material.
To make the debugging of problems easier, let's also print some debug
messages that inform the user what key/value pair and which
CardKeyProvider was queried. This will make it easier to investigate
in case an expected result was not found.
Related: SYS#7725
Change-Id: I4d6367b8eb057e7b2c06c8625094d8a1e4c8eef9
---
M pySim/card_key_provider.py
1 file changed, 26 insertions(+), 25 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/pySim/card_key_provider.py b/pySim/card_key_provider.py
index cdd871f..494eed2 100644
--- a/pySim/card_key_provider.py
+++ b/pySim/card_key_provider.py
@@ -132,24 +132,24 @@
class CardKeyProvider(abc.ABC):
"""Base class, not containing any concrete implementation."""
- def get_field(self, field: str, key: str = 'ICCID', value: str = "") -> Optional[str]:
- """get a single field from CSV file using a specified key/value pair"""
- fields = [field]
- result = self.get(fields, key, value)
- return result.get(field)
-
@abc.abstractmethod
def get(self, fields: List[str], key: str, value: str) -> Dict[str, str]:
- """Get multiple card-individual fields for identified card.
+ """
+ Get multiple card-individual fields for identified card. This method should not fail with an exception in
+ case the entry, columns or even the key column itsself is not found.
Args:
fields : list of valid field names such as 'ADM1', 'PIN1', ... which are to be obtained
key : look-up key to identify card data, such as 'ICCID'
value : value for look-up key to identify card data
Returns:
- dictionary of {field, value} strings for each requested field from 'fields'
+ dictionary of {field : value, ...} strings for each requested field from 'fields'. In case nothing is
+ fond None shall be returned.
"""
+ def __str__(self):
+ return type(self).__name__
+
class CardKeyProviderCsv(CardKeyProvider):
"""Card key provider implementation that allows to query against a specified CSV file."""
@@ -172,15 +172,20 @@
raise RuntimeError("Could not open DictReader for CSV-File '%s'" % self.csv_filename)
cr.fieldnames = [field.upper() for field in cr.fieldnames]
- rc = {}
+ if key not in cr.fieldnames:
+ return None
+ return_dict = {}
for row in cr:
if row[key] == value:
for f in fields:
if f in row:
- rc.update({f: self.crypt.decrypt_field(f, row[f])})
+ return_dict.update({f: self.crypt.decrypt_field(f, row[f])})
else:
raise RuntimeError("CSV-File '%s' lacks column '%s'" % (self.csv_filename, f))
- return rc
+ if return_dict == {}:
+ return None
+ return return_dict
+
def card_key_provider_register(provider: CardKeyProvider, provider_list=card_key_providers):
@@ -210,15 +215,17 @@
fields = [f.upper() for f in fields]
for p in provider_list:
if not isinstance(p, CardKeyProvider):
- raise ValueError(
- "provider list contains element which is not a card data provider")
+ raise ValueError("Provider list contains element which is not a card data provider")
+ log.debug("Searching for card key data (key=%s, value=%s, provider=%s)" % (key, value, str(p)))
result = p.get(fields, key, value)
if result:
+ log.debug("Found card data: %s" % (str(result)))
return result
- return {}
+
+ raise ValueError("Unable to find card key data (key=%s, value=%s, fields=%s)" % (key, value, str(fields)))
-def card_key_provider_get_field(field: str, key: str, value: str, provider_list=card_key_providers) -> Optional[str]:
+def card_key_provider_get_field(field: str, key: str, value: str, provider_list=card_key_providers) -> str:
"""Query all registered card data providers for a single field.
Args:
@@ -229,13 +236,7 @@
Returns:
dictionary of {field, value} strings for the requested field
"""
- key = key.upper()
- field = field.upper()
- for p in provider_list:
- if not isinstance(p, CardKeyProvider):
- raise ValueError(
- "provider list contains element which is not a card data provider")
- result = p.get_field(field, key, value)
- if result:
- return result
- return None
+
+ fields = [field]
+ result = card_key_provider_get(fields, key, value, card_key_providers)
+ return result.get(field.upper())
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41481?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I4d6367b8eb057e7b2c06c8625094d8a1e4c8eef9
Gerrit-Change-Number: 41481
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/41507?usp=email )
Change subject: docs/conf.py: update copyright year
......................................................................
docs/conf.py: update copyright year
The copyright year of the docs is still at 2023, let's update it
to the current year.
Change-Id: Icf64670847d090a250f732d94d18e780e483239b
---
M docs/conf.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/docs/conf.py b/docs/conf.py
index 9091878..ef40070 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -18,7 +18,7 @@
# -- Project information -----------------------------------------------------
project = 'osmopysim-usermanual'
-copyright = '2009-2023 by Sylvain Munaut, Harald Welte, Philipp Maier, Supreeth Herle, Merlin Chlosta'
+copyright = '2009-2025 by Sylvain Munaut, Harald Welte, Philipp Maier, Supreeth Herle, Merlin Chlosta'
author = 'Sylvain Munaut, Harald Welte, Philipp Maier, Supreeth Herle, Merlin Chlosta'
# PDF: Avoid that the authors list exceeds the page by inserting '\and'
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41507?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Icf64670847d090a250f732d94d18e780e483239b
Gerrit-Change-Number: 41507
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>