diagnose command request using send_command inside a vdom #11
-
Hello, First thanks for your work on this project :) It can really help to automatize a bunch of stuffs. My problem is that I am trying to gather information from a couple of commands inside a vdom and I have the following error:
I think the function send_command do not know that we must apply the command inside the vdom XXX. I can apply other commands, for example get system status. If I try to enter the vdom via fgt.ssh.send_command() I have the following error:
I can apply the commands normally If I use the function fgt.ssh.send_config_set(). However, I receive all the output and not the individual stdout from each command. Thanks for all your help, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
In the current version (1.1.1), SSH methods do not use the 'vdom' parameter from FortigateAPI (which is only used in the REST API). |
Beta Was this translation helpful? Give feedback.
In the current version (1.1.1), SSH methods do not use the 'vdom' parameter from FortigateAPI (which is only used in the REST API).
To work with a specific vdom, you need to change the vdom context by sending the commands ['config vdom', 'edit XXX'].
Please refer to the example in ssh_vdom.py.