Closed brancott closed 8 months ago
Here is the current Maipu save_config()
method:
https://github.com/ktbyers/netmiko/blob/develop/netmiko/maipu/maipu.py#L17-L23
Is this prompting typing or does it only occur in special cases?
Are you sure to overwrite /flash/startup (Yes|No)
You can probably also do:
net_connect.save_config(cmd="write", confirm=False, confirm_response="y")
Hi @ktbyers, it always asks 'Are you sure to overwrite /flash/startup (Yes|No)', and output from 'net_connect.save_config(cmd="write", confirm=False, confirm_response="y")' gives same result as just 'net_connect.save_config()':
ktbyers means you could exec save_config method and input your args
output = net_connect.send_command_timing(
"wr",
strip_prompt=False,
strip_command=False
)
if 'Are you sure to overwrite /flash/startup (Yes|No)?' in output:
output += net_connect.send_command_timing(
command_string="y",
strip_prompt=False,
strip_command=False
)
=>
output = net_connect.save_config(cmd="write", confirm=False, confirm_response="y")
Works with net_connect.save_config(cmd="write", confirm=True, confirm_response="y")
Hi guys! What is the ringt way to save running config on Maipu? 'net_connect.save_config()' doesn't do the trick. I managed to save config this way:
But is there an easier way?