FreeBSDDriver mixes in napalm-device-types' LocalAccountsMixin: pw useradd
-m -w no, chpass -p for the password hash, pw lock/unlock and pw groupmod
-d. A locked account carries *LOCKED*, which sshd refuses a key login too
(nuageinit sets UsePAM no, so nothing else would). getpwnam(3) shows the
password field to root only, so the lock is read with getent as root and
only its prefix is looked at. The sudo rule goes to the sudo package's
/usr/local/etc/sudoers.d.
Checked on a FreeBSD 15.1 cloud image with the real driver over SSH and
sudo -S: key login works after adding and after reopening and is refused
after locking, sudo takes the person's password, wheel is left when sudo
is not wanted. OpenBSD is left out for now.
CI pre-installs napalm-device-types from main until the release with
LocalAccountsMixin is on PyPI.
- CI moves to .gitea/workflows/ci.yml and calls the shared driver workflow
of NAPALM/driver-standard; .github/ is gone.
- napalm-device-types >=4.21.1 from PyPI (the README no longer installs
it from git), py.typed, SPDX license string, setuptools>=77, version
floors on the dev extra, Issues and Changelog links on git.netork.io.
- mypy strict for the package; napalm_bsd.base, napalm_bsd.freebsd and
napalm_bsd.openbsd are exempt for now (28 errors, mostly getters typed
as plain dicts rather than the device-types TypedDicts), recorded in the
quality baseline with three complex parsers. parse.py is strict after a
one-line annotation.
- Coverage floor 94 % (measured 94.63 %).