mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 02:00:46 +08:00
feat(ne): connect detail, Huawei/Cisco hop, Cisco hostname probe
Persist full connect test logs (connect_detail) with NE UI detail modal. Add Huawei/Cisco jump CLI templates and generic CLI hop session path. Probe Cisco hostname via show configuration | include hostname (60s timeout). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
778442dc57
commit
dc17f9d15a
15 changed files with 457 additions and 63 deletions
|
|
@ -32,9 +32,17 @@ class ManagedNeHostnameParseTests(unittest.TestCase):
|
|||
out = "line1\nZXR10-PE1#"
|
||||
self.assertEqual(parse_hostname_from_output("zte_zxros", "ZTE", out), "ZXR10-PE1#")
|
||||
|
||||
def test_cisco_hostname(self):
|
||||
out = "hostname R2\nR2#"
|
||||
self.assertEqual(parse_hostname_from_output("cisco_ios", "Cisco", out), "R2")
|
||||
|
||||
def test_probe_commands(self):
|
||||
self.assertIn("sysname", hostname_probe_command("huawei", "Huawei") or "")
|
||||
self.assertEqual(hostname_probe_command("zte_zxros", "ZTE"), None)
|
||||
self.assertEqual(
|
||||
hostname_probe_command("cisco_ios", "Cisco"),
|
||||
"show configuration | include hostname",
|
||||
)
|
||||
|
||||
|
||||
class ManagedNeCryptoTests(unittest.TestCase):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue