laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/41738?usp=email )
Change subject: pySim-shell: renovate version command
......................................................................
pySim-shell: renovate version command
In case pySim-shell is used directly from the git repository (not
installed via a package manager), the version command fails with an
exception because pkg_resources.get_distribution('pySim') fails.
Let's renovate the version command and migrate from pkg_resources to
importlib.resources. There are many users and developers out there who
retrieve pySim-shell directly from the git repository and not via pip3.
To accommodate for that, let's check if pySim-shell.py is located in a
git repository and if so, let's display the HEAD commit hash instead.
Since the version of the currently installed pyosmocom version also
plays a critical role, let's display the pyosmocom version as well.
Related: OS#6830
Change-Id: I2b9038f88cfcaa07894a2f09c7f5ad8a5474083d
---
M pySim-shell.py
1 file changed, 11 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/pySim-shell.py b/pySim-shell.py
index da3a26b..56fba7b 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -519,8 +519,17 @@
@cmd2.with_category(CUSTOM_CATEGORY)
def do_version(self, opts):
"""Print the pySim software version."""
- import pkg_resources
- self.poutput(pkg_resources.get_distribution('pySim'))
+ from importlib.metadata import version as vsn
+ self.poutput("pyosmocom " + vsn('pyosmocom'))
+ import os
+ cwd = os.path.dirname(os.path.realpath(__file__))
+ if os.path.isdir(os.path.join(cwd, ".git")):
+ import subprocess
+ url = subprocess.check_output(['git', 'config', '--get', 'remote.origin.url']).decode('ascii').strip()
+ version = subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd=cwd).decode('ascii').strip()
+ self.poutput(os.path.basename(url) + " " + version)
+ else:
+ self.poutput("pySim " + vsn('pySim'))
@with_default_category('pySim Commands')
class PySimCommands(CommandSet):
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41738?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: I2b9038f88cfcaa07894a2f09c7f5ad8a5474083d
Gerrit-Change-Number: 41738
Gerrit-PatchSet: 7
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/41737?usp=email )
Change subject: esim.saip: Better docstring about FsNode class
......................................................................
esim.saip: Better docstring about FsNode class
Change-Id: Id9d196e8d9b1d1b892ec50100b170d72d2c3910b
---
M pySim/esim/saip/__init__.py
1 file changed, 4 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
diff --git a/pySim/esim/saip/__init__.py b/pySim/esim/saip/__init__.py
index 5a71706..7c6a557 100644
--- a/pySim/esim/saip/__init__.py
+++ b/pySim/esim/saip/__init__.py
@@ -1888,7 +1888,10 @@
class FsNode:
- """A node in the filesystem hierarchy."""
+ """A node in the filesystem hierarchy. Each node can have a parent node and any number of children.
+ Each node is identified uniquely within the parent by its numeric FID and its optional human-readable
+ name. Each node usually is associated with an instance of the File class for the actual content of
+ the file. FsNode is the base class used by more specific nodes, such as FsNode{EF,DF,ADF,MF}."""
def __init__(self, fid: int, parent: Optional['FsNode'], file: Optional[File] = None,
name: Optional[str] = None):
self.fid = fid
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41737?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: Id9d196e8d9b1d1b892ec50100b170d72d2c3910b
Gerrit-Change-Number: 41737
Gerrit-PatchSet: 6
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
laforge has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/pysim/+/41737?usp=email )
Change subject: esim.saip: Better docstring about FsNode class
......................................................................
Patch Set 5: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41737?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: Id9d196e8d9b1d1b892ec50100b170d72d2c3910b
Gerrit-Change-Number: 41737
Gerrit-PatchSet: 5
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Tue, 06 Jan 2026 21:10:27 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/41736?usp=email )
Change subject: pySim.esim.saip.ProfileElementSequence: Update type annotations
......................................................................
pySim.esim.saip.ProfileElementSequence: Update type annotations
The type annotations didn't reflect reality in two cases.
Change-Id: Ib99c00a38bf009c63180b4a593d6cc796ff282d3
---
M pySim/esim/saip/__init__.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
fixeria: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/pySim/esim/saip/__init__.py b/pySim/esim/saip/__init__.py
index c0f5340..5a71706 100644
--- a/pySim/esim/saip/__init__.py
+++ b/pySim/esim/saip/__init__.py
@@ -1789,7 +1789,7 @@
return None
@staticmethod
- def peclass_for_path(path: Path) -> Optional[ProfileElement]:
+ def peclass_for_path(path: Path) -> Tuple[Optional[ProfileElement], Optional[templates.FileTemplate]]:
"""Return the ProfileElement class that can contain a file with given path."""
naa = ProfileElementSequence.naa_for_path(path)
if naa:
@@ -1822,7 +1822,7 @@
return ProfileElementTelecom, ft
return ProfileElementGFM, None
- def pe_for_path(self, path: Path) -> Optional[ProfileElement]:
+ def pe_for_path(self, path: Path) -> Tuple[Optional[ProfileElement], Optional[templates.FileTemplate]]:
"""Return the ProfileElement instance that can contain a file with matching path. This will
either be an existing PE within the sequence, or it will be a newly-allocated PE that is
inserted into the sequence."""
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41736?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: Ib99c00a38bf009c63180b4a593d6cc796ff282d3
Gerrit-Change-Number: 41736
Gerrit-PatchSet: 6
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39264?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: L3_Templates: add MM cause codes
......................................................................
L3_Templates: add MM cause codes
It will be used by SGSN Context Req/Resp/Ack test cases in the SGSN.
Change-Id: I396ddaf5b08faddcf002317307dcc20840898aa9
---
M library/L3_Templates.ttcn
1 file changed, 4 insertions(+), 0 deletions(-)
Approvals:
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn
index 8f419f0..19be96d 100644
--- a/library/L3_Templates.ttcn
+++ b/library/L3_Templates.ttcn
@@ -53,6 +53,10 @@
SERVICE_TYPE_MBMS_Broadcast_Service_Reception ('100'B)
}
+/* TS 24.008 Table 10.5.147; Annex G, both MM and GMM cause code (8 bits) */
+const OCT1 c_MM_CAUSE_IMSI_UNKNOWN_IN_HLR := '02'O;
+const OCT1 c_MM_CAUSE_MS_NOT_DERIVED := '09'O;
+
template ML3_Cause_TLV ts_ML3_Cause(BIT7 cause, BIT4 loc := '0001'B, BIT2 std := '11'B) := {
elementIdentifier := '08'O,
lengthIndicator := 0, /* overwritten */
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39264?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: I396ddaf5b08faddcf002317307dcc20840898aa9
Gerrit-Change-Number: 39264
Gerrit-PatchSet: 16
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39263?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: GTPv1C_Templates: add cause code GTP_CAUSE_IMSI_IMEI_NOT_KNOWN
......................................................................
GTPv1C_Templates: add cause code GTP_CAUSE_IMSI_IMEI_NOT_KNOWN
It will be used by SGSN Context Req/Resp/Ack test cases in the SGSN.
Change-Id: I8f919d5982a3c9a317d309c383b36043ad5d3278
---
M library/GTPv1C_Templates.ttcn
1 file changed, 1 insertion(+), 0 deletions(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/library/GTPv1C_Templates.ttcn b/library/GTPv1C_Templates.ttcn
index 7371ab0..fd55af6 100644
--- a/library/GTPv1C_Templates.ttcn
+++ b/library/GTPv1C_Templates.ttcn
@@ -71,6 +71,7 @@
/* reserved */
GTP_CAUSE_REQUEST_ACCEPTED (128),
GTP_CAUSE_INVALID_MSG_FORMAT (193),
+ GTP_CAUSE_IMSI_IMEI_NOT_KNOWN (194),
GTP_CAUSE_NO_RESOURCES_AVAILABLE (199)
/* FIXME */
} with { encode "RAW"
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39263?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: I8f919d5982a3c9a317d309c383b36043ad5d3278
Gerrit-Change-Number: 39263
Gerrit-PatchSet: 16
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: lynxis lazus.
Hello Jenkins Builder, fixeria, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39263?usp=email
to look at the new patch set (#16).
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: GTPv1C_Templates: add cause code GTP_CAUSE_IMSI_IMEI_NOT_KNOWN
......................................................................
GTPv1C_Templates: add cause code GTP_CAUSE_IMSI_IMEI_NOT_KNOWN
It will be used by SGSN Context Req/Resp/Ack test cases in the SGSN.
Change-Id: I8f919d5982a3c9a317d309c383b36043ad5d3278
---
M library/GTPv1C_Templates.ttcn
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/63/39263/16
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39263?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I8f919d5982a3c9a317d309c383b36043ad5d3278
Gerrit-Change-Number: 39263
Gerrit-PatchSet: 16
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>