driver / lint (pull_request) Successful in 12s
driver / standard (pull_request) Successful in 15s
driver / types (pull_request) Successful in 1m4s
driver / test (3.13) (pull_request) Successful in 1m5s
driver / test (3.12) (pull_request) Successful in 1m11s
driver / lowest (pull_request) Successful in 30s
driver / build (pull_request) Successful in 28s
driver / security (pull_request) Successful in 56s
CI / driver (pull_request) Successful in 2m16s
driver / publish (pull_request) Skipped
BsdDriver mixes in napalm-device-types' SshServerAuthMixin: get_ssh_server_auth() reads sshd -T as root and, on FreeBSD, the modules of sshd's PAM auth stack. The floor on napalm-device-types rises to 4.32.0, the release that brings the mixin. Refs NetOrk/netork#662
9.1 KiB
9.1 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
Added
get_ssh_server_auth()on FreeBSD and OpenBSD, through napalm-device-types'SshServerAuthMixin(4.32.0): whether sshd takes passwords, keyboard-interactive or keys, itsAuthenticationMethods,PermitRootLoginand, on FreeBSD, the modules of sshd's PAMauthstack. Needs root forsshd -T(NetOrk/netork#662).- Personal accounts on FreeBSD follow what the person changes (NetOrk/netork#2013):
add_local_account(..., replaces=[...])takes the old keys out of the account's key files as the new one goes in,remove_local_account_keystakes deleted keys out and leaves the account open, andadd_local_account(..., clear_password=True)removes the password (chpass -p '*'): the account logs in with its key only and has no sudo. Keys the person added on the host stay. - A deleted key can take the password with it on FreeBSD (NetOrk/netork#2033): through
napalm-device-types'
remove_local_account_keys(..., clear_password=True)the keys go as the person, the password goes (chpass -p '*'), and so do the sudo rule andwheel. The account stays open.
Changed
- Needs napalm-device-types 4.29.0.
Added
- Scheduled jobs on FreeBSD and OpenBSD (NetOrk/netork#1933, #27), through
napalm-device-types'
PosixScheduledJobsMixin:get_scheduled_jobs()reads/etc/crontaband the user crontabs in/var/cron/tabs, on FreeBSD also/etc/cron.d,/usr/local/etc/cron.dand everyperiodicscript in/etc/periodicand/usr/local/etc/periodic(kind="periodic", enabled by itsperiodic.confknob), in one round trip as root;manage_scheduled_job()enables, disables or runs one now (a periodic script bysysrc -f /etc/periodic.conf);put_scheduled_job()anddelete_scheduled_job()write and remove an application's own job: a file in/etc/cron.don FreeBSD, marked lines in the user's crontab on OpenBSD. Another user's job runs throughsu -mwith its script on/bin/sh's stdin, as neither BSD'ssutakes a shell. - netOrk's own account with a fixed uid on FreeBSD (NetOrk/netork#1817):
_account_create_with_uidmakes it withpw useradd -u <uid> -m -w no. - Personal accounts on FreeBSD (NetOrk/netork#1793), through napalm-device-types'
LocalAccountsMixin:get_local_accounts(),add_local_account()andlock_local_account()withpw useradd -m -w no,chpass -pfor the password hash,pw lock/pw unlockandpw groupmod -d. A locked account carries*LOCKED*, which sshd refuses a key login too; the sudo rule goes to/usr/local/etc/sudoers.d. Checked on FreeBSD 15.1 over SSH with sudo -S (sshd withUsePAM no, as nuageinit sets it). OpenBSD does not offer it yet. Requires the napalm-device-types release withLocalAccountsMixin.
Changed
- The floor on napalm-device-types is 4.26.0, the first release with what this driver
uses (
PosixScheduledJobsMixin). - Python 3.12 is the floor (
requires-python = ">=3.12"): netOrk runs every driver on 3.12, so 3.10 and 3.11 are no longer tested (NAPALM/driver-standard#6). - The floor on napalm is 5.1: older releases import
pkg_resources, which a Python 3.12 venv no longer has.
Fixed
- An OpenBSD host no longer reads as 100 % busy (#7). net-snmp on OpenBSD answers
ssCpuIdlewith 0 on an idle machine, soOpenBSDDriverdeclares the CPU unknown in itsSNMP_HEALTH_PROFILE({"cpu": {"unknown": True}}), and the application reports no CPU figure. Memory, swap and load are read as before. Requires the napalm-device-types release withSnmpValueSpec.unknown. - FreeBSD and OpenBSD hosts are in the role
bsd, one key for both (#10). They inheritedOSDriver'slinux, so an application that shows or branches on the role treated them as Linux hosts. An application that keys onlinuxfor every general-purpose host has to acceptbsdas well. get_listening_sockets()raises when the reading without root fails as well (sockstaton FreeBSD,netstaton OpenBSD). It returned an empty list, which read as a host where every port had closed.get_arp_table()reports an unknown age as-1.0(napalm-device-types'ARP_AGE_UNKNOWN). It reported the time until the entry expires (FreeBSD'sexpires in N seconds, OpenBSD'sExpirecolumn), which is no age: an entry refreshed a second ago looked 20 minutes old (NetOrk/netork#1327).
Removed
get_cron_jobs(): it read the system crontab and the login user's own only, without root, and missed/etc/cron.d, every other user and FreeBSD's periodic scripts.get_scheduled_jobs()replaces it.
[0.5.0] - 2026-10-23
The first release on PyPI.
Changed
- The drivers follow the NAPALM driver standard
(https://git.netork.io/NAPALM/driver-standard): CI on Gitea runs ruff, mypy, the
tests on Python 3.10–3.13 and at the lowest declared versions, bandit, pip-audit and
a build check, and a release tag publishes to PyPI. The package now ships
py.typed. Python 3.10 stays the floor. napalm-device-types now comes from PyPI, 4.21.1 or later.
Security
- The SSH host key is verified (NetOrk/netork#1167).
open()takes the key to expect fromoptional_args["ssh_host_key"]and refuses any other one before it logs in (SshHostKeyMismatch); without one it accepts the first key. Every key it sees goes tooptional_args["ssh_host_key_observer"]. Replaces paramiko'sAutoAddPolicy. Requires napalm-device-types 4.19.0; version 0.4.0.
[0.3.0] - 2026-10-17
Changed
- Breaking:
run_device_action("fix_snmp")is gone. The drivers implement napalm-device-types 4.13'sconfigure_snmp_agent(settings)template instead, and the caller supplies every value: onerocommunityline per allowed source, contact and location as given. No community, contact or location of an application is built in any more. pf and ipfw rules are left to the operator. Requires napalm-device-types 4.13.0 or later. get_snmp_configno longer assumes the communitypublicwhen the file names none.
Added
get_management_peer(): the address the host sees the SSH connection come from.ensure_package(name)from the base package.
[0.2.1] - 2026-10-16
Fixed
- A sudo password no longer ends up in
snmpd.conf.run_commandsent the password and the data on the same stdin, and a sudo that does not prompt (NOPASSWD, a cached timestamp) left the password forcat, which wrote it as the first line of a file then made world-readable (#8).run_commandnow refuses stdin to a privileged command while a sudo password is set, andfix_snmpstages the configuration without privilege before root installs it, without following a symlink at the target.
[0.2.0] - 2026-10-13
Changed
get_usersis nowget_os_users, as napalm-device-types 4.7 names it onOSDriver; the return shape is unchanged. NAPALM's ownget_usershas another shape and a stub on every driver, so a poll askinghasattrcould not tell the two apart. Requires napalm-device-types 4.7.1 or later.
[0.1.0]
Added
FreeBSDDriver(freebsd) andOpenBSDDriver(openbsd) on a sharedBsdDriver: SSH over exec channels (no PTY, real exit codes), root throughsudo -Swith the password on stdin.- Read side (NetOrk/netork#798): facts (SMBIOS through
kenvon FreeBSD,hw.*sysctls on OpenBSD; uptime fromkern.boottime), interfaces and their addresses (ifconfig -a), routes (netstat -rn), ARP (arp -an), users and groups, processes (ps … lstart), cron jobs (system crontab and the login user's). get_listening_sockets()in the shape ofListeningSocketsMixin: FreeBSD throughsockstat, OpenBSD throughfstatas root andnetstat -anwithout, which the reading reports asattributed: False.- Packages:
get_packages,install_package,uninstall_package. FreeBSD's install bootstraps pkg on a classic system that never had it. - Updates:
get_available_updates, with VuXML's verdict assecurityon FreeBSD and base-system patches as onebase-systementry (OpenBSDsyspatch, classic FreeBSDfreebsd-update). A reader that cannot read raises instead of returning no updates (#4). - Services:
get_servicesandmanage_service(start, stop, restart, enable, disable) throughserviceandrcctl. - SNMP:
run_device_action("fix_snmp")installs net-snmp, writes the same configuration netOrk uses on Linux, starts the agent and asks it for sysDescr;get_snmp_configreports a running agent's community and port. get_host_status(napalm-device-types'HostStatusMixin): on FreeBSD, "reboot required" when the installed kernel differs from the running one.first_boot_pending(): whether a FreeBSD host is still in its first boot (/firstboot), so netOrk can wait before setting up a new VM (NetOrk/netork#795).- Parsers tested on output recorded from FreeBSD 15.1 (hand-installed and cloud image) and OpenBSD 7.9 (NetOrk/netork#793).