mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 03:10:46 +08:00
Skip CLI startup when device credentials are incomplete.
Reject non-interactive CLI work early across exec, LLDP, config sync, collection, traffic, and connect-test flows so tasks record a clear reason instead of launching a doomed session. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
dcdf4147a6
commit
b6a579ec02
12 changed files with 317 additions and 31 deletions
|
|
@ -124,7 +124,13 @@ class ConfigSyncSnapshotOverwriteTests(unittest.TestCase):
|
|||
task.ne_ip = "1.1.1.1"
|
||||
db.get.return_value = task
|
||||
resolve.return_value = (
|
||||
{"host": "1.1.1.1"},
|
||||
{
|
||||
"ip_address": "1.1.1.1",
|
||||
"protocol": "ssh",
|
||||
"username": "admin",
|
||||
"password": "secret",
|
||||
"hop_enabled": False,
|
||||
},
|
||||
{"vendor": "Cisco", "device_type": "ios", "name": "r1", "ip_address": "1.1.1.1"},
|
||||
)
|
||||
|
||||
|
|
@ -158,7 +164,13 @@ class ConfigSyncSnapshotOverwriteTests(unittest.TestCase):
|
|||
task.ne_ip = "1.1.1.1"
|
||||
db.get.return_value = task
|
||||
resolve.return_value = (
|
||||
{"host": "1.1.1.1"},
|
||||
{
|
||||
"ip_address": "1.1.1.1",
|
||||
"protocol": "ssh",
|
||||
"username": "admin",
|
||||
"password": "secret",
|
||||
"hop_enabled": False,
|
||||
},
|
||||
{"vendor": "Juniper", "device_type": "junos", "name": "r1", "ip_address": "1.1.1.1"},
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue