fix: rename get_users to get_os_users for napalm-device-types 4.7

napalm-device-types 4.7 renamed OSDriver.get_users to get_os_users:
NAPALM's own get_users has another shape and a stub on every driver, so
hasattr could not tell the two apart. BsdDriver now implements
get_os_users with the same return shape and leaves NAPALM's get_users
alone.

Require napalm-device-types>=4.7.1 and bump the version to 0.2.0.
This commit is contained in:
christianmanivong committed 2026-10-13 06:20:00 +00:00
1 parent 2a92ec77e3
commit 1921a3f044
5 files changed
+24 -7

No files matched your search

+1 -1
View File
@@ -460,7 +460,7 @@ class BsdDriver(HostStatusMixin, OSDriver):
# -- accounts, processes, cron -----------------------------------------------
def get_users(self) -> list[dict[str, Any]]:
def get_os_users(self) -> list[dict[str, Any]]:
return parse.users(self._out("cat /etc/passwd"), self._out("cat /etc/group"))
def get_processes(self) -> list[dict[str, Any]]: