Attention is currently required from: laforge.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/27130 )
Change subject: ts_102_221: Implement proper parsing of EF.DIR
......................................................................
Patch Set 6: Code-Review+1
(1 comment)
File pySim/ts_102_221.py:
https://gerrit.osmocom.org/c/pysim/+/27130/comment/7431ad0b_711e5333
PS6, Line 512: ApplicationLabel
So pylint complains that this variable is undefined:
pySim/ts_102_221.py:512:63: E0602: Undefined variable 'ApplicationLabel' (undefined-variable)
And this is the sad side of using sub-classes in Python. For some reason, referencing them in lists and tuples does not work, I also faced this kind of an error while working with pycrate. Perhaps because tuples and lists are evaluated in some other scope?
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/27130
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I875eb49e1f0370428c2eae69af84f5483bd5b1fc
Gerrit-Change-Number: 27130
Gerrit-PatchSet: 6
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Fri, 11 Feb 2022 07:18:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: laforge.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/27140 )
Change subject: filesystem.py: Accept both a class or an instance as TLV._tlv member
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/27140
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I0a5ec2a860104ffe4524c647105a42505ac394d6
Gerrit-Change-Number: 27140
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Fri, 11 Feb 2022 07:13:28 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: laforge.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/27142 )
Change subject: utils: Fix missing Optional[] in type annotations
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/27142
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I6e7d3725f28410d66580e88f2271d2b240d1f98e
Gerrit-Change-Number: 27142
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Fri, 11 Feb 2022 07:12:40 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: pespin, fixeria.
iedemam has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/27134 )
Change subject: stats: add RSL line number to TCP stats name
......................................................................
Patch Set 3:
(1 comment)
File src/input/ipaccess.c:
https://gerrit.osmocom.org/c/libosmo-abis/+/27134/comment/cf6f0dd9_2dd81ce9
PS3, Line 346: snprintf(stat_name, sizeof(stat_name), "ipa-rsl-%u", unit_data.trx_id);
> Can you try using new_line->num instead?
No luck. All zero values again.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/27134
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ie42d8a0cb3757f2d01a4b6d69ea2bcce400b7538
Gerrit-Change-Number: 27134
Gerrit-PatchSet: 3
Gerrit-Owner: iedemam <michael(a)kapsulate.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Feb 2022 22:24:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: iedemam, neels, fixeria, daniel, lynxis lazus.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/27137 )
Change subject: stats: sanitize tcp stat name identifiers
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> Perhaps my comment is misleading. […]
Oh then I'd expect osmo_stat_item_group_set_name to already do some sanitizing, maybe that's not correct in current implementation? Did you check osmo_stat_item_group_set_name implementation? I added Daniel as reviewer, he may know better.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27137
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ib04c2f5bfcbd6c19dd87debf1fc053abf0b9bef2
Gerrit-Change-Number: 27137
Gerrit-PatchSet: 1
Gerrit-Owner: iedemam <michael(a)kapsulate.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: iedemam <michael(a)kapsulate.com>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Comment-Date: Thu, 10 Feb 2022 22:15:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: iedemam <michael(a)kapsulate.com>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
iedemam has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/27137 )
Change subject: stats: sanitize tcp stat name identifiers
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> I'd argue it's not the duty of stats to be "friendly as filenames", but rather something specific to […]
Perhaps my comment is misleading. Yes, I'm converting these into file names based on the statsd key name. But what we're using right now in tcp_stats for names are not valid for statsd. They need to be sanitized like the GPRS NS2 names are before being used as statsd key names.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27137
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ib04c2f5bfcbd6c19dd87debf1fc053abf0b9bef2
Gerrit-Change-Number: 27137
Gerrit-PatchSet: 1
Gerrit-Owner: iedemam <michael(a)kapsulate.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Feb 2022 19:18:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/27142 )
Change subject: utils: Fix missing Optional[] in type annotations
......................................................................
utils: Fix missing Optional[] in type annotations
Thanks to Vadim for pointing this out
Change-Id: I6e7d3725f28410d66580e88f2271d2b240d1f98e
---
M pySim/utils.py
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/42/27142/1
diff --git a/pySim/utils.py b/pySim/utils.py
index 3ce3e58..555aa82 100644
--- a/pySim/utils.py
+++ b/pySim/utils.py
@@ -1253,7 +1253,7 @@
has the habit of specifying TLV data but with very spcific ordering, or specific choices of
tags at specific points in a stream. This class tries to represent this."""
- def __init__(self, name: str, desc: str = None, tag: int = None):
+ def __init__(self, name: str, desc: Optional[str] = None, tag: Optional[int] = None):
"""
Args:
name: A brief, all-lowercase, underscore separated string identifier
@@ -1376,7 +1376,7 @@
A given encoded DO may contain any of them in any order, and may contain multiple instances
of each DO."""
- def __init__(self, name: str, desc: str = None, members=None):
+ def __init__(self, name: str, desc: Optional[str] = None, members=None):
self.name = name
self.desc = desc
self.members = members or []
@@ -1491,7 +1491,7 @@
By wrapping them into this formal DataObjectSequence, we can offer convenience methods
for encoding or decoding an entire sequence."""
- def __init__(self, name: str, desc: str = None, sequence=None):
+ def __init__(self, name: str, desc: Optional[str] = None, sequence=None):
self.sequence = sequence or []
self.name = name
self.desc = desc
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/27142
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I6e7d3725f28410d66580e88f2271d2b240d1f98e
Gerrit-Change-Number: 27142
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/27141 )
Change subject: cosmetic: Switch to consistent four-spaces indent; run autopep8
......................................................................
cosmetic: Switch to consistent four-spaces indent; run autopep8
We had a mixture of tab and 4space based indenting, which is a bad
idea. 4space is the standard in python, so convert all our code to
that. The result unfortuantely still shoed even more inconsistencies,
so I've decided to run autopep8 on the entire code base.
Change-Id: I4a4b1b444a2f43fab05fc5d2c8a7dd6ddecb5f07
---
M pySim-prog.py
M pySim-read.py
M pySim-shell.py
M pySim/__init__.py
M pySim/ara_m.py
M pySim/card_handler.py
M pySim/card_key_provider.py
M pySim/cards.py
M pySim/cat.py
M pySim/commands.py
M pySim/construct.py
M pySim/exceptions.py
M pySim/filesystem.py
M pySim/gsm_r.py
M pySim/iso7816_4.py
M pySim/jsonpath.py
M pySim/profile.py
M pySim/sysmocom_sja2.py
M pySim/tlv.py
M pySim/transport/__init__.py
M pySim/transport/calypso.py
M pySim/transport/modem_atcmd.py
M pySim/transport/pcsc.py
M pySim/transport/serial.py
M pySim/ts_102_221.py
M pySim/ts_31_102.py
M pySim/ts_31_103.py
M pySim/ts_51_011.py
M pySim/utils.py
29 files changed, 7,420 insertions(+), 6,468 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/41/27141/1
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/27141
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I4a4b1b444a2f43fab05fc5d2c8a7dd6ddecb5f07
Gerrit-Change-Number: 27141
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/27135 )
Change subject: ts_31_102: TLV._tlv must point to the class, not an instance
......................................................................
ts_31_102: TLV._tlv must point to the class, not an instance
In Change-Id I6d7c1bf49a8eaf3d8e50fb12888bf3d5b46b6c55 we fixed the
filesystem code to assume the self._tlv memper is a reference to a
class, and not an instance (as this is what the majority of the code
did).
However, it seems thre wer two instances where we actually had _tlv
reference an instance. Change that to class so it's the same all over
the code base.
Change-Id: Ie4878ad6a92feafe47e375c4f5f3f198921e1e95
---
M pySim/ts_31_102.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/pySim/ts_31_102.py b/pySim/ts_31_102.py
index e2ab925..3ae88d3 100644
--- a/pySim/ts_31_102.py
+++ b/pySim/ts_31_102.py
@@ -335,7 +335,7 @@
def __init__(self, fid="4f03", sfid=0x03, name='EF.5GS3GPPNSC', rec_len={57, None},
desc='5GS 3GPP Access NAS Security Context'):
super().__init__(fid, sfid=sfid, name=name, desc=desc, rec_len=rec_len)
- self._tlv = EF_5GS3GPPNSC.FiveGSNasSecurityContext()
+ self._tlv = EF_5GS3GPPNSC.FiveGSNasSecurityContext
# 3GPP TS 31.102 Section 4.4.11.6
class EF_5GAUTHKEYS(TransparentEF):
@@ -351,7 +351,7 @@
def __init__(self, fid='4f05', sfid=0x05, name='EF.5GAUTHKEYS', size={68, None},
desc='5G authentication keys'):
super().__init__(fid, sfid=sfid, name=name, desc=desc, size=size)
- self._tlv = EF_5GAUTHKEYS.FiveGAuthKeys()
+ self._tlv = EF_5GAUTHKEYS.FiveGAuthKeys
# 3GPP TS 31.102 Section 4.4.11.8
class ProtSchemeIdList(BER_TLV_IE, tag=0xa0):
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/27135
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ie4878ad6a92feafe47e375c4f5f3f198921e1e95
Gerrit-Change-Number: 27135
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/27133 )
Change subject: utils.py: Fix some tuple type annotations
......................................................................
utils.py: Fix some tuple type annotations
Change-Id: I869b0268383f6babd9b51d0ddfce448a1d2dda1e
---
M pySim/utils.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, approved
diff --git a/pySim/utils.py b/pySim/utils.py
index 4eb539b..3e79034 100644
--- a/pySim/utils.py
+++ b/pySim/utils.py
@@ -161,7 +161,7 @@
# length value coding is equal to BER-TLV
-def comprehensiontlv_parse_one(binary:bytes) -> (dict, int, bytes, bytes):
+def comprehensiontlv_parse_one(binary:bytes) -> Tuple[dict, int, bytes, bytes]:
"""Parse a single TLV IE at the start of the given binary data.
Args:
binary : binary input data of BER-TLV length field
@@ -311,7 +311,7 @@
else:
raise ValueError("Length > 32bits not supported")
-def bertlv_parse_one(binary:bytes) -> (dict, int, bytes, bytes):
+def bertlv_parse_one(binary:bytes) -> Tuple[dict, int, bytes, bytes]:
"""Parse a single TLV IE at the start of the given binary data.
Args:
binary : binary input data of BER-TLV length field
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/27133
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I869b0268383f6babd9b51d0ddfce448a1d2dda1e
Gerrit-Change-Number: 27133
Gerrit-PatchSet: 2
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-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/27132 )
Change subject: utils.py: type annotations for DataObject related methods
......................................................................
utils.py: type annotations for DataObject related methods
Change-Id: I291a429e9fe9f1a3fd95dcba3020b0e982154c97
---
M pySim/utils.py
1 file changed, 31 insertions(+), 29 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/utils.py b/pySim/utils.py
index 0a9be86..4eb539b 100644
--- a/pySim/utils.py
+++ b/pySim/utils.py
@@ -1170,7 +1170,7 @@
simply has any number of different TLVs that may occur in any order at any point, ISO 7816
has the habit of specifying TLV data but with very spcific ordering, or specific choices of
tags at specific points in a stream. This class tries to represent this."""
- def __init__(self, name, desc = None, tag = None):
+ def __init__(self, name:str, desc:str = None, tag:int = None):
"""
Args:
name: A brief, all-lowercase, underscore separated string identifier
@@ -1186,10 +1186,10 @@
def __str__(self):
return self.name
- def __repr__(self):
+ def __repr__(self) -> str:
return '%s(%s)' % (self.__class__, self.name)
- def __or__(self, other):
+ def __or__(self, other) -> 'DataObjectChoice':
"""OR-ing DataObjects together renders a DataObjectChoice."""
if isinstance(other, DataObject):
# DataObject | DataObject = DataObjectChoice
@@ -1197,17 +1197,19 @@
else:
raise TypeError
- def __add__(self, other):
+ def __add__(self, other) -> 'DataObjectCollection':
"""ADD-ing DataObjects together renders a DataObjectCollection."""
if isinstance(other, DataObject):
# DataObject + DataObject = DataObjectCollectin
return DataObjectCollection(None, members=[self, other])
+ else:
+ raise TypeError
- def _compute_tag(self):
+ def _compute_tag(self) -> int:
"""Compute the tag (sometimes the tag encodes part of the value)."""
return self.tag
- def to_dict(self):
+ def to_dict(self) -> dict:
"""Return a dict in form "name: decoded_value" """
return {self.name: self.decoded}
@@ -1219,13 +1221,13 @@
"""
@abc.abstractmethod
- def to_bytes(self):
+ def to_bytes(self) -> bytes:
"""Encode the internal state of this instance into the TLV value part.
Returns:
binary bytes encoding the internal state
"""
- def from_tlv(self, do:bytes):
+ def from_tlv(self, do:bytes) -> bytes:
"""Parse binary TLV representation into internal state. The resulting decoded
representation is _not_ returned, but just internalized in the object instance!
Args:
@@ -1241,7 +1243,7 @@
# return remaining bytes
return do[2+length:]
- def to_tlv(self):
+ def to_tlv(self) -> bytes:
"""Encode internal representation to binary TLV.
Returns:
bytes encoded in TLV format.
@@ -1250,7 +1252,7 @@
return bytes(self._compute_tag()) + bytes(len(val)) + val
# 'codec' interface
- def decode(self, binary:bytes):
+ def decode(self, binary:bytes) -> Tuple[dict, bytes]:
"""Decode a single DOs from the input data.
Args:
binary : binary bytes of encoded data
@@ -1265,12 +1267,12 @@
return (self.to_dict(), remainder)
# 'codec' interface
- def encode(self):
+ def encode(self) -> bytes:
return self.to_tlv()
class TL0_DataObject(DataObject):
"""Data Object that has Tag, Len=0 and no Value part."""
- def __init__(self, name, desc, tag, val=None):
+ def __init__(self, name:str, desc:str, tag:int, val=None):
super().__init__(name, desc, tag)
self.val = val
@@ -1279,7 +1281,7 @@
raise ValueError
self.decoded = self.val
- def to_bytes(self):
+ def to_bytes(self) -> bytes:
return b''
@@ -1287,7 +1289,7 @@
"""A DataObjectCollection consits of multiple Data Objects identified by their tags.
A given encoded DO may contain any of them in any order, and may contain multiple instances
of each DO."""
- def __init__(self, name, desc = None, members=None):
+ def __init__(self, name:str, desc:str = None, members=None):
self.name = name
self.desc = desc
self.members = members or []
@@ -1296,15 +1298,15 @@
self.members_by_tag = { m.tag:m for m in members }
self.members_by_name = { m.name:m for m in members }
- def __str__(self):
+ def __str__(self) -> str:
member_strs = [str(x) for x in self.members]
return '%s(%s)' % (self.name, ','.join(member_strs))
- def __repr__(self):
+ def __repr__(self) -> str:
member_strs = [repr(x) for x in self.members]
return '%s(%s)' % (self.__class__, ','.join(member_strs))
- def __add__(self, other):
+ def __add__(self, other) -> 'DataObjectCollection':
"""Extending DataCollections with other DataCollections or DataObjects."""
if isinstance(other, DataObjectCollection):
# adding one collection to another
@@ -1317,7 +1319,7 @@
raise TypeError
# 'codec' interface
- def decode(self, binary:bytes):
+ def decode(self, binary:bytes) -> Tuple[List, bytes]:
"""Decode any number of DOs from the collection until the end of the input data,
or uninitialized memory (0xFF) is found.
Args:
@@ -1343,7 +1345,7 @@
return (res, remainder)
# 'codec' interface
- def encode(self, decoded):
+ def encode(self, decoded) -> bytes:
res = bytearray()
for i in decoded:
obj = self.members_by_name(i[0])
@@ -1358,7 +1360,7 @@
"""We overload the add operator here to avoid inheriting it from DataObjecCollection."""
raise TypeError
- def __or__(self, other):
+ def __or__(self, other) -> 'DataObjectChoice':
"""OR-ing a Choice to another choice extends the choice, as does OR-ing a DataObject."""
if isinstance(other, DataObjectChoice):
# adding one collection to another
@@ -1371,7 +1373,7 @@
raise TypeError
# 'codec' interface
- def decode(self, binary:bytes):
+ def decode(self, binary:bytes) -> Tuple[dict, bytes]:
"""Decode a single DOs from the choice based on the tag.
Args:
binary : binary bytes of encoded data
@@ -1389,7 +1391,7 @@
return (obj.to_dict(), remainder)
# 'codec' interface
- def encode(self, decoded):
+ def encode(self, decoded) -> bytes:
obj = self.members_by_name(decoded[0])
return obj.to_tlv()
@@ -1398,20 +1400,20 @@
ordered sequence of DOs or choices of DOs that have to appear as per the specification.
By wrapping them into this formal DataObjectSequence, we can offer convenience methods
for encoding or decoding an entire sequence."""
- def __init__(self, name, desc=None, sequence=None):
+ def __init__(self, name:str, desc:str=None, sequence=None):
self.sequence = sequence or []
self.name = name
self.desc = desc
- def __str__(self):
+ def __str__(self) -> str:
member_strs = [str(x) for x in self.sequence]
return '%s(%s)' % (self.name, ','.join(member_strs))
- def __repr__(self):
+ def __repr__(self) -> str:
member_strs = [repr(x) for x in self.sequence]
return '%s(%s)' % (self.__class__, ','.join(member_strs))
- def __add__(self, other):
+ def __add__(self, other) -> 'DataObjectSequence':
"""Add (append) a DataObject or DataObjectChoice to the sequence."""
if isinstance(other, 'DataObject'):
return DataObjectSequence(self.name, self.desc, self.sequence + [other])
@@ -1421,7 +1423,7 @@
return DataObjectSequence(self.name, self.desc, self.sequence + other.sequence)
# 'codec' interface
- def decode(self, binary:bytes):
+ def decode(self, binary:bytes) -> Tuple[list, bytes]:
"""Decode a sequence by calling the decoder of each element in the sequence.
Args:
binary : binary bytes of encoded data
@@ -1437,7 +1439,7 @@
return (res, remainder)
# 'codec' interface
- def decode_multi(self, do:bytes):
+ def decode_multi(self, do:bytes) -> Tuple[list, bytes]:
"""Decode multiple occurrences of the sequence from the binary input data.
Args:
do : binary input data to be decoded
@@ -1458,7 +1460,7 @@
return (res, remainder)
# 'codec' interface
- def encode(self, decoded):
+ def encode(self, decoded) -> bytes:
"""Encode a sequence by calling the encoder of each element in the sequence."""
encoded = bytearray()
i = 0
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/27132
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I291a429e9fe9f1a3fd95dcba3020b0e982154c97
Gerrit-Change-Number: 27132
Gerrit-PatchSet: 2
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-MessageType: merged
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/27135 )
Change subject: ts_31_102: TLV._tlv must point to the class, not an instance
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/27135
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ie4878ad6a92feafe47e375c4f5f3f198921e1e95
Gerrit-Change-Number: 27135
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Thu, 10 Feb 2022 18:31:49 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: iedemam.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/27137 )
Change subject: stats: sanitize tcp stat name identifiers
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
I'd argue it's not the duty of stats to be "friendly as filenames", but rather something specific to whatever statsd consumer on the other side. It's probably also easy on the other side to sanitize names in case they need to be used in file names?
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27137
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ib04c2f5bfcbd6c19dd87debf1fc053abf0b9bef2
Gerrit-Change-Number: 27137
Gerrit-PatchSet: 1
Gerrit-Owner: iedemam <michael(a)kapsulate.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: iedemam <michael(a)kapsulate.com>
Gerrit-Comment-Date: Thu, 10 Feb 2022 17:47:24 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/27139 )
Change subject: ranap_rab_ass: add function to check if RAB is in FailureList
......................................................................
ranap_rab_ass: add function to check if RAB is in FailureList
A RANAP RAB-AssignmentResponse may contain a FailedList. In order to
detect that a RAB Assignment failed at the HNB we need to be able to
check if the RAB we are dealing with is contained an such a FailedList.
Change-Id: I4319f7caa45ea758ccd792cc8570521df075cf45
Related: OS#5152
---
M include/osmocom/hnbgw/ranap_rab_ass.h
M src/osmo-hnbgw/ranap_rab_ass.c
M tests/ranap_rab_ass/ranap_rab_ass_test.c
M tests/ranap_rab_ass/ranap_rab_ass_test.ok
4 files changed, 94 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/39/27139/1
diff --git a/include/osmocom/hnbgw/ranap_rab_ass.h b/include/osmocom/hnbgw/ranap_rab_ass.h
index f4d5cb6..b3406f0 100644
--- a/include/osmocom/hnbgw/ranap_rab_ass.h
+++ b/include/osmocom/hnbgw/ranap_rab_ass.h
@@ -14,3 +14,5 @@
uint8_t rab_id);
int ranap_rab_ass_resp_ies_replace_inet_addr(RANAP_RAB_AssignmentResponseIEs_t *ies, struct osmo_sockaddr *addr,
uint8_t rab_id);
+
+bool ranap_rab_ass_resp_ies_check_failure(RANAP_RAB_AssignmentResponseIEs_t *ies, uint8_t rab_id);
diff --git a/src/osmo-hnbgw/ranap_rab_ass.c b/src/osmo-hnbgw/ranap_rab_ass.c
index 23505f2..89d4b1b 100644
--- a/src/osmo-hnbgw/ranap_rab_ass.c
+++ b/src/osmo-hnbgw/ranap_rab_ass.c
@@ -141,8 +141,7 @@
{
/* Make sure we indeed deal with a setup-or-modified list */
if (!(ies->presenceMask & RAB_ASSIGNMENTRESPONSEIES_RANAP_RAB_SETUPORMODIFIEDLIST_PRESENT)) {
- RANAP_DEBUG
- ("Decoding failed, the RANAP RAB AssignmentResponse did not contain a setup-or-modified list!\n");
+ RANAP_DEBUG("RANAP RAB AssignmentResponse did not contain a setup-or-modified list!\n");
return NULL;
}
@@ -153,6 +152,23 @@
return ies->raB_SetupOrModifiedList.raB_SetupOrModifiedList_ies.list.array[index];
}
+/* Pick the indexed item from the RAB failed list and return a pointer to it */
+static RANAP_IE_t *failed_list_item_from_rab_ass_resp(const RANAP_RAB_AssignmentResponseIEs_t *ies,
+ unsigned int index)
+{
+ /* Make sure we indeed deal with a failed list */
+ if (!(ies->presenceMask & RAB_ASSIGNMENTRESPONSEIES_RANAP_RAB_FAILEDLIST_PRESENT)) {
+ RANAP_DEBUG("RANAP RAB AssignmentResponse did not contain a failed list!\n");
+ return NULL;
+ }
+
+ /* Detect the end of the list */
+ if (index >= ies->raB_FailedList.raB_FailedList_ies.list.count)
+ return NULL;
+
+ return ies->raB_FailedList.raB_FailedList_ies.list.array[index];
+}
+
/* find the RAB specified by rab_id in ies and when found, decode the result into items_ies */
static int decode_rab_smditms_from_resp_ies(RANAP_RAB_SetupOrModifiedItemIEs_t *items_ies,
RANAP_RAB_AssignmentResponseIEs_t *ies, uint8_t rab_id)
@@ -184,6 +200,37 @@
}
}
+/* See comment above decode_rab_smditms_from_resp_ies() */
+static int decode_rab_flitms_from_resp_ies(RANAP_RAB_FailedItemIEs_t *items_ies,
+ RANAP_RAB_AssignmentResponseIEs_t *ies, uint8_t rab_id)
+{
+ RANAP_IE_t *failed_list_ie;
+ RANAP_RAB_FailedItem_t *rab_failed_item;
+ int rc;
+ uint8_t rab_id_decoded;
+ unsigned int index = 0;
+
+ while (1) {
+ failed_list_ie = failed_list_item_from_rab_ass_resp(ies, index);
+ if (!failed_list_ie)
+ return -EINVAL;
+
+ rc = ranap_decode_rab_faileditemies_fromlist(items_ies, &failed_list_ie->value);
+ if (rc < 0)
+ return -EINVAL;
+
+ rab_failed_item = &items_ies->raB_FailedItem;
+ /* The RAB-ID is defined as a bitstring with a size of 8 (1 byte),
+ * See also RANAP-IEs.asn, RAB-ID ::= BIT STRING (SIZE (8)) */
+ rab_id_decoded = rab_failed_item->rAB_ID.buf[0];
+ if (rab_id_decoded == rab_id)
+ return index;
+
+ ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_RAB_FailedItem, items_ies);
+ index++;
+ }
+}
+
/* find the RAB specified by rab_id in ies and when found, decode the result into item */
static int decode_rab_smditms_from_req_ies(RANAP_RAB_SetupOrModifyItemFirst_t *item,
RANAP_RAB_AssignmentRequestIEs_t *ies, uint8_t rab_id)
@@ -477,3 +524,25 @@
return rc;
}
+
+/*! Check if a specific RAB is present in an RAB-Failed-Item-List inside RANAP_RAB_AssignmentResponseIEs.
+ * \ptmap[in] ies user provided memory with RANAP_RAB_AssignmentResponseIEs.
+ * \ptmap[in] rab_id expected rab id to look for.
+ * \returns true when RAB could be identified as failed; false otherwise */
+bool ranap_rab_ass_resp_ies_check_failure(RANAP_RAB_AssignmentResponseIEs_t *ies, uint8_t rab_id)
+{
+ RANAP_RAB_FailedItemIEs_t _rab_failed_items_ies;
+ RANAP_RAB_FailedItemIEs_t *rab_failed_items_ies = &_rab_failed_items_ies;
+ int rc;
+ bool result = true;
+
+ /* If we can get a failed item for the specified RAB ID, then we know that the
+ * HNB reported the RAB Assignment as failed */
+ rc = decode_rab_flitms_from_resp_ies(rab_failed_items_ies, ies, rab_id);
+ if (rc < 0)
+ result = false;
+
+ ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_RAB_FailedItem, rab_failed_items_ies);
+
+ return result;
+}
diff --git a/tests/ranap_rab_ass/ranap_rab_ass_test.c b/tests/ranap_rab_ass/ranap_rab_ass_test.c
index d7bee09..2d1efdf 100644
--- a/tests/ranap_rab_ass/ranap_rab_ass_test.c
+++ b/tests/ranap_rab_ass/ranap_rab_ass_test.c
@@ -269,6 +269,25 @@
ranap_cn_rx_co_free(&message);
}
+void test_ranap_rab_ass_resp_ies_check_failure(void)
+{
+ int rc;
+ ranap_message message;
+ bool rab_failed_at_hnb;
+ uint8_t testvec[] = {
+ 0x60, 0x00, 0x00, 0x11, 0x00, 0x00, 0x01, 0x00,
+ 0x23, 0x40, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x22,
+ 0x40, 0x03, 0x05, 0xd0, 0x00
+ };
+
+ rc = ranap_cn_rx_co_decode(talloc_asn1_ctx, &message, testvec, sizeof(testvec));
+ OSMO_ASSERT(rc == 0);
+ rab_failed_at_hnb =
+ ranap_rab_ass_resp_ies_check_failure(&message.msg.raB_AssignmentResponseIEs, 23);
+ printf("ranap_rab_ass_resp_ies_check_failure rab_failed_at_hnb=%u\n", rab_failed_at_hnb);
+ ranap_cn_rx_co_free(&message);
+}
+
static const struct log_info_cat log_cat[] = {
[DRANAP] = {
.name = "RANAP", .loglevel = LOGL_DEBUG, .enabled = 1,
@@ -329,6 +348,7 @@
test_ranap_rab_ass_resp_extract_inet_addr();
test_ranap_rab_ass_req_replace_inet_addr();
test_ranap_rab_ass_resp_replace_inet_addr();
+ test_ranap_rab_ass_resp_ies_check_failure();
test_cleanup();
return 0;
diff --git a/tests/ranap_rab_ass/ranap_rab_ass_test.ok b/tests/ranap_rab_ass/ranap_rab_ass_test.ok
index 97756cb..3ce997d 100644
--- a/tests/ranap_rab_ass/ranap_rab_ass_test.ok
+++ b/tests/ranap_rab_ass/ranap_rab_ass_test.ok
@@ -14,3 +14,4 @@
before: addr=10.9.1.164, port=1034
ranap_rab_ass_resp_replace_inet_addr rc=0
after: addr=1.2.3.4, port=1234
+ranap_rab_ass_resp_ies_check_failure rab_failed_at_hnb=1
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/27139
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I4319f7caa45ea758ccd792cc8570521df075cf45
Gerrit-Change-Number: 27139
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
iedemam has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/27137 )
Change subject: stats: sanitize tcp stat name identifiers
......................................................................
stats: sanitize tcp stat name identifiers
The identifiers being used in tcp_stats are not friendly
as filenames. This change sanitizes the identifiers
before they are used.
BEFORE: ipa-oml,r=127.0.0.1:45749<->l=127.0.0.1:3002
AFTER: ipa-oml_r_127_0_0_1_45749_-_l_127_0_0_1_3002
Change-Id: Ib04c2f5bfcbd6c19dd87debf1fc053abf0b9bef2
---
M src/stats_tcp.c
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/37/27137/1
diff --git a/src/stats_tcp.c b/src/stats_tcp.c
index dec5b5d..c2694f1 100644
--- a/src/stats_tcp.c
+++ b/src/stats_tcp.c
@@ -123,6 +123,7 @@
osmo_sock_get_name2(stats_tcp_entry->fd->fd));
else
snprintf(stat_name, sizeof(stat_name), "%s", osmo_sock_get_name2(stats_tcp_entry->fd->fd));
+ osmo_identifier_sanitize_buf(stat_name, ":", '_');
osmo_stat_item_group_set_name(stats_tcp_entry->stats_tcp, stat_name);
osmo_stat_item_set(osmo_stat_item_group_get_item(stats_tcp_entry->stats_tcp, STATS_TCP_UNACKED),
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27137
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ib04c2f5bfcbd6c19dd87debf1fc053abf0b9bef2
Gerrit-Change-Number: 27137
Gerrit-PatchSet: 1
Gerrit-Owner: iedemam <michael(a)kapsulate.com>
Gerrit-MessageType: newchange
Attention is currently required from: iedemam, fixeria.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/27134 )
Change subject: stats: add RSL line number to TCP stats name
......................................................................
Patch Set 3:
(1 comment)
File src/input/ipaccess.c:
https://gerrit.osmocom.org/c/libosmo-abis/+/27134/comment/cd93d39e_7f1a8fb9
PS3, Line 346: snprintf(stat_name, sizeof(stat_name), "ipa-rsl-%u", unit_data.trx_id);
Can you try using new_line->num instead?
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/27134
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ie42d8a0cb3757f2d01a4b6d69ea2bcce400b7538
Gerrit-Change-Number: 27134
Gerrit-PatchSet: 3
Gerrit-Owner: iedemam <michael(a)kapsulate.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: iedemam <michael(a)kapsulate.com>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Feb 2022 17:31:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: fixeria, pespin.
iedemam has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/27134 )
Change subject: stats: add RSL line number to TCP stats name
......................................................................
Patch Set 3:
(1 comment)
This change is ready for review.
Patchset:
PS3:
Hi all,
Thanks for the reviews. After some more testing, I saw that the previous approach was not working.
In the two areas where a "ipa-rsl" stat name is created, both were always being set to zero based on the line->num value. Then I discovered that OsmoBSC is only using the one in this latest patch. The other one shown in a previous patch is on the BTS side I guess?
Regardless, now the correct TRX ID is being set for each RSL link in question. Stats emitted by OsmoBSC show the correct IDs.
-Michael
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/27134
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ie42d8a0cb3757f2d01a4b6d69ea2bcce400b7538
Gerrit-Change-Number: 27134
Gerrit-PatchSet: 3
Gerrit-Owner: iedemam <michael(a)kapsulate.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Feb 2022 17:23:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/20622 )
Change subject: ttcn3-bts-test: use osmo-config-merge to generate config files
......................................................................
Patch Set 13:
(2 comments)
Commit Message:
https://gerrit.osmocom.org/c/docker-playground/+/20622/comment/76083a25_534…
PS12, Line 15: Unfortunately, osmo-config-merge is not capable of removing text blocks
: or substituting specific parts, so we fall-back to using sed where it's
: needed.
> one might add some kind of syntax for this in osmo-config-merge at a later point.
Good idea.
Patchset:
PS6:
> > Regarding the patch, I would try to avoid downloading the files with wget, and rather run the conf […]
Done
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/20622
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: If15461240f3037c142c176fc7da745a1701ae3f8
Gerrit-Change-Number: 20622
Gerrit-PatchSet: 13
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Assignee: fixeria <vyanitskiy(a)sysmocom.de>
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>
Gerrit-Comment-Date: Thu, 10 Feb 2022 17:09:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/27135 )
Change subject: ts_31_102: TLV._tlv must point to the class, not an instance
......................................................................
ts_31_102: TLV._tlv must point to the class, not an instance
In Change-Id I6d7c1bf49a8eaf3d8e50fb12888bf3d5b46b6c55 we fixed the
filesystem code to assume the self._tlv memper is a reference to a
class, and not an instance (as this is what the majority of the code
did).
However, it seems thre wer two instances where we actually had _tlv
reference an instance. Change that to class so it's the same all over
the code base.
Change-Id: Ie4878ad6a92feafe47e375c4f5f3f198921e1e95
---
M pySim/ts_31_102.py
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/35/27135/1
diff --git a/pySim/ts_31_102.py b/pySim/ts_31_102.py
index e2ab925..3ae88d3 100644
--- a/pySim/ts_31_102.py
+++ b/pySim/ts_31_102.py
@@ -335,7 +335,7 @@
def __init__(self, fid="4f03", sfid=0x03, name='EF.5GS3GPPNSC', rec_len={57, None},
desc='5GS 3GPP Access NAS Security Context'):
super().__init__(fid, sfid=sfid, name=name, desc=desc, rec_len=rec_len)
- self._tlv = EF_5GS3GPPNSC.FiveGSNasSecurityContext()
+ self._tlv = EF_5GS3GPPNSC.FiveGSNasSecurityContext
# 3GPP TS 31.102 Section 4.4.11.6
class EF_5GAUTHKEYS(TransparentEF):
@@ -351,7 +351,7 @@
def __init__(self, fid='4f05', sfid=0x05, name='EF.5GAUTHKEYS', size={68, None},
desc='5G authentication keys'):
super().__init__(fid, sfid=sfid, name=name, desc=desc, size=size)
- self._tlv = EF_5GAUTHKEYS.FiveGAuthKeys()
+ self._tlv = EF_5GAUTHKEYS.FiveGAuthKeys
# 3GPP TS 31.102 Section 4.4.11.8
class ProtSchemeIdList(BER_TLV_IE, tag=0xa0):
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/27135
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ie4878ad6a92feafe47e375c4f5f3f198921e1e95
Gerrit-Change-Number: 27135
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
Attention is currently required from: laforge, fixeria.
fixeria has uploaded a new patch set (#13) to the change originally created by laforge. ( https://gerrit.osmocom.org/c/docker-playground/+/20622 )
Change subject: ttcn3-bts-test: use osmo-config-merge to generate config files
......................................................................
ttcn3-bts-test: use osmo-config-merge to generate config files
This uses the config files from osmo-ttcn3-hacks.git instead of keeping
local copies around here, which has shown many times will get out of
sync. Extract the original files (*.src.cfg) from the testsuite image
(ttcn3-bts-test) and merge them with the local *.confmerge files using
osmo-config-merge. Use the resulting files (*.gen.cfg).
Unfortunately, osmo-config-merge is not capable of removing text blocks
or substituting specific parts, so we fall-back to using sed where it's
needed. A good example is 'log gsmtap 127.0.0.1', as there is no
command for removing a logging target of such type.
Co-Authored-By: Vadim Yanitskiy <vyanitskiy(a)sysmocom.de>
Co-Authored-By: Oliver Smith <osmith(a)sysmocom.de>
Change-Id: If15461240f3037c142c176fc7da745a1701ae3f8
---
M .gitignore
M ttcn3-bts-test/Makefile
D ttcn3-bts-test/fh/osmo-bsc.cfg
A ttcn3-bts-test/fh/osmo-bsc.confmerge
D ttcn3-bts-test/generic/osmo-bsc.cfg
A ttcn3-bts-test/generic/osmo-bsc.confmerge
D ttcn3-bts-test/generic/osmo-bts.cfg
A ttcn3-bts-test/generic/osmo-bts.confmerge
M ttcn3-bts-test/jenkins.sh
D ttcn3-bts-test/oml/osmo-bts.cfg
A ttcn3-bts-test/oml/osmo-bts.confmerge
D ttcn3-bts-test/virtphy/osmo-bts.cfg
A ttcn3-bts-test/virtphy/osmo-bts.confmerge
13 files changed, 322 insertions(+), 853 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/22/20622/13
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/20622
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: If15461240f3037c142c176fc7da745a1701ae3f8
Gerrit-Change-Number: 20622
Gerrit-PatchSet: 13
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Assignee: fixeria <vyanitskiy(a)sysmocom.de>
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>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: laforge.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/27133 )
Change subject: utils.py: Fix some tuple type annotations
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/27133
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I869b0268383f6babd9b51d0ddfce448a1d2dda1e
Gerrit-Change-Number: 27133
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Thu, 10 Feb 2022 16:40:32 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
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/+/27132
to look at the new patch set (#2).
Change subject: utils.py: type annotations for DataObject related methods
......................................................................
utils.py: type annotations for DataObject related methods
Change-Id: I291a429e9fe9f1a3fd95dcba3020b0e982154c97
---
M pySim/utils.py
1 file changed, 31 insertions(+), 29 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/32/27132/2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/27132
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I291a429e9fe9f1a3fd95dcba3020b0e982154c97
Gerrit-Change-Number: 27132
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: iedemam.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/27134 )
Change subject: stats: add RSL line number to TCP stats name
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/27134
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ie42d8a0cb3757f2d01a4b6d69ea2bcce400b7538
Gerrit-Change-Number: 27134
Gerrit-PatchSet: 2
Gerrit-Owner: iedemam <michael(a)kapsulate.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: iedemam <michael(a)kapsulate.com>
Gerrit-Comment-Date: Thu, 10 Feb 2022 15:57:12 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: pespin.
iedemam has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/27134 )
Change subject: stats: add RSL line number to TCP stats name
......................................................................
Patch Set 2:
(1 comment)
File src/input/ipaccess.c:
https://gerrit.osmocom.org/c/libosmo-abis/+/27134/comment/b060351b_06211bb3
PS1, Line 346: snprintf(stat_name, sizeof(stat_name), "ipa-rsl-%d", line->num);
> num is unsigned, so %u. Same in the other block added below.
true, true
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/27134
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ie42d8a0cb3757f2d01a4b6d69ea2bcce400b7538
Gerrit-Change-Number: 27134
Gerrit-PatchSet: 2
Gerrit-Owner: iedemam <michael(a)kapsulate.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Feb 2022 15:33:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: iedemam.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-abis/+/27134
to look at the new patch set (#2).
Change subject: stats: add RSL line number to TCP stats name
......................................................................
stats: add RSL line number to TCP stats name
Change-Id: Ie42d8a0cb3757f2d01a4b6d69ea2bcce400b7538
---
M src/input/ipaccess.c
1 file changed, 6 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/34/27134/2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/27134
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ie42d8a0cb3757f2d01a4b6d69ea2bcce400b7538
Gerrit-Change-Number: 27134
Gerrit-PatchSet: 2
Gerrit-Owner: iedemam <michael(a)kapsulate.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: iedemam <michael(a)kapsulate.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: iedemam.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/27134 )
Change subject: stats: add RSL line number to TCP stats name
......................................................................
Patch Set 1:
(1 comment)
File src/input/ipaccess.c:
https://gerrit.osmocom.org/c/libosmo-abis/+/27134/comment/609e321c_6e6a52ef
PS1, Line 346: snprintf(stat_name, sizeof(stat_name), "ipa-rsl-%d", line->num);
num is unsigned, so %u. Same in the other block added below.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/27134
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ie42d8a0cb3757f2d01a4b6d69ea2bcce400b7538
Gerrit-Change-Number: 27134
Gerrit-PatchSet: 1
Gerrit-Owner: iedemam <michael(a)kapsulate.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: iedemam <michael(a)kapsulate.com>
Gerrit-Comment-Date: Thu, 10 Feb 2022 15:16:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: laforge.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/27131 )
Change subject: ts_51_011: Fix type annotation for Tuple[int, int]
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/27131
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I7ee1309331902bafab3c9fc6bc33ca713f8c7832
Gerrit-Change-Number: 27131
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Thu, 10 Feb 2022 14:59:47 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: laforge.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/27127 )
Change subject: Better decode of EF.UST, EF.EST and EF.IST
......................................................................
Patch Set 4: Code-Review+1
(1 comment)
File pySim/ts_31_102.py:
https://gerrit.osmocom.org/c/pysim/+/27127/comment/cfcf1ab5_5ec191e6
PS2, Line 536: (int, int)
> I just copid this from ts_51_001.EF_ServiceTable. […]
At least mypy is not happy about this:
test.py:1: error: Syntax error in type annotation
test.py:1: note: Suggestion: Use Tuple[T1, ..., Tn] instead of (T1, ..., Tn)
Found 1 error in 1 file (checked 1 source file)
So I think yes. pylint does not complain though.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/27127
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I34f64d1043698dc385619b2fdda23cb541675f76
Gerrit-Change-Number: 27127
Gerrit-PatchSet: 4
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Thu, 10 Feb 2022 14:59:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment