genieparser icon indicating copy to clipboard operation
genieparser copied to clipboard

show nve interface {nve} detail not working for nxos N9K

Open Trasmontinho opened this issue 3 years ago • 5 comments

Hello,

the parser for the command in the title is not working for the nxos version 7.0.3 and shelf C92X.

The output of the cli command is as below :

Interface: nve1, State: Up, encapsulation: VXLAN
 VPC Capability: VPC-Only [not-notified]
 Local Router MAC: abcd.ef12.3456
 Host Learning Mode: Control-Plane
 Source-Interface: loopback1 (primary: 192.168.1.1, secondary: 0.0.0.0)
 Source Interface State: Up
 IR Capability Mode: No
 Virtual RMAC Advertisement: No
 NVE Flags: 
 Interface Handle: 0x49000001
 Source Interface hold-down-time: 180
 Source Interface hold-up-time: 30
 Remaining hold-down time: 0 seconds
 Virtual Router MAC: N/A
 Interface state: nve-intf-add-complete
 unknown-peer-forwarding: disable
 down-stream vni config mode: n/a
Nve Src node last notif sent: None
Nve Mcast Src node last notif sent: None
Nve MultiSite Src node last notif sent: None

the issue for the parsing seems to be in the NVE Flags regex pattern

Let me know if you need any other informations.

Regards,

Sam

Trasmontinho avatar Oct 25 '21 11:10 Trasmontinho

Hello, FYI, I use the parser with netmiko : genie==20.9 genie.libs.clean==20.9.1 genie.libs.conf==20.9 genie.libs.filetransferutils==20.9 genie.libs.health==20.9 genie.libs.ops==20.9 genie.libs.parser==20.9 genie.libs.sdk==20.9.1 pyats==20.9 pyats.aereport==20.9 pyats.aetest==20.9.2 pyats.async==20.9 pyats.connections==20.9 pyats.datastructures==20.9 pyats.easypy==20.9 pyats.kleenex==20.9.1 pyats.log==20.9.1 pyats.reporter==20.9 pyats.results==20.9.1 pyats.tcl==20.9 pyats.topology==20.9 pyats.utils==20.9 netmiko==3.4.0

Trasmontinho avatar Oct 26 '21 09:10 Trasmontinho

Hi, Apologies for the delay, I'm updating this parser, and I believe I believe I know what the issue is. Just to confirm, were you trying to parse the output without giving a specific interface?

bastell avatar Nov 02 '21 16:11 bastell

Hi @bastell ,

No worries and thanks for your time.

I'm integrating those results in a larger code but for the purpose of the testing I've just done the test below :

from netmiko.utilities import get_structured_data_genie as genie_parser
from netmiko import ConnectHandler
from genie.libs.parser.utils import get_parser
from genie.conf.base import Device

device = ConnectHandler(
    device_type="cisco_nxos",
    host="n9k-dev",
    username="login",
    password="password",
)


nve_peer = device.send_command("show nve interface nve1 detail")
ch_nve_peer = genie_parser(nve_peer, "cisco_nxos", 'show nve interface nve1 detail')

print(ch_nve_peer)

Trasmontinho avatar Nov 02 '21 17:11 Trasmontinho

FYI,

The command show nve interface is neither parsed with the same script.

Regards, Sam

Trasmontinho avatar Nov 02 '21 17:11 Trasmontinho

Hi, Thanks for the example, that helped me pin down the issue. I've made a fix for it, and I'll update you when it's available in a release.

bastell avatar Nov 04 '21 15:11 bastell