Attention is currently required from: laforge.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/37614?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: pySim-shell: fix reset command
......................................................................
pySim-shell: fix reset command
The reset command resets the card using the card object. This unfortunately
leaves the RuntimeState uninformed about the event. However, the RuntimeState
class also has a reset method that resets the card and the RuntimeState. Let's
use this reset method. Also fix this method so that it ensures that the SCP is
also no longer present.
Related: OS#6092
Change-Id: I1ad29c9e7ce7d80bebc92fa173ed7a44ee4c2998
---
M pySim-shell.py
M pySim/runtime.py
2 files changed, 21 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/14/37614/2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37614?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I1ad29c9e7ce7d80bebc92fa173ed7a44ee4c2998
Gerrit-Change-Number: 37614
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: dexter, laforge.
Hello Jenkins Builder, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/37612?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Code-Review+1 by laforge, Verified-1 by Jenkins Builder
Change subject: pySim-shell: move export code into filesystem class model
......................................................................
pySim-shell: move export code into filesystem class model
The code that generates the filesystem export lines for the various
different file structures can be moved into the filesystem class model.
This simplifies the code since we do not need any extra logic to
distinguish between the different file structures.
Related: OS#6092
Change-Id: Icc2ee60cfc4379411744ca1033d79a1ee9cff5a6
---
M pySim-shell.py
M pySim/filesystem.py
2 files changed, 119 insertions(+), 58 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/12/37612/2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37612?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Icc2ee60cfc4379411744ca1033d79a1ee9cff5a6
Gerrit-Change-Number: 37612
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newpatchset
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/37623?usp=email )
Change subject: pySim.tlv: Separate {to,from}_val_dict() from {to,from}_dict()
......................................................................
pySim.tlv: Separate {to,from}_val_dict() from {to,from}_dict()
There are some situations where we want to work with a type-name-wrapped
dict that includes the type information, and others where we don't want
that. The main reason is that nested IEs can only be reconstructed if
we can determine the type/class of the nested IE from the dict data.
Let's explicitly offer {to,from}_val_dict() methods that work with
the value-part only
Related: OS#6453
Change-Id: I81654ea54aed9e598943f41a26a57dcc3a7f10c2
---
M pySim/tlv.py
1 file changed, 47 insertions(+), 11 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/23/37623/1
diff --git a/pySim/tlv.py b/pySim/tlv.py
index 4d542da..7207eaf 100644
--- a/pySim/tlv.py
+++ b/pySim/tlv.py
@@ -142,25 +142,43 @@
else:
return '%s(%s)' % (type(self).__name__, self.decoded)
- def to_dict(self):
- """Return a JSON-serializable dict representing the [nested] IE data."""
+ def to_val_dict(self):
+ """Return a JSON-serializable dict representing just the [nested] value portion of the IE
+ data. This does not include any indication of the type of 'self', so the resulting dict alone
+ will be insufficient ot recreate an object from it without additional type information."""
if len(self.children):
- v = [x.to_dict() for x in self.children]
+ return [x.to_dict() for x in self.children]
else:
- v = self.decoded
- return {camel_to_snake(type(self).__name__): v}
+ return self.decoded
+
+ def from_val_dict(self, decoded):
+ """Set the IE internal decoded representation to data from the argument.
+ If this is a nested IE, the child IE instance list is re-created.
+
+ This method is symmetrical to to_val_dict() aboe, i.e. there is no outer dict
+ containig the snake-reformatted type name of 'self'."""
+ if self.nested_collection:
+ self.children = self.nested_collection.from_dict(decoded)
+ else:
+ self.children = []
+ self.decoded = decoded
+
+ def to_dict(self):
+ """Return a JSON-serializable dict representing the [nested] IE data. The returned
+ data contains an outer dict with the snake-reformatted type of 'self' and is hence
+ sufficient to re-create an object from it."""
+ return {camel_to_snake(type(self).__name__): self.to_val_dict()}
def from_dict(self, decoded: dict):
"""Set the IE internal decoded representation to data from the argument.
- If this is a nested IE, the child IE instance list is re-created."""
+ If this is a nested IE, the child IE instance list is re-created.
+
+ This method is symmetrical to to_dict() above, i.e. the outer dict must contain just a single
+ key-value pair, where the key is the snake-reformatted type name of 'self'"""
expected_key_name = camel_to_snake(type(self).__name__)
if not expected_key_name in decoded:
raise ValueError("Dict %s doesn't contain expected key %s" % (decoded, expected_key_name))
- if self.nested_collection:
- self.children = self.nested_collection.from_dict(decoded[expected_key_name])
- else:
- self.children = []
- self.decoded = decoded[expected_key_name]
+ self.from_val_dict(decoded[expected_key_name])
def is_constructed(self):
"""Is this IE constructed by further nested IEs?"""
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37623?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I81654ea54aed9e598943f41a26a57dcc3a7f10c2
Gerrit-Change-Number: 37623
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
Attention is currently required from: dexter, lynxis lazus.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/36127?usp=email )
Change subject: Revert "tlv: Fix from_dict() symmetry"
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> I have tried this and I can confirm that this fixes the problem with the ARA-M interface.
I have never argued that this patch fixes one specific problem. But I'm also sure it introduces tons of problems elsewhere at the same time 😊
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/36127?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I1710bf9124acf7952d3231b104407e9ac998d6a8
Gerrit-Change-Number: 36127
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 26 Jul 2024 06:42:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: laforge.
Hello Jenkins Builder, dexter, fixeria,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/37541?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
The change is no longer submittable: Verified is unsatisfied now.
Change subject: saip-tool: Fix TAR display for implicit TAR
......................................................................
saip-tool: Fix TAR display for implicit TAR
Until Change-Id Ifba1048e3000829d54769b0420f5134e2f9b04e1 the TAR
output was working for implicit tar. With said commit we fixed it
for explicit tar but broke implicit tar.
With this commit it works for both implicit and explicit TAR.
Change-Id: I76133b0e02996a138257f3fba5ceb0d2fc6fad80
---
M contrib/saip-tool.py
1 file changed, 17 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/41/37541/3
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37541?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I76133b0e02996a138257f3fba5ceb0d2fc6fad80
Gerrit-Change-Number: 37541
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset