laforge has uploaded this change for review. ( 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(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/32/27132/1
diff --git a/pySim/utils.py b/pySim/utils.py
index 0a9be86..9f47197 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: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
laforge has uploaded this change for review. ( 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(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/33/27133/1
diff --git a/pySim/utils.py b/pySim/utils.py
index 9f47197..325499d 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: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
Attention is currently required from: laforge, daniel.
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27106 )
Change subject: Add hnbgw test
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
To me this looks good. I have the tests running already.
I think it might make sense to squash the whole patchset into one patch. The testsuite is completely new and this patch is only the first patch followed by a series of improvements.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27106
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: I0a2fb795aec83337eda8d9972e6ff264ead61076
Gerrit-Change-Number: 27106
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Feb 2022 14:18:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: fixeria.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/27129 )
Change subject: ts_102_221: Handle nested security condition data objects
......................................................................
Patch Set 2:
(3 comments)
File pySim/ts_102_221.py:
https://gerrit.osmocom.org/c/pysim/+/27129/comment/c04026c1_a6f9d08d
PS1, Line 479: def from_bytes(self, binary:bytes):
> Missing type hint: […]
true for this specific implementation of the abstrac method, but in general i's basically any python type, just as long as it can be json-serialized.
https://gerrit.osmocom.org/c/pysim/+/27129/comment/271bb72c_04830da9
PS1, Line 486: def to_bytes(self):
> Missing type hint: […]
Done
https://gerrit.osmocom.org/c/pysim/+/27129/comment/e762d684_16b80310
PS1, Line 489: ++
> Looks like you meant '+=' here? This could be done simpler: […]
Done
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/27129
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Icb09cf3a90303a86fc77406b8b0806b5c926f1be
Gerrit-Change-Number: 27129
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Feb 2022 14:13:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: fixeria.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/27127
to look at the new patch set (#3).
Change subject: Better decode of EF.UST, EF.EST and EF.IST
......................................................................
Better decode of EF.UST, EF.EST and EF.IST
So far, we only returned an array of service numbers like
[ 2, 4, 5, 9 ] which is not very friendly to the human reader.
In EF.SST we already had more verbose decoding including a description
of each service. Let's add the same principle to EF.UST, EST and IST
The same output above now looks like this:
{
"1": {
"description": "Local Phone Book",
"activated": false
},
"2": {
"description": "Fixed Dialling Numbers (FDN)",
"activated": true
},
"3": {
"description": "Extension 2",
"activated": false
},
"4": {
"description": "Service Dialling Numbers (SDN)",
"activated": true
},
"5": {
"description": "Extension3",
"activated": true
},
"6": {
"description": "Barred Dialling Numbers (BDN)",
"activated": false
},
"7": {
"description": "Extension4",
"activated": false
},
"9": {
"description": "Incoming Call Information (ICI and ICT)",
"activated": true
}
}
Change-Id: I34f64d1043698dc385619b2fdda23cb541675f76
---
M pySim/ts_31_102.py
M pySim/ts_31_103.py
2 files changed, 46 insertions(+), 39 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/27/27127/3
--
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: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: fixeria.
laforge 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 2:
(1 comment)
File pySim/ts_31_102.py:
https://gerrit.osmocom.org/c/pysim/+/27127/comment/b078df5f_bd31840c
PS2, Line 536: (int, int)
> This looks wrong. Should be: […]
I just copid this from ts_51_001.EF_ServiceTable._bit_byte_offset_for_service - I guess it's wrong there, too?
--
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: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Feb 2022 13:52:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: fixeria.
laforge 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 12: Code-Review+1
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/docker-playground/+/20622/comment/f2f194f0_1a4…
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.
--
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: 12
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: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Feb 2022 13:49:37 +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/+/27127 )
Change subject: Better decode of EF.UST, EF.EST and EF.IST
......................................................................
Patch Set 2:
(1 comment)
File pySim/ts_31_102.py:
https://gerrit.osmocom.org/c/pysim/+/27127/comment/554738c8_5bb690fb
PS2, Line 536: (int, int)
This looks wrong. Should be:
Tuple[int, int]
(make sure that you have Tuple imported from typing)
--
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: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Thu, 10 Feb 2022 13:36:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: fixeria.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27124 )
Change subject: Makefile: run $(nproc) parallel jobs for target 'deps'
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27124
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: I53112a20d78d12bcc2764c1fc5567eb26bfa46cc
Gerrit-Change-Number: 27124
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Feb 2022 13:32: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/+/27129 )
Change subject: ts_102_221: Handle nested security condition data objects
......................................................................
Patch Set 1: Code-Review-1
(4 comments)
Patchset:
PS1:
CR-1 due to non-existing '++' operator.
File pySim/ts_102_221.py:
https://gerrit.osmocom.org/c/pysim/+/27129/comment/dd3716c5_a707e707
PS1, Line 479: def from_bytes(self, binary:bytes):
Missing type hint:
-> list
https://gerrit.osmocom.org/c/pysim/+/27129/comment/0930b7e7_ca64a633
PS1, Line 486: def to_bytes(self):
Missing type hint:
-> bytes
https://gerrit.osmocom.org/c/pysim/+/27129/comment/acfaf1d3_640866c6
PS1, Line 489: ++
Looks like you meant '+=' here? This could be done simpler:
encoded = [self.children.encode(e) for e in self.decoded]
return b''.join(encoded)
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/27129
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Icb09cf3a90303a86fc77406b8b0806b5c926f1be
Gerrit-Change-Number: 27129
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 13:22:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/27130 )
Change subject: ts_102_221: Implement proper parsing of EF.DIR
......................................................................
ts_102_221: Implement proper parsing of EF.DIR
EF.DIR can not only contain the AID + Label of TS 102 221, but can
also contain any of the DOs specified in ISO7816-4. Let's imoplement
this based on the modern pySim.tlv parser
Change-Id: I875eb49e1f0370428c2eae69af84f5483bd5b1fc
Closes: OS#5410
---
A pySim/iso7816_4.py
M pySim/ts_102_221.py
2 files changed, 76 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/30/27130/1
diff --git a/pySim/iso7816_4.py b/pySim/iso7816_4.py
new file mode 100644
index 0000000..ea838cf
--- /dev/null
+++ b/pySim/iso7816_4.py
@@ -0,0 +1,62 @@
+# coding=utf-8
+"""Utilities / Functions related to ISO 7816-4
+
+(C) 2022 by Harald Welte <laforge(a)osmocom.org>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+"""
+
+from construct import *
+from pySim.construct import *
+from pySim.utils import *
+from pySim.filesystem import *
+from pySim.tlv import *
+
+# Table 91 + Section 8.2.1.2
+class ApplicationId(BER_TLV_IE, tag=0x4f):
+ _construct = GreedyBytes
+
+# Table 91
+class ApplicationLabel(BER_TLV_IE, tag=0x50):
+ _construct = GreedyBytes
+
+# Table 91 + Section 5.3.1.2
+class FileReference(BER_TLV_IE, tag=0x51):
+ _construct = GreedyBytes
+
+# Table 91
+class CommandApdu(BER_TLV_IE, tag=0x52):
+ _construct = GreedyBytes
+
+# Table 91
+class DiscretionaryData(BER_TLV_IE, tag=0x53):
+ _construct = GreedyBytes
+
+# Table 91
+class DiscretionaryTemplate(BER_TLV_IE, tag=0x73):
+ _construct = GreedyBytes
+
+# Table 91 + RFC1738 / RFC2396
+class URL(BER_TLV_IE, tag=0x5f50):
+ _construct = GreedyString('ascii')
+
+# Table 91
+class ApplicationRelatedDOSet(BER_TLV_IE, tag=0x61):
+ _construct = GreedyBytes
+
+# Section 8.2.1.3 Application Template
+class ApplicationTemplate(BER_TLV_IE, tag=0x61, nested=[ApplicationId, ApplicationLabel, FileReference,
+ CommandApdu, DiscretionaryData, DiscretionaryTemplate,URL,
+ ApplicationRelatedDOSet]):
+ pass
diff --git a/pySim/ts_102_221.py b/pySim/ts_102_221.py
index 88855bf..d35ebe1 100644
--- a/pySim/ts_102_221.py
+++ b/pySim/ts_102_221.py
@@ -22,10 +22,12 @@
from pySim.construct import *
from pySim.utils import *
from pySim.filesystem import *
+from pySim.tlv import *
from bidict import bidict
from pySim.profile import CardProfile
from pySim.profile import match_uicc
from pySim.profile import match_sim
+import pySim.iso7816_4 as iso7816_4
# A UICC will usually also support 2G functionality. If this is the case, we
# need to add DF_GSM and DF_TELECOM along with the UICC related files
@@ -504,18 +506,20 @@
# TS 102 221 Section 13.1
class EF_DIR(LinFixedEF):
+ class ApplicationLabel(BER_TLV_IE, tag=0x50):
+ # TODO: UCS-2 coding option as per Annex A of TS 102 221
+ _construct = GreedyString('ascii')
+
+ class ApplicationTemplate(BER_TLV_IE, tag=0x61,
+ nested=[iso7816_4.ApplicationId, ApplicationLabel, iso7816_4.FileReference,
+ iso7816_4.CommandApdu, iso7816_4.DiscretionaryData,
+ iso7816_4.DiscretionaryTemplate, iso7816_4.URL,
+ iso7816_4.ApplicationRelatedDOSet]):
+ pass
+
def __init__(self, fid='2f00', sfid=0x1e, name='EF.DIR', desc='Application Directory'):
super().__init__(fid, sfid=sfid, name=name, desc=desc, rec_len={5,54})
-
- def _decode_record_hex(self, raw_hex_data):
- raw_hex_data = raw_hex_data.upper()
- atempl_base_tlv = TLV(['61'])
- atempl_base = atempl_base_tlv.parse(raw_hex_data)
- atempl_TLV_MAP = {'4F': 'aid_value', 50:'label'}
- atempl_tlv = TLV(atempl_TLV_MAP)
- atempl = atempl_tlv.parse(atempl_base['61'])
- # FIXME: "All other Dos are according to ISO/IEC 7816-4"
- return tlv_key_replace(atempl_TLV_MAP, atempl)
+ self._tlv = EF_DIR.ApplicationTemplate
# TS 102 221 Section 13.2
class EF_ICCID(TransparentEF):
--
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: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
Hello laforge, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/docker-playground/+/26681
to look at the new patch set (#10).
Change subject: ttcn3-bts-test: move generic config files into a directory
......................................................................
ttcn3-bts-test: move generic config files into a directory
Change-Id: I1bc5c51306525c6829e9d8e2991555a99c9b49a2
---
M ttcn3-bts-test/Dockerfile
R ttcn3-bts-test/generic/BTS_Tests.cfg
R ttcn3-bts-test/generic/osmo-bsc.cfg
R ttcn3-bts-test/generic/osmo-bts.cfg
M ttcn3-bts-test/jenkins.sh
5 files changed, 5 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/81/26681/10
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/26681
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I1bc5c51306525c6829e9d8e2991555a99c9b49a2
Gerrit-Change-Number: 26681
Gerrit-PatchSet: 10
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: osmith, laforge.
fixeria has uploaded a new patch set (#11) 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/Dockerfile
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
14 files changed, 323 insertions(+), 854 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/22/20622/11
--
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: 11
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: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: daniel.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27120 )
Change subject: hnbgw: Test RAB Assignment ReleaseRequest
......................................................................
Patch Set 1:
(1 comment)
File hnbgw/HNBGW_Tests.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27120/comment/04765f13_cbf0…
PS1, Line 904: alt {
This was already in some previous patch. It probably makes sense to put it in a function or an altstep.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27120
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: I90d4b1d335a32ab6e2590616149f3a34825d2046
Gerrit-Change-Number: 27120
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Feb 2022 13:02:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: daniel.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27119 )
Change subject: ranap: Add templates for RAB Assignment ReleaseRequest
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27119
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: Ie22253c84651119c4da91053eb4d79ad8f4abe7d
Gerrit-Change-Number: 27119
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Feb 2022 13:01:23 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: daniel.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27118 )
Change subject: hnbgw: Match on connection IP/port in CRCX/MDCX
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27118
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: I465a677a29bf4e7a95245d480a241bd840eea75f
Gerrit-Change-Number: 27118
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Feb 2022 13:00:56 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: daniel.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27117 )
Change subject: MGCP_Templates: Add receive templates for SDP and use those in {CR,MD}CX
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27117
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: Ibc46888b1b7913d399c79ab735841844ff0487ad
Gerrit-Change-Number: 27117
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Feb 2022 13:00:30 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: daniel.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27116 )
Change subject: hnbgw: Use helper function for the rab assignment
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
File hnbgw/HNBGW_Tests.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27116/comment/003f18b9_95d2…
PS1, Line 168: }
This looks like it should have been fixed in some earlier patch.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27116
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: I95625796ee3c75e36637794018e5db27d022dddb
Gerrit-Change-Number: 27116
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Feb 2022 12:59:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: daniel.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27115 )
Change subject: hnbgw: Check for DLCX on Iu Release as well
......................................................................
Patch Set 1:
(1 comment)
File hnbgw/HNBGW_Tests.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27115/comment/ddda05eb_c1de…
PS1, Line 844: repeat;
You could probably simply do
count := count +1;
if (count == 1)
repeat;
and drop one of the alts. Not a big problem though.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27115
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: Id53e99e51dbc6b9af67503ba6ecbc8990a7de4c9
Gerrit-Change-Number: 27115
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Feb 2022 12:58:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: daniel.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27114 )
Change subject: hnbgw: First working RAB Assignment
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
File hnbgw/HNBGW_Tests.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27114/comment/0dbbd6e9_8bb3…
PS1, Line 574: /* build a RANAP RAB AssignmentRespons based on the TestHdlrParams */
Response
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27114
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: I5eae9f23ba6cf5e85a7daa025c4672c0a02031ca
Gerrit-Change-Number: 27114
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Feb 2022 12:56:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: daniel.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27113 )
Change subject: ranap: Add more RAB-related templates
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
File library/ranap/RANAP_Templates.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27113/comment/a35e4d3c_d615…
PS1, Line 1345: criticality := ignore,
this looks like a different patch, but fine anyway.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27113
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: I363428ab4af869bb1aa4470b33fa52366cbda8b4
Gerrit-Change-Number: 27113
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Feb 2022 12:53:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: daniel.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27112 )
Change subject: hnbgw: Connect MGCP ports in f_start_handler_create
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27112
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: I0c9c0c84bc38abded319581eae46807f0294115e
Gerrit-Change-Number: 27112
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Feb 2022 12:52:34 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: daniel.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27111 )
Change subject: hnbgw: Add tests for Iuh->Iu disconnect
......................................................................
Patch Set 1:
(1 comment)
File library/RUA_Emulation.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27111/comment/e668a46a_753d…
PS1, Line 59: RUA_Conn_Req,
Sounds like you want to introduce a RUA_PDU?
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27111
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: I8c1858382483af94542af9eb6977d360f26fdaef
Gerrit-Change-Number: 27111
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Feb 2022 12:52:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Hello laforge, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/docker-playground/+/26681
to look at the new patch set (#9).
Change subject: ttcn3-bts-test: move generic config files into a directory
......................................................................
ttcn3-bts-test: move generic config files into a directory
Change-Id: I1bc5c51306525c6829e9d8e2991555a99c9b49a2
---
R ttcn3-bts-test/generic/BTS_Tests.cfg
R ttcn3-bts-test/generic/osmo-bsc.cfg
R ttcn3-bts-test/generic/osmo-bts.cfg
M ttcn3-bts-test/jenkins.sh
4 files changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/81/26681/9
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/26681
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I1bc5c51306525c6829e9d8e2991555a99c9b49a2
Gerrit-Change-Number: 26681
Gerrit-PatchSet: 9
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: osmith, laforge.
fixeria has uploaded a new patch set (#10) 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. Download the original files using wget (*.src.cfg) and merge them
with the local *.confmerge files using osmo-config-merge (*.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.
Change-Id: If15461240f3037c142c176fc7da745a1701ae3f8
---
M .gitignore
M ttcn3-bts-test/Dockerfile
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
14 files changed, 323 insertions(+), 854 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/22/20622/10
--
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: 10
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: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: osmith, laforge.
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 9:
(2 comments)
File ttcn3-bts-test/Makefile:
https://gerrit.osmocom.org/c/docker-playground/+/20622/comment/b204a4d6_efb…
PS9, Line 24: FORCE_FETCH:
> FORCE_FETCH is not needed, cfg above is already a phony target. […]
If I remove FORCE_FETCH, make says:
make: Nothing to be done for 'cfg'.
even if I change original files in the image. So we better keep it.
File ttcn3-bts-test/jenkins.sh:
https://gerrit.osmocom.org/c/docker-playground/+/20622/comment/8e9ac5aa_cf3…
PS6, Line 139: cp osmo-bsc-generic.gen.cfg $VOL_BASE_DIR/bsc/
> Ah right, I did not not see that... but still, it needs to be […]
I see the problem now. It did not affect my tests because the next patch fixes it (renames 'osmo-bsc-generic.gen.cfg' to 'generic/osmo-bsc.gen.cfg'). Let's just rebase this patch on top of I1bc5c51306525c6829e9d8e2991555a99c9b49a2.
--
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: 9
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: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Thu, 10 Feb 2022 12:25:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: daniel.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27109 )
Change subject: RAN_Emulation: Add f_ran_register_exp()
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27109
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: I9d38dbdf589ed0f5999a5aeeb31b10ca5d07de16
Gerrit-Change-Number: 27109
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Feb 2022 12:21:25 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: daniel.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27108 )
Change subject: RAN_Emulation: Don't decode L3 if g_ran_ops.decode_dtap == false
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27108
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: I04a9197ac0b68c2dcb7542d035dc70c9f2b90473
Gerrit-Change-Number: 27108
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Feb 2022 12:20:29 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: daniel.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27107 )
Change subject: Iuh_Emulation: Introduce Iuh_ConnHdlr component type
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27107
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: Icbffedceb65f791306fde74f3bc5b8fe964148b9
Gerrit-Change-Number: 27107
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Feb 2022 12:18:55 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/27127
to look at the new patch set (#2).
Change subject: Better decode of EF.UST, EF.EST and EF.IST
......................................................................
Better decode of EF.UST, EF.EST and EF.IST
So far, we only returned an array of service numbers like
[ 2, 4, 5, 9 ] which is not very friendly to the human reader.
In EF.SST we already had more verbose decoding including a description
of each service. Let's add the same principle to EF.UST, EST and IST
The same output above now looks like this:
{
"1": {
"description": "Local Phone Book",
"activated": false
},
"2": {
"description": "Fixed Dialling Numbers (FDN)",
"activated": true
},
"3": {
"description": "Extension 2",
"activated": false
},
"4": {
"description": "Service Dialling Numbers (SDN)",
"activated": true
},
"5": {
"description": "Extension3",
"activated": true
},
"6": {
"description": "Barred Dialling Numbers (BDN)",
"activated": false
},
"7": {
"description": "Extension4",
"activated": false
},
"9": {
"description": "Incoming Call Information (ICI and ICT)",
"activated": true
}
}
Change-Id: I34f64d1043698dc385619b2fdda23cb541675f76
---
M pySim/ts_31_102.py
M pySim/ts_31_103.py
2 files changed, 45 insertions(+), 39 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/27/27127/2
--
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: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset