diff --git a/napalm_linux/linux.py b/napalm_linux/linux.py index 1c07142..07b9377 100644 --- a/napalm_linux/linux.py +++ b/napalm_linux/linux.py @@ -1019,7 +1019,7 @@ class LinuxDriver(OSDriver): success = not any(kw in low for kw in ("error:", "failed", "not found", "is not installed", "no packages")) return {"success": success, "output": raw.strip()} - def get_pending_updates(self) -> list[UpdateDict]: + def get_available_updates(self) -> list[UpdateDict]: if self._pkg_manager == "apt": return self._get_updates_apt() if self._pkg_manager in ("dnf", "yum"): @@ -1032,10 +1032,6 @@ class LinuxDriver(OSDriver): f"Package manager '{self._pkg_manager}' is not supported" ) - def get_available_updates(self) -> list[UpdateDict]: - """Alias for get_pending_updates(); called by the netork API backend.""" - return self.get_pending_updates() - def get_device_warnings(self) -> List[dict[str, Any]]: """Return warning dicts for issues detected on this device. diff --git a/tests/test_linux.py b/tests/test_linux.py index d690295..41c8ed1 100644 --- a/tests/test_linux.py +++ b/tests/test_linux.py @@ -166,7 +166,7 @@ def test_get_packages_apt(driver): # --------------------------------------------------------------------------- -# get_pending_updates (apt) +# get_available_updates (apt) # --------------------------------------------------------------------------- @@ -177,10 +177,10 @@ APT_UPGRADABLE = ( ) -def test_get_pending_updates_apt(driver): +def test_get_available_updates_apt(driver): driver._pkg_manager = "apt" with patch.object(driver, "_send", side_effect=["", APT_UPGRADABLE]): - updates = driver.get_pending_updates() + updates = driver.get_available_updates() assert len(updates) == 2 assert updates[0]["name"] == "openssh-server" assert updates[0]["current_version"] == "1:9.2p1-2+deb12u1"