本来打算用python-vyos-mgmt
实现:
vyos.configure()
vyos.exit()
但是需要用户名和密码,由于每台设备的用户名密码都不同,而且有时候ssh端口也会改变,所以想直接用python调用脚本的方式。
在vyos1.2版本中,可以直接用python调用这样的命令进入configure模式。
/opt/vyatta/bin/vyatta-op-cmd-wrapper configure
请问怎么调用类似的命令退出 configure 模式呢?我找了很久没有找到。
I was going to use Python-vyos-Mgmt to realization:
“vyos.configure()
vyos.exit()”
but this method , the user name and password are required. Because the user name and password of each device are different, and sometimes the SSH port will change, I want to use python call the vyos api script.
for exp.
vyos.configure() ==
/opt/vyatta/bin/vyatta-op-cmd-wrapper configure
How can I call a similar command to exit the configure mode? I’ve been looking for it for a long time.
vyos.exit() == ?