fix: raise when an update reader cannot read, and report host status
CI / test (3.10) (push) Successful in 26s
CI / test (3.11) (push) Successful in 25s
CI / test (3.12) (push) Successful in 26s
CI / test (3.10) (pull_request) Successful in 25s
CI / test (3.11) (pull_request) Successful in 24s
CI / test (3.12) (pull_request) Successful in 26s
CI / test (3.10) (push) Successful in 26s
CI / test (3.11) (push) Successful in 25s
CI / test (3.12) (push) Successful in 26s
CI / test (3.10) (pull_request) Successful in 25s
CI / test (3.11) (pull_request) Successful in 24s
CI / test (3.12) (pull_request) Successful in 26s
netOrk reads an empty update list as "no updates" and closes every patch clock on the host. A refused sudo, a failing pkg, syspatch or freebsd-update, or a pkg database pkg cannot read used to come back as that empty list. Each of these now raises. Only pkg's "is not installed" still means no packages. BsdDriver takes on napalm-device-types' HostStatusMixin. On FreeBSD it reports a host whose installed kernel differs from the running one as needing a reboot (device-types 4.1). OpenBSD stays unknown. Closes #4
This commit is contained in:
@@ -64,10 +64,10 @@ class OpenBSDDriver(BsdDriver):
|
||||
updates: list[dict] = [
|
||||
{**candidate, "origin": None, "security": None}
|
||||
for candidate in parse.pkg_add_candidates(
|
||||
self._out("pkg_add -u -n -v", privileged=True, timeout=300)
|
||||
self._read("pkg_add -u -n -v", privileged=True, timeout=300).stdout
|
||||
)
|
||||
]
|
||||
patches = parse.syspatch(self._out("syspatch -c", privileged=True, timeout=120))
|
||||
patches = parse.syspatch(self._read("syspatch -c", privileged=True, timeout=120).stdout)
|
||||
if patches:
|
||||
installed = parse.syspatch(self._out("syspatch -l", privileged=True))
|
||||
summary = (
|
||||
|
||||
Reference in New Issue
Block a user