feat: TYPE_LABEL = "Linux" overrides OSDriver.TYPE_LABEL = "OS"
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
e065515de0
commit
450aa193ba
@@ -93,6 +93,7 @@ class LinuxDriver(OSDriver):
|
||||
package manager unless overridden by ``optional_args["pkg_manager"]``.
|
||||
"""
|
||||
|
||||
TYPE_LABEL = "Linux"
|
||||
VENDOR = "Linux"
|
||||
NETMIKO_DEVICE_TYPE = "linux"
|
||||
|
||||
|
||||
@@ -341,6 +341,21 @@ def test_apply_updates_unsupported_pm_raises(driver):
|
||||
driver.apply_updates(["curl"])
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# TYPE_LABEL
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
def test_type_label_is_linux():
|
||||
assert LinuxDriver.TYPE_LABEL == "Linux"
|
||||
|
||||
|
||||
def test_type_label_overrides_os_driver():
|
||||
from napalm_device_types import OSDriver
|
||||
assert OSDriver.TYPE_LABEL == "OS"
|
||||
assert LinuxDriver.TYPE_LABEL != OSDriver.TYPE_LABEL
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# _collect_platform_info
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user