refactor(warnings): report raw signal only, no severity/presentation

get_device_warnings() now returns only {code, meta} — severity, title,
message, and action are resolved centrally by netork's
WARNING_CATALOG (netork/core/device_warnings.py), not by the driver.
Keeps this driver independent of netork and avoids per-vendor drift in
how the same warning code is presented.
This commit is contained in:
Christian Manivong
2026-07-20 09:47:39 +02:00
parent 2f049338b5
commit 661d56074c
-4
View File
@@ -1052,8 +1052,6 @@ class LinuxDriver(OSDriver):
if updates: if updates:
warnings.append({ warnings.append({
"code": "updates_available", "code": "updates_available",
"severity": "warning",
"action": None,
"meta": { "meta": {
"count": len(updates), "count": len(updates),
"packages": [u.get("name", "") for u in updates], "packages": [u.get("name", "") for u in updates],
@@ -1065,8 +1063,6 @@ class LinuxDriver(OSDriver):
if self._apt_proxy_url not in current: if self._apt_proxy_url not in current:
warnings.append({ warnings.append({
"code": "apt_proxy_missing", "code": "apt_proxy_missing",
"severity": "warning",
"action": "fix_apt_proxy",
"meta": {"expected_url": self._apt_proxy_url}, "meta": {"expected_url": self._apt_proxy_url},
}) })
except Exception as exc: except Exception as exc: