laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37832?usp=email )
Change subject: pySim.filesystem: Permit Path object construction from FID integer list
......................................................................
pySim.filesystem: Permit Path object construction from FID integer list
we so far supported construction of the Path object from a string or
a list of strings. Let's also add the option of constructing it from a
path consisting of a list of integer FID values.
Change-Id: Ia7e9375b3258d1fbfdc892cefba3e3bbe841c550
---
M pySim/filesystem.py
1 file changed, 4 insertions(+), 2 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/pySim/filesystem.py b/pySim/filesystem.py
index 624619b..805983b 100644
--- a/pySim/filesystem.py
+++ b/pySim/filesystem.py
@@ -1481,10 +1481,12 @@
class Path:
"""Representation of a file-system path."""
- def __init__(self, p: Union[str, List[str]]):
+ def __init__(self, p: Union[str, List[str], List[int]]):
# split if given as single string with slahes
if isinstance(p, str):
p = p.split('/')
+ elif len(p) and isinstance(p[0], int):
+ p = ['%04x' % x for x in p]
# make sure internal representation alwas is uppercase only
self.list = [x.upper() for x in p]
@@ -1514,7 +1516,7 @@
def relative_to_mf(self) -> 'Path':
"""Return a path relative to MF, i.e. without initial explicit MF."""
- if self.list[0] == 'MF':
+ if len(self.list) and self.list[0] in ['MF', '3F00']:
return Path(self.list[1:])
return self
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37832?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: Ia7e9375b3258d1fbfdc892cefba3e3bbe841c550
Gerrit-Change-Number: 37832
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37833?usp=email )
Change subject: saip-tool: Set default log level to INFO (instead of DEBUG)
......................................................................
saip-tool: Set default log level to INFO (instead of DEBUG)
most users don't want to debug the program.
Change-Id: I54ae558cf8d87bf64cc75431cc4edcc694fa9084
---
M contrib/saip-tool.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/contrib/saip-tool.py b/contrib/saip-tool.py
index d9d33c0..22b913e 100755
--- a/contrib/saip-tool.py
+++ b/contrib/saip-tool.py
@@ -31,7 +31,7 @@
pp = HexBytesPrettyPrinter(indent=4,width=500)
-logging.basicConfig(level=logging.DEBUG)
+logging.basicConfig(level=logging.INFO)
parser = argparse.ArgumentParser(description="""
Utility program to work with eSIM SAIP (SimAlliance Interoperable Profile) files.""")
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37833?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: I54ae558cf8d87bf64cc75431cc4edcc694fa9084
Gerrit-Change-Number: 37833
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37834?usp=email )
Change subject: pySim.esim.saip.oid: Allow OID instance in prefix_match()
......................................................................
pySim.esim.saip.oid: Allow OID instance in prefix_match()
So far the prefix_match() required a string argument; let's also
permit another OID object to be passed; we internally convert that
to string.
Change-Id: I0feb7782d1813cc46ec78f170eb0fce804aebe3a
---
M pySim/esim/saip/oid.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/pySim/esim/saip/oid.py b/pySim/esim/saip/oid.py
index f201ffe..02ef23b 100644
--- a/pySim/esim/saip/oid.py
+++ b/pySim/esim/saip/oid.py
@@ -77,9 +77,9 @@
if self.cmp(other) > 0:
return True
- def prefix_match(self, oid_str):
+ def prefix_match(self, oid_str: Union[str, 'OID']):
"""determine if oid_str is equal or below our OID."""
- return oid_str.startswith(str(self))
+ return str(oid_str).startswith(str(self))
class eOID(OID):
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37834?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: I0feb7782d1813cc46ec78f170eb0fce804aebe3a
Gerrit-Change-Number: 37834
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Attention is currently required from: neels.
laforge has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/osmo-upf/+/37830?usp=email )
Change subject: add VTY 'gtp-echo' command
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
File src/osmo-upf/upf_gtpu_echo.c:
https://gerrit.osmocom.org/c/osmo-upf/+/37830/comment/bc291ff2_34eb2e44?usp… :
PS1, Line 151: rc = sendto(dev->gtpv1.ofd.fd, msgbuf, GTP_ECHO_REQ_SIZE, 0, &remote->u.sa, sizeof(*remote));
this is introducing even more direct socket interaction without going through osmo_io. One can of course do that, but all of this code IMHO is lacking the use of abstractions. Why don't we have separate functions to encode/decode GTP-U packets, including the IEs? Why are we having low-level code to puzzle together a message header bit by bit and calling sendto in the same function? We're not using msgb, not osmo_io, and neither some kind of gtp-u custom abstraction. Yes, one can do all that, and it will work. but for osmo-*, it's unusual, IMHO. We usually build infrastructure/abstraction and then use that.
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/37830?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I970dccd7a27b098eea9e660822e24e2c4b059fc6
Gerrit-Change-Number: 37830
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 17 Aug 2024 05:16:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes