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:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user