mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 02:00:46 +08:00
Prefer vendor label for LLDP command when it conflicts with device_type.
Huawei NEs still tagged zte_zxros were getting show lldp neighbor brief and timing out; use display lldp neighbor and align UME inventory vendor before the jump. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
b36174bfa4
commit
3adf8d8b75
4 changed files with 82 additions and 18 deletions
|
|
@ -157,6 +157,18 @@ class LldpParserTests(unittest.TestCase):
|
|||
key, stub = lldp.parser_meta(vendor="Ericsson", device_type="ericsson_ipos")
|
||||
self.assertTrue(stub)
|
||||
|
||||
def test_pick_command_vendor_wins_on_dtype_conflict(self) -> None:
|
||||
# Stale/default zte_zxros must not force ZTE LLDP on a Huawei-labeled NE.
|
||||
self.assertEqual(
|
||||
lldp.pick_neighbor_command(vendor="Huawei", device_type="zte_zxros")[0],
|
||||
"display lldp neighbor",
|
||||
)
|
||||
self.assertEqual(lldp.resolve_vendor_key("Huawei", "zte_zxros"), "huawei")
|
||||
self.assertEqual(
|
||||
lldp.pick_neighbor_command(vendor="Huawei", device_type="huawei")[0],
|
||||
"display lldp neighbor",
|
||||
)
|
||||
|
||||
|
||||
class DeadlockHelperTests(unittest.TestCase):
|
||||
def test_is_deadlock_error_detects_pg_message(self) -> None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue