laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/37846?usp=email )
Change subject: pySim.esim.saip: Fix key used in FsProfileElement.files2pe
......................................................................
pySim.esim.saip: Fix key used in FsProfileElement.files2pe
The self.files member is a dict. Hence we should use those dict
keys when [re]building the decoded dict. The previous code ignored
it and re-constructed the key from File.pe_name - but that's not
always identical.
Change-Id: I0e6c97721fb1cfc6b5c21595d85bd374d485b573
---
M pySim/esim/saip/__init__.py
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/46/37846/1
diff --git a/pySim/esim/saip/__init__.py b/pySim/esim/saip/__init__.py
index c622314..7ee43f7 100644
--- a/pySim/esim/saip/__init__.py
+++ b/pySim/esim/saip/__init__.py
@@ -371,9 +371,9 @@
self.files[file.pe_name] = file
def files2pe(self):
- """Update the "decoded" member with the contents of the files member."""
- for f in self.files:
- self.decoded[f.pename] = f.to_tuples()
+ """Update the "decoded" member with the contents of the "files" member."""
+ for k, f in self.files.items():
+ self.decoded[k] = f.to_tuples()
def pe2files(self):
"""Update the "files" member with the contents of the "decoded" member."""
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37846?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: I0e6c97721fb1cfc6b5c21595d85bd374d485b573
Gerrit-Change-Number: 37846
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/37847?usp=email )
Change subject: pySim.esim.saip.File: move away from stream for file content
......................................................................
pySim.esim.saip.File: move away from stream for file content
Let's linearize the file content in a bytes member variable self.body.
Change-Id: I6cb23a3a644854abd3dfd3b50b586ce80da21353
---
M pySim/esim/saip/__init__.py
1 file changed, 11 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/47/37847/1
diff --git a/pySim/esim/saip/__init__.py b/pySim/esim/saip/__init__.py
index 7ee43f7..58c26ae 100644
--- a/pySim/esim/saip/__init__.py
+++ b/pySim/esim/saip/__init__.py
@@ -97,7 +97,7 @@
self.pe_name = pename
self.template = template
self.fileDescriptor = {}
- self.stream = None
+ self.body = None
# apply some defaults from profile
if self.template:
self.from_template(self.template)
@@ -173,7 +173,7 @@
raise ValueError("No fileDescriptor found in tuple, and none set by template before")
if fd:
self.fileDescriptor.update(dict(fd))
- self.stream = self.linearize_file_content(l)
+ self.body = self.linearize_file_content(l)
def from_gfm(self, d: Dict):
print(d)
@@ -184,7 +184,7 @@
raise NotImplementedError
@staticmethod
- def linearize_file_content(l: List[Tuple]) -> Optional[io.BytesIO]:
+ def linearize_file_content(l: List[Tuple]) -> Optional[bytes]:
"""linearize a list of fillFileContent / fillFileOffset tuples into a stream of bytes."""
stream = io.BytesIO()
for k, v in l:
@@ -199,7 +199,14 @@
stream.write(v)
else:
return ValueError("Unknown key '%s' in tuple list" % k)
- return stream
+ return stream.read()
+
+ def file_content_to_tuples(self) -> List[Tuple]:
+ # FIXME: simplistic approach. needs optimization. We should first check if the content
+ # matches the expanded default value from the template. If it does, return empty list.
+ # Next, we should compute the diff between the default value and self.body, and encode
+ # that as a sequence of fillFileOffset and fillFileContent tuples.
+ return [('fillFileContent', self.body)]
def __str__(self) -> str:
return "File(%s)" % self.pe_name
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37847?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: I6cb23a3a644854abd3dfd3b50b586ce80da21353
Gerrit-Change-Number: 37847
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Attention is currently required from: neels.
fixeria has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/osmo-upf/+/37827?usp=email )
Change subject: contrib/pfcp-tool-scripts: adjust tunend_session_est.vty and upf cfg to match up
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/37827?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: I3d6a26b45f084c281887bee541cf01b690c9d1de
Gerrit-Change-Number: 37827
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 17 Aug 2024 07:53:08 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: neels.
fixeria has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/osmo-upf/+/37825?usp=email )
Change subject: fix EXTRA_DIST for vty test scripts
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/37825?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: If4dca81ce287ce1b1af32057634af912a8b89665
Gerrit-Change-Number: 37825
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 17 Aug 2024 07:52:24 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: falconia.
fixeria has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmocore/+/37841?usp=email )
Change subject: tests: add unit test for osmo_efr_sid_classify()
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/37841?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: I5357c10d40dcca1564e45cba5914ff150fa83a4f
Gerrit-Change-Number: 37841
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: falconia <falcon(a)freecalypso.org>
Gerrit-Comment-Date: Sat, 17 Aug 2024 07:50:29 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes