Attention is currently required from: dexter, laforge.
fixeria has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/37643?usp=email )
Change subject: ara_m: add export support for the ARA-M application
......................................................................
Patch Set 3: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37643?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I811cb9d25cb8ee194b4ead5fb2cabf1fdc0c1c43
Gerrit-Change-Number: 37643
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 06 Aug 2024 17:47:01 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: fixeria, laforge.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/37641?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: enable export of DF and ADF files
......................................................................
pySim-shell: enable export of DF and ADF files
Since we now have the ability to provide export methods for all file
types in the file system (this also includes DF and ADF files), we need
to support this at shell command level as well.
Related: OS#6092
Change-Id: I3ee661dbae5c11fec23911775f352ac13bc2c6e5
---
M pySim-shell.py
1 file changed, 32 insertions(+), 29 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/41/37641/2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37641?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: I3ee661dbae5c11fec23911775f352ac13bc2c6e5
Gerrit-Change-Number: 37641
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: neels.
Jenkins Builder has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/osmo-upf/+/37760?usp=email )
Change subject: n-sessions [4/4]: implement 'n <0-2147483647> session create'
......................................................................
Patch Set 2:
(2 comments)
File src/osmo-pfcp-tool/pfcp_tool_vty.c:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-17588):
https://gerrit.osmocom.org/c/osmo-upf/+/37760/comment/0c89ec7c_4115261d?usp… :
PS2, Line 830: "Let some time pass until events have occured\n"
'occured' may be misspelled - perhaps 'occurred'?
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-17588):
https://gerrit.osmocom.org/c/osmo-upf/+/37760/comment/6201b129_b5185463?usp… :
PS2, Line 1096: int n = (strcmp("all", argv[0]) == 0? -1 : atoi(argv[0]));
spaces required around that '?' (ctx:VxW)
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/37760?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: I74a21cc31296ab89a2acda1da8ae9693c1992e66
Gerrit-Change-Number: 37760
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 05 Aug 2024 06:23:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
dexter has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37643?usp=email )
(
3 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: ara_m: add export support for the ARA-M application
......................................................................
ara_m: add export support for the ARA-M application
This patch adds an export method to the CardApplicationARAM class.
This method reads the ARA-M configuration and transforms it into
executeable command lines, which can be executed as a script later
to restore an ARA-M configuration.
Related: OS#6092
Change-Id: I811cb9d25cb8ee194b4ead5fb2cabf1fdc0c1c43
---
M pySim/ara_m.py
1 file changed, 75 insertions(+), 0 deletions(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/pySim/ara_m.py b/pySim/ara_m.py
index 71aa6d8..cdc934d 100644
--- a/pySim/ara_m.py
+++ b/pySim/ara_m.py
@@ -415,3 +415,78 @@
class CardApplicationARAM(CardApplication):
def __init__(self):
super().__init__('ARA-M', adf=ADF_ARAM(), sw=sw_aram)
+
+ @staticmethod
+ def __export_get_from_dictlist(key, dictlist):
+ # Data objects are organized in lists that contain dictionaries, usually there is only one dictionary per
+ # list item. This function goes through that list and gets the value of the first dictionary that has the
+ # matching key.
+ if dictlist is None:
+ return None
+ obj = None
+ for d in dictlist:
+ obj = d.get(key, obj)
+ return obj
+
+ @staticmethod
+ def __export_ref_ar_do_list(ref_ar_do_list):
+ export_str = ""
+ ref_do_list = CardApplicationARAM.__export_get_from_dictlist('ref_do', ref_ar_do_list.get('ref_ar_do'))
+ ar_do_list = CardApplicationARAM.__export_get_from_dictlist('ar_do', ref_ar_do_list.get('ref_ar_do'))
+
+ if ref_do_list and ar_do_list:
+ # Get ref_do parameters
+ aid_ref_do = CardApplicationARAM.__export_get_from_dictlist('aid_ref_do', ref_do_list)
+ dev_app_id_ref_do = CardApplicationARAM.__export_get_from_dictlist('dev_app_id_ref_do', ref_do_list)
+ pkg_ref_do = CardApplicationARAM.__export_get_from_dictlist('pkg_ref_do', ref_do_list)
+
+ # Get ar_do parameters
+ apdu_ar_do = CardApplicationARAM.__export_get_from_dictlist('apdu_ar_do', ar_do_list)
+ nfc_ar_do = CardApplicationARAM.__export_get_from_dictlist('nfc_ar_do', ar_do_list)
+ perm_ar_do = CardApplicationARAM.__export_get_from_dictlist('perm_ar_do', ar_do_list)
+
+ # Write command-line
+ export_str += "aram_store_ref_ar_do"
+ if aid_ref_do:
+ export_str += (" --aid %s" % aid_ref_do)
+ else:
+ export_str += " --aid-empty"
+ if dev_app_id_ref_do:
+ export_str += (" --device-app-id %s" % dev_app_id_ref_do)
+ if apdu_ar_do and 'generic_access_rule' in apdu_ar_do:
+ export_str += (" --apdu-%s" % apdu_ar_do['generic_access_rule'])
+ elif apdu_ar_do and 'apdu_filter' in apdu_ar_do:
+ export_str += (" --apdu-filter ")
+ for apdu_filter in apdu_ar_do['apdu_filter']:
+ export_str += apdu_filter['header']
+ export_str += apdu_filter['mask']
+ if nfc_ar_do and 'nfc_event_access_rule' in nfc_ar_do:
+ export_str += (" --nfc-%s" % nfc_ar_do['nfc_event_access_rule'])
+ if perm_ar_do:
+ export_str += (" --android-permissions %s" % perm_ar_do['permissions'])
+ if pkg_ref_do:
+ export_str += (" --pkg-ref %s" % pkg_ref_do['package_name_string'])
+ export_str += "\n"
+ return export_str
+
+ @staticmethod
+ def export(as_json: bool, lchan):
+
+ # TODO: Add JSON output as soon as aram_store_ref_ar_do is able to process input in JSON format.
+ if as_json:
+ raise NotImplementedError("res_do encoder not yet implemented. Patches welcome.")
+
+ export_str = ""
+ export_str += "aram_delete_all\n"
+
+ res_do = ADF_ARAM.get_all(lchan.scc._tp)
+ if not res_do:
+ return export_str.strip()
+
+ for res_do_dict in res_do.to_dict():
+ if not res_do_dict.get('response_all_ref_ar_do', False):
+ continue
+ for ref_ar_do_list in res_do_dict['response_all_ref_ar_do']:
+ export_str += CardApplicationARAM.__export_ref_ar_do_list(ref_ar_do_list)
+
+ return export_str.strip()
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37643?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: I811cb9d25cb8ee194b4ead5fb2cabf1fdc0c1c43
Gerrit-Change-Number: 37643
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37765?usp=email )
Change subject: testenv: podman.is_running() -> testenv.args.podman
......................................................................
testenv: podman.is_running() -> testenv.args.podman
Use testenv.args.podman instead of testenv.podman.is_running() in all
places except for testenv.podman.stop().
- testenv.args.podman is always True when --podman is used.
- testenv.podman.is_running() is only True while the container is
currently running.
Most of the time the behavior is the same. But without this patch, when
the container crashes, commands would unexpectedly run outside of the
container (and then fail on jenkins due to missing programs).
Related: OS#6494
Change-Id: Iea634f5e97d14f1f7e777f4609b9593974964d23
---
M _testenv/testenv/cmd.py
M _testenv/testenv/daemons.py
2 files changed, 2 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
diff --git a/_testenv/testenv/cmd.py b/_testenv/testenv/cmd.py
index 93e4e36..cb8386a 100644
--- a/_testenv/testenv/cmd.py
+++ b/_testenv/testenv/cmd.py
@@ -82,7 +82,7 @@
def run(cmd, check=True, env={}, no_podman=False, stdin=subprocess.DEVNULL, *args, **kwargs):
- if not no_podman and testenv.podman.is_running():
+ if not no_podman and testenv.args.podman:
return testenv.podman.exec_cmd(cmd, check=check, env=env, *args, **kwargs)
logging.debug(f"+ {cmd}")
diff --git a/_testenv/testenv/daemons.py b/_testenv/testenv/daemons.py
index 792341c..9e274d9 100644
--- a/_testenv/testenv/daemons.py
+++ b/_testenv/testenv/daemons.py
@@ -55,7 +55,7 @@
if testenv.args.io_uring:
env["LIBOSMO_IO_BACKEND"] = "IO_URING"
- if testenv.podman.is_running():
+ if testenv.args.podman:
daemons[section] = testenv.podman.exec_cmd_background(cmd, cwd=cwd, env=env)
else:
logging.debug(f"+ {cmd}")
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37765?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Iea634f5e97d14f1f7e777f4609b9593974964d23
Gerrit-Change-Number: 37765
Gerrit-PatchSet: 4
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: dexter.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/37641?usp=email )
Change subject: pySim-shell: improve export and enable exportation of DF and ADF files
......................................................................
Patch Set 4: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37641?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I3ee661dbae5c11fec23911775f352ac13bc2c6e5
Gerrit-Change-Number: 37641
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 08 Aug 2024 14:59:10 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes