Replies: 1 comment
-
@tcb678 It would probably be best if we pick a specific issue and look at that--which issue is most important to you? It would be very helpful if you put the actual CLI illustrating the issue here (as I do not have a Fortinet device). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In an environment where a Fortinet has multiple VDOMs, there's the beginning of some assertions that imply Netmiko is at least loosely aware of a multiple-VDOM case. In an environment I work in, I log in to an
FGT-ABC-DEF #
prompt, but much of the configuration is abstracted into individual VDOMs, such that many commands I run have me runningconfig vdom
and thenedit <X>
to put me in the correct context. Once inFGT-ABC-DEF (ACTUAL VDOM)
, which comes afterFGT-ABC-DEF (vdom)
, I can in my version (7.4.x+) runsudo <vdom> <command>
to run commands in different VDOMs directly. This works well. Sadly, this sequence isn't handled well by Netmiko, partially because of the changing prompt. A solid regex e.g.r"[A-Za-z0-9][\w\-]*(?:\s*\([^)]*\))?\s*[#>]\s*$"
gets me part of the way there, but I think Netmiko could see some enhancements here; just what enhancements I'm not sure. It could be that better prompt handling is all that's needed. I've played with a few different approaches but rather than be cavalier and submit a PR, I thought it might make sense to evaluate whether Netmiko should be smarter about multiple VDOMs and the interactions between them. Items to consider:edit <X>; edit <Y>
because once you are in a given VDOM, you have limited awareness of other VDOMs. You can donext
orend
, though the actual impacts are variable depending on whether you have actually changed configurations or not.sudo
to another VDOM e.g.sudo VDOM2 show full-configuration
.sudo
fromconfig global
provided you have access to do so.execute ssh username@fsw-01
to run a command on a specific switch in a managed Fortiswitch deployment.Just thought I'd start some of the discussion here in hopes for an eventual PR.
Beta Was this translation helpful? Give feedback.
All reactions