net-sim: skip files missing on the card; /api/write accepts a full path

Live-testing against a UICC without the EPS files (no USIM service 85)
and without the Kc files showed the runner aborting when EPSLOCI/Kc were
absent.  write_binary/write_record now take an 'optional' flag: a missing
candidate file is logged as a skip step instead of failing the scenario
(store_epsnsc, real/dummy locations, churn and Kc writes).  Also allow
POST /api/write to select by 'path' like /api/select and /api/read (the
netsim live test needed it to restore the captured file values).
This commit is contained in:
2026-09-19 22:53:24 +03:00
parent 0d92ea8f24
commit 99183acc89
4 changed files with 66 additions and 16 deletions
+6 -2
View File
@@ -3706,6 +3706,7 @@ class PysimHandler(BaseHTTPRequestHandler):
parent_sel = body.get('parent_sel')
parent_path = body.get('parent_path')
allow_probe = bool(body.get('allow_probe'))
path = body.get('path')
rs = app.rs
if not rs:
self._send_json({'error': _err('no_card_state', lang)}, 503)
@@ -3714,8 +3715,11 @@ class PysimHandler(BaseHTTPRequestHandler):
lchan = rs.lchan[0]
cleanup = None
try:
sel = fid if fid else name
_, cleanup = _select_with_parent(lchan, sel, parent_sel, app, parent_path, allow_probe)
if path:
_, cleanup = _select_path(lchan, path, app)
else:
sel = fid if fid else name
_, cleanup = _select_with_parent(lchan, sel, parent_sel, app, parent_path, allow_probe)
ft = _get_file_type(lchan, lchan.selected_file)
is_record = ft in ('linear_fixed', 'cyclic')
if record_nr: