get_device_warnings reports facts: the configured apt proxy, not apt_proxy_missing #28

Closed
opened 2026-10-14 08:22:58 +00:00 by christianmanivong · 0 comments
Owner

get_device_warnings (linux.py ~1473) makes two decisions that belong to the application:

  • apt_proxy_missing: it compares /etc/apt/apt.conf.d/00proxy with the application's apt-cacher URL, passed in as an argument.
  • updates_available: it calls get_available_updates() again, and any update at all is a warning. The application drops that sample and rebuilds the warning from its own read (poll/_updates.py _replace_update_warning). On dnf/yum hosts this costs two extra privileged check-update/updateinfo runs per poll.

Change: report the configured package proxy as a fact (e.g. in get_host_status or a get_package_proxy() reader) and drop both warnings.

Part of NetOrk/netork#1105. Plan: NAPALM/napalm-device-types docs/STRUCTURE.md (branch docs/structure-plan).

Prio P3.

`get_device_warnings` (`linux.py` ~1473) makes two decisions that belong to the application: - `apt_proxy_missing`: it compares `/etc/apt/apt.conf.d/00proxy` with the application's apt-cacher URL, passed in as an argument. - `updates_available`: it calls `get_available_updates()` again, and any update at all is a warning. The application drops that sample and rebuilds the warning from its own read (`poll/_updates.py` `_replace_update_warning`). On dnf/yum hosts this costs two extra privileged `check-update`/`updateinfo` runs per poll. **Change:** report the configured package proxy as a fact (e.g. in `get_host_status` or a `get_package_proxy()` reader) and drop both warnings. Part of NetOrk/netork#1105. Plan: NAPALM/napalm-device-types `docs/STRUCTURE.md` (branch `docs/structure-plan`). Prio P3.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-linux#28