11-05-2019 09:04 AM
I need to save configuration on switch extreme. The command is :
save configuration "File Name"
After of command's execution i need to answer 2 question.
First:
Do you want to save configuration ? (y/N) -> I have to say Yes
Second:
Do you want to make "File Name".cfg the default database? (y/N) -> I have to say No
I am using paramiko for command execution.
Below is a piece of my code:
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect(server, username=username, password=password)
stdin, stdout, stderr = ssh.exec_command('save configuration '+ backupFileName)
#Now i need to say first Yes and then NO
Someone could help me?
Thanks
11-08-2019 10:28 AM
Hi,
I never used paramiko, but if you happen to have XMC, you should consider porting your script to it. XMC would take care of all of that for you and you could more easily manage these questions.