dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/28159 )
Change subject: pySim-shell: more generic export options
......................................................................
pySim-shell: more generic export options
The as_json parameter has been added as an additional parameter to the
export function. Lets use a dictionary here and put the parameter in it.
This makes it easier to add more options in the future
Change-Id: Ie860eec918e7cdb01651642f4bc2474c9fb1924f
---
M pySim-shell.py
1 file changed, 8 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/59/28159/1
diff --git a/pySim-shell.py b/pySim-shell.py
index 33c18fd..5a51fcd 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -461,7 +461,7 @@
self._cmd.poutput(directory_str)
self._cmd.poutput("%d files" % len(selectables))
- def walk(self, indent=0, action=None, context=None, as_json=False):
+ def walk(self, indent=0, action=None, context=None, opts={}):
"""Recursively walk through the file system, starting at the currently selected DF"""
files = self._cmd.rs.selected_file.get_selectables(
flags=['FNAMES', 'ANAMES'])
@@ -493,12 +493,12 @@
# If the DF was skipped, we never have entered the directory
# below, so we must not move up.
if skip_df == False:
- self.walk(indent + 1, action, context, as_json)
+ self.walk(indent + 1, action, context, opts)
fcp_dec = self._cmd.rs.select("..", self._cmd)
elif action:
df_before_action = self._cmd.rs.selected_file
- action(f, context, as_json)
+ action(f, context, opts)
# When walking through the file system tree the action must not
# always restore the currently selected file to the file that
# was selected before executing the action() callback.
@@ -510,10 +510,11 @@
"""Display a filesystem-tree with all selectable files"""
self.walk()
- def export(self, filename, context, as_json=False):
+ def export(self, filename, context, opts):
""" Select and export a single file """
context['COUNT'] += 1
df = self._cmd.rs.selected_file
+ as_json = opts['JSON']
# The currently selected file (not the file we are going to export)
# must always be an ADF or DF. From this starting point we select
@@ -619,10 +620,11 @@
"""Export files to script that can be imported back later"""
context = {'ERR': 0, 'COUNT': 0, 'BAD': [],
'DF_SKIP': 0, 'DF_SKIP_REASON': []}
+ opts_export = {'JSON': opts.json}
if opts.filename:
- self.export(opts.filename, context, opts.json)
+ self.export(opts.filename, context, opts_export)
else:
- self.walk(0, self.export, context, opts.json)
+ self.walk(0, self.export, context, opts_export)
self._cmd.poutput(boxed_heading_str("Export summary"))
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/28159
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ie860eec918e7cdb01651642f4bc2474c9fb1924f
Gerrit-Change-Number: 28159
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/28158 )
Change subject: pySim-shell: explain why we insist on a DF or ADF
......................................................................
pySim-shell: explain why we insist on a DF or ADF
Change-Id: I155cefb10864432d59a0a66410783b4c9772f8a4
---
M pySim-shell.py
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/58/28158/1
diff --git a/pySim-shell.py b/pySim-shell.py
index 06977f0..33c18fd 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -515,6 +515,10 @@
context['COUNT'] += 1
df = self._cmd.rs.selected_file
+ # The currently selected file (not the file we are going to export)
+ # must always be an ADF or DF. From this starting point we select
+ # the EF we want to export. To maintain consistency we will then
+ # select the current DF again (see comment below).
if not isinstance(df, CardDF):
raise RuntimeError(
"currently selected file %s is not a DF or ADF" % str(df))
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/28158
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I155cefb10864432d59a0a66410783b4c9772f8a4
Gerrit-Change-Number: 28158
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: pespin.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28154
to look at the new patch set (#3).
Change subject: library/DIAMETER: Rename template to follow naming style
......................................................................
library/DIAMETER: Rename template to follow naming style
Change-Id: I1c7cfbea25a2da99813aa3c4f8a5760c4185ee26
---
M library/DIAMETER_Emulation.ttcn
M library/DIAMETER_Templates.ttcn
2 files changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/54/28154/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28154
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I1c7cfbea25a2da99813aa3c4f8a5760c4185ee26
Gerrit-Change-Number: 28154
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28156
to look at the new patch set (#4).
Change subject: ggsn: Improve checks around Gy messages
......................................................................
ggsn: Improve checks around Gy messages
Change-Id: I702796f2f941b78da904faa2ffdba4185333bc0d
---
M ggsn_tests/GGSN_Tests.ttcn
M library/DIAMETER_Templates.ttcn
2 files changed, 479 insertions(+), 23 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/56/28156/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28156
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I702796f2f941b78da904faa2ffdba4185333bc0d
Gerrit-Change-Number: 28156
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset
Attention is currently required from: pespin.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28153
to look at the new patch set (#2).
Change subject: ggsn: Properly encode MISDN IE in GTP
......................................................................
ggsn: Properly encode MISDN IE in GTP
ISDN-AddressString contains an initial byte at the start.
We didn't care so far because we were not yet checking the content of
msisdn, so the usual first '12'O byte was being considered as a header.
Let's store it in GTP format as before, but let's pass it as a
charstring when initializing the PdpContext, so that the human-style is
visible in the test for easy visualization/comparison (It will be
verified in a follow-up patch in Gy Diameter interface).
Change-Id: Ie1b65707d4b08f2201572e1fa44a1f9f985eb096
---
M ggsn_tests/GGSN_Tests.ttcn
M ggsn_tests/gen_links.sh
M ggsn_tests/regen_makefile.sh
3 files changed, 49 insertions(+), 46 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/53/28153/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28153
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ie1b65707d4b08f2201572e1fa44a1f9f985eb096
Gerrit-Change-Number: 28153
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28156
to look at the new patch set (#3).
Change subject: ggsn: Improve checks around Gy messages
......................................................................
ggsn: Improve checks around Gy messages
Change-Id: I702796f2f941b78da904faa2ffdba4185333bc0d
---
M ggsn_tests/GGSN_Tests.ttcn
M library/DIAMETER_Templates.ttcn
2 files changed, 479 insertions(+), 23 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/56/28156/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28156
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I702796f2f941b78da904faa2ffdba4185333bc0d
Gerrit-Change-Number: 28156
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28156
to look at the new patch set (#2).
Change subject: ggsn: Improve checks around Gy messages
......................................................................
ggsn: Improve checks around Gy messages
Change-Id: I702796f2f941b78da904faa2ffdba4185333bc0d
---
M ggsn_tests/GGSN_Tests.ttcn
M library/DIAMETER_Templates.ttcn
2 files changed, 475 insertions(+), 19 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/56/28156/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28156
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I702796f2f941b78da904faa2ffdba4185333bc0d
Gerrit-Change-Number: 28156
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset