Agnostic structure: fix templates, guest profile from the caller, napalm-unix transport #24

Open
opened 2026-10-14 08:58:51 +00:00 by christianmanivong · 1 comment
Owner

What this driver has to change for the agnostic structure (NAPALM/napalm-device-types docs/STRUCTURE.md (NAPALM/napalm-device-types#37), epic NetOrk/netork#1105).

  • run_device_action (fix_snmp, install_lldpd) becomes configure_snmp_agent(settings) and ensure_package(name) (NAPALM/napalm-device-types#33), using napalm-unix's net-snmp steps. Today it overwrites snmpd.conf with rocommunity public, Managed by netOrk, netork@localhost, finds the caller with ss | /sshd/ and opens ufw for its /24 (breaks on IPv6); /tmp/netork_snmpd.conf.
  • get_device_warnings (lldpd_not_installed, updates_available uncapped, no_subscription) goes; facts: installed packages, get_available_updates(), the subscription status string.
  • get_snmp_config: a missing community is missing; ^(ro|rw)?community never matches com2sec, so that branch is dead.
  • Provisioning (NAPALM/napalm-device-types#34): GUEST_AGENTS, network_config and split_compression come from the caller. _GUEST_VM_SETTINGS (ostype, agent, serial) is hypervisor mechanics and stays.
  • REBOOT_SETTLE_SECONDS moves to the application; FULL_UPGRADE stays (driver fact).
  • The five reader hooks (_run_host_status_command, _run_kernel_facts_command, _run_listening_sockets_command, _run_system_identity_command, _run_service_command) become run_command from napalm-unix (NAPALM/napalm-device-types#35). POSIX code done by hand here comes from there: DMI in get_facts (duplicates SystemIdentityMixin), dpkg-query, passwd, ntpq/chrony, lldpcli, ping and traceroute (destination unquoted). There is no privilege layer; the code assumes root.
  • Names on the node, old ones still recognised (else every cached image is downloaded again): /var/lib/vz/template/netork-images, netork-<key>-…. 28 netOrk mentions, 2 issue refs, "The NetOrk Project Authors" in 7 files.
  • _send_command exists for the application's reboot fallback; it goes once reboot_host and run_command cover it. Temperature thresholds (80/95 °C) are policy, but NAPALM requires the keys.

Size: large. Needs: NAPALM/napalm-device-types#33, NAPALM/napalm-device-types#34, NAPALM/napalm-device-types#35.

Prio P3.

What this driver has to change for the agnostic structure (NAPALM/napalm-device-types `docs/STRUCTURE.md` (NAPALM/napalm-device-types#37), epic NetOrk/netork#1105). - `run_device_action` (`fix_snmp`, `install_lldpd`) becomes `configure_snmp_agent(settings)` and `ensure_package(name)` (NAPALM/napalm-device-types#33), using napalm-unix's net-snmp steps. Today it overwrites `snmpd.conf` with `rocommunity public`, `Managed by netOrk`, `netork@localhost`, finds the caller with `ss | /sshd/` and opens ufw for its /24 (breaks on IPv6); `/tmp/netork_snmpd.conf`. - `get_device_warnings` (`lldpd_not_installed`, `updates_available` uncapped, `no_subscription`) goes; facts: installed packages, `get_available_updates()`, the subscription status string. - `get_snmp_config`: a missing community is missing; `^(ro|rw)?community` never matches `com2sec`, so that branch is dead. - Provisioning (NAPALM/napalm-device-types#34): `GUEST_AGENTS`, `network_config` and `split_compression` come from the caller. `_GUEST_VM_SETTINGS` (ostype, agent, serial) is hypervisor mechanics and stays. - `REBOOT_SETTLE_SECONDS` moves to the application; `FULL_UPGRADE` stays (driver fact). - The five reader hooks (`_run_host_status_command`, `_run_kernel_facts_command`, `_run_listening_sockets_command`, `_run_system_identity_command`, `_run_service_command`) become `run_command` from napalm-unix (NAPALM/napalm-device-types#35). POSIX code done by hand here comes from there: DMI in `get_facts` (duplicates `SystemIdentityMixin`), dpkg-query, passwd, ntpq/chrony, lldpcli, ping and traceroute (destination unquoted). There is no privilege layer; the code assumes root. - Names on the node, old ones still recognised (else every cached image is downloaded again): `/var/lib/vz/template/netork-images`, `netork-<key>-…`. 28 netOrk mentions, 2 issue refs, "The NetOrk Project Authors" in 7 files. - `_send_command` exists for the application's reboot fallback; it goes once `reboot_host` and `run_command` cover it. Temperature thresholds (80/95 °C) are policy, but NAPALM requires the keys. Size: large. Needs: NAPALM/napalm-device-types#33, NAPALM/napalm-device-types#34, NAPALM/napalm-device-types#35. Prio P3.
Author
Owner

Status 2026-10-18, checked against the pin on NetOrk/netork main.

Done: Templates (0.3.0, #25); get_licenses() instead of warnings (0.4.0, #26).

Rest:

  • get_snmp_config still defaults to public and reads ^(ro|rw)?community only (system_mixin.py:471).
  • Provisioning and REBOOT_SETTLE_SECONDS (NAPALM/napalm-device-types#34).
  • Reader hooks and hand-written POSIX code → napalm-unix (NAPALM/napalm-device-types#35).
  • Names on the node (/var/lib/vz/template/netork-images, netork-<key>-…), old ones still recognised; 19 netOrk mentions.
  • _send_command for netOrk's reboot fallback (NetOrk/netork#1113).
Status 2026-10-18, checked against the pin on NetOrk/netork main. **Done:** Templates (0.3.0, #25); `get_licenses()` instead of warnings (0.4.0, #26). **Rest:** - `get_snmp_config` still defaults to `public` and reads `^(ro|rw)?community` only (`system_mixin.py:471`). - Provisioning and `REBOOT_SETTLE_SECONDS` (NAPALM/napalm-device-types#34). - Reader hooks and hand-written POSIX code → napalm-unix (NAPALM/napalm-device-types#35). - Names on the node (`/var/lib/vz/template/netork-images`, `netork-<key>-…`), old ones still recognised; 19 netOrk mentions. - `_send_command` for netOrk's reboot fallback (NetOrk/netork#1113).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-proxmox#24