Attention is currently required from: fixeria.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37463?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: {sctp,s1ap}_proxy: employ E-RAB FSMs
......................................................................
{sctp,s1ap}_proxy: employ E-RAB FSMs
Change-Id: Ibb7e25ab3adbadd7fd85e9cb22e0136c6ca133cf
---
M src/s1ap_proxy.erl
M src/sctp_proxy.erl
M test/s1ap_proxy_test.erl
3 files changed, 168 insertions(+), 93 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/63/37463/3
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37463?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: Ibb7e25ab3adbadd7fd85e9cb22e0136c6ca133cf
Gerrit-Change-Number: 37463
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37452?usp=email )
Change subject: transport: Implement treatment of 62xx and 63xx warning/error responses
......................................................................
transport: Implement treatment of 62xx and 63xx warning/error responses
TS 102 221 specifies that (in case of a class 4 command) and as SW
62xx or 63xx, we should send a GET RESPONSE just like in the 61xx
case in order to get the respective response.
As we don't really know if it's a case1/2/3/4 command in the
pySim.transport, let's always send the GET RESPONSE in case SW 62xx or
63xx are received. It shouldn't hurt - in the worst case there's no
response available...
Change-Id: Ibb1398194a16fc1f1f9bc46af6c66fb6575240cd
---
M pySim/transport/__init__.py
1 file changed, 23 insertions(+), 2 deletions(-)
Approvals:
osmith: Looks good to me, but someone else must approve
fixeria: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/pySim/transport/__init__.py b/pySim/transport/__init__.py
index 5ae9428..59067b3 100644
--- a/pySim/transport/__init__.py
+++ b/pySim/transport/__init__.py
@@ -130,6 +130,7 @@
data : string (in hex) of returned data (ex. "074F4EFFFF")
sw : string (in hex) of status word (ex. "9000")
"""
+ prev_pdu = pdu
data, sw = self.send_apdu_raw(pdu)
# When we have sent the first APDU, the SW may indicate that there are response bytes
@@ -137,15 +138,17 @@
# xx is the number of response bytes available.
# See also:
if sw is not None:
- while ((sw[0:2] == '9f') or (sw[0:2] == '61')):
+ while (sw[0:2] in ['9f', '61', '62', '63']):
# SW1=9F: 3GPP TS 51.011 9.4.1, Responses to commands which are correctly executed
# SW1=61: ISO/IEC 7816-4, Table 5 — General meaning of the interindustry values of SW1-SW2
+ # SW1=62: ETSI TS 102 221 7.3.1.1.4 Clause 4b): 62xx, 63xx, 9xxx != 9000
pdu_gr = pdu[0:2] + 'c00000' + sw[2:4]
+ prev_pdu = pdu_gr
d, sw = self.send_apdu_raw(pdu_gr)
data += d
if sw[0:2] == '6c':
# SW1=6C: ETSI TS 102 221 Table 7.1: Procedure byte coding
- pdu_gr = pdu[0:8] + sw[2:4]
+ pdu_gr = prev_pdu[0:8] + sw[2:4]
data, sw = self.send_apdu_raw(pdu_gr)
return data, sw
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37452?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ibb1398194a16fc1f1f9bc46af6c66fb6575240cd
Gerrit-Change-Number: 37452
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: merged
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/37496?usp=email )
Change subject: pySim.esim.http_json_api: 'header' is not always present in response
......................................................................
pySim.esim.http_json_api: 'header' is not always present in response
For example, the ES9+ handleNotification function is defined with an
empty response body, so we cannot unconditionally assume that every HTTP
response will contain a JSON "header" value.
Change-Id: Ia3c5703b746c1eba91f85f8545f849a3f2d56e0b
---
M pySim/esim/http_json_api.py
1 file changed, 25 insertions(+), 9 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/96/37496/1
diff --git a/pySim/esim/http_json_api.py b/pySim/esim/http_json_api.py
index 377faea..9c9349d 100644
--- a/pySim/esim/http_json_api.py
+++ b/pySim/esim/http_json_api.py
@@ -204,16 +204,17 @@
return output
def decode(self, data: dict) -> dict:
- """[further] Decode and validate the JSON-Dict of the respnse body."""
+ """[further] Decode and validate the JSON-Dict of the response body."""
output = {}
- # let's first do the header, it's special
- if not 'header' in data:
- raise ValueError('Mandatory output parameter "header" missing')
- hdr_class = self.output_params.get('header')
- output['header'] = hdr_class.decode(data['header'])
+ if 'header' in self.output_params:
+ # let's first do the header, it's special
+ if not 'header' in data:
+ raise ValueError('Mandatory output parameter "header" missing')
+ hdr_class = self.output_params.get('header')
+ output['header'] = hdr_class.decode(data['header'])
- if output['header']['functionExecutionStatus']['status'] not in ['Executed-Success','Executed-WithWarning']:
- raise ApiError(output['header']['functionExecutionStatus'])
+ if output['header']['functionExecutionStatus']['status'] not in ['Executed-Success','Executed-WithWarning']:
+ raise ApiError(output['header']['functionExecutionStatus'])
# we can only expect mandatory parameters to be present in case of successful execution
for p in self.output_mandatory:
if p == 'header':
@@ -253,4 +254,6 @@
if not response.headers.get('X-Admin-Protocol', 'gsma/rsp/v2.unknown').startswith('gsma/rsp/v2.'):
raise HttpHeaderError(response)
- return self.decode(response.json())
+ if response.content:
+ return self.decode(response.json())
+ return None
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37496?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ia3c5703b746c1eba91f85f8545f849a3f2d56e0b
Gerrit-Change-Number: 37496
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange