refactor!: keep one name for pending updates, drop the alias
This driver implemented get_pending_updates and then carried get_available_updates as a one-line alias, because netOrk's API only ever called the latter. Two names for one thing, with the driver bridging the gap. napalm-device-types v1.0 collapses them onto get_available_updates — the name four drivers and every netOrk call site already used — so the alias has nothing left to bridge. BREAKING CHANGE: get_pending_updates is gone; call get_available_updates. The seven pre-existing test failures in this repo are untouched and unrelated; see netork#110.
This commit is contained in:
1 parent
c8fc46c373
commit
27027eec56
2 files changed
+4
-8
No files matched your search
+3
-3
@@ -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"
|
||||
|
||||
Reference in new issue
Block a user