mirror of
https://github.com/checktheroads/hyperglass
synced 2024-05-11 05:55:08 +00:00
adjusted netmiko global_delay_factor, removed sleep functions to improve performance
This commit is contained in:
BIN
.flask_cache/2029240f6d1128be89ddc32729463129
Normal file
BIN
.flask_cache/2029240f6d1128be89ddc32729463129
Normal file
Binary file not shown.
BIN
.flask_cache/657c533712fd34452c34b44cb9a65048
Normal file
BIN
.flask_cache/657c533712fd34452c34b44cb9a65048
Normal file
Binary file not shown.
BIN
.flask_cache/74bc75c0764cbc805c70645cef1f026b
Normal file
BIN
.flask_cache/74bc75c0764cbc805c70645cef1f026b
Normal file
Binary file not shown.
@@ -116,6 +116,7 @@ def execute(lg_data):
|
||||
"username": matchProxy(router_proxy)[1],
|
||||
"password": matchProxy(router_proxy)[2],
|
||||
"device_type": matchProxy(router_proxy)[3],
|
||||
"global_delay_factor": 0.5,
|
||||
}
|
||||
nm_connect_proxied = ConnectHandler(**nm_proxy)
|
||||
nm_ssh_command = matchProxy(router_proxy)[4].format(**nm_host) + "\n"
|
||||
@@ -126,12 +127,12 @@ def execute(lg_data):
|
||||
# Accept SSH key warnings
|
||||
if "Are you sure you want to continue connecting" in proxy_output:
|
||||
nm_connect_proxied.write_channel("yes" + "\n")
|
||||
time.sleep(1)
|
||||
# time.sleep(1)
|
||||
nm_connect_proxied.write_channel(nm_host["password"] + "\n")
|
||||
# Send password on prompt
|
||||
elif "assword" in proxy_output:
|
||||
nm_connect_proxied.write_channel(nm_host["password"] + "\n")
|
||||
time.sleep(1)
|
||||
# time.sleep(1)
|
||||
proxy_output += nm_connect_proxied.read_channel()
|
||||
# Reclassify netmiko connection as configured device type
|
||||
redispatch(nm_connect_proxied, nm_host["device_type"])
|
||||
@@ -150,6 +151,7 @@ def execute(lg_data):
|
||||
"device_type": type,
|
||||
"username": returnCred(findCred(router))[0],
|
||||
"password": returnCred(findCred(router))[1],
|
||||
"global_delay_factor": 0.5,
|
||||
}
|
||||
|
||||
# Loop through router list, determine if proxy exists
|
||||
|
Reference in New Issue
Block a user