ktbyers / netmiko

Multi-vendor library to simplify Paramiko SSH connections to network devices
MIT License
3.57k stars 1.3k forks source link

Nemiko and Foritgate with Split-task VDOM mode #3353

Open AliAm221 opened 10 months ago

AliAm221 commented 10 months ago

Description of Issue/Question

When we use netmiko to connect to a Fortigate firewall with multiple VDOMs in Split-task VDOM mode we see a unusual behaviour . when Fortigate uses VDOMs for running this command get system console you must first use config global command. when I use netmiko, it by default run some command. when VDOM is in Split-task, netmiko does not first run config global and then get system console command so before any other thing happen or actually program start to run, it fail.

Setup

Netmiko version

(Paste verbatim output from pip freeze | grep netmiko between quotes below)

netmiko==4.3.0

Netmiko device_type (if relevant to the issue)

(Paste device_type between quotes below)

Fortinet

Steps to Reproduce the Issue

Error Traceback

Here is the output of a Split-task VDOM fortigate firewall test1 $ HAN-FW-P01P $ get system status | grep Virtual Virtual domains status: 2 in NAT mode, 0 in TP mode Virtual domain configuration: split-task

HAN-FW-P01P $ get system status | grep Version Version: FortiGate-101F v7.0.11,build0489,230314 (GA.M) Release Version Information: GA

test1 $ get system console

command parse error before 'console' Command fail. Return code -61

test1 $ And here is the output of a multiple VDOM fortigate firewall: FGT-17 # FGT-17 # get system status | grep Virtual Virtual domains status: 2 in NAT mode, 0 in TP mode Virtual domain configuration: multiple

FGT-17 # get system status | grep Version Version: FortiGate-VM64-KVM v7.4.1,build2463,230830 (GA.F) Release Version Information: GA

FGT-17 # config global

FGT-17 (global) # get system console baudrate : 9600 output : standard login : enable

FGT-17 (global) # end note that all of this commands run by netmiko by default.

Relevant Python code

(Please try to essentialize your Python code to the minimum code needed to reproduce the issue) (Paste the code between the quotes below)

AliAm221 commented 9 months ago

@ktbyers can you help me with that