Skip to content

nxos: add n9kv eBGP lab and wire lab_builder for NX-OS#186

Merged
dhalperi merged 1 commit into
mainfrom
spr/main/d05cdbb8
May 20, 2026
Merged

nxos: add n9kv eBGP lab and wire lab_builder for NX-OS#186
dhalperi merged 1 commit into
mainfrom
spr/main/d05cdbb8

Conversation

@dhalperi
Copy link
Copy Markdown
Member

@dhalperi dhalperi commented May 20, 2026

Add a two-router eBGP lab collected from a real Cisco N9Kv (NX-OS
10.3.9.M) to validate Batfish against live NX-OS device state.

lab_builder changes:

  • Add CISCO_N9KV vendor profile (cisco_n9kv containerlab kind,
    cisco_nxos netmiko type, Ethernet1/N interface mapping)
  • Add NX-OS health checks for BGP (show ip bgp summary) and
    OSPF (show ip ospf neighbors); return None for ISIS
  • Skip platform-warning checks for NX-OS

Parser fix:

  • NX-OS interface grammar: accept "Kbit ," (space before comma) in
    the MTU/BW line, matching n9kv 10.3.x output format

Lab (nxos_n9kv_ebgp):

  • Two n9kv routers in eBGP (AS 65001/65002), advertising loopbacks
  • Collected from vrnetlab/cisco_n9kv:10.3.9.M on EC2 m8i.2xlarge
  • 10 tests pass, 3 xfailed (management VRF static route and mgmt0
    bandwidth — both vrnetlab artifacts not in startup config)

infra/README.md: document NX-OS in vendor profiles table, interface
mapping, and show commands collected.


Prompt:

Now that we have nexus support, add a hello world lab and collect it.

Stack:


⚠️ Part of a stack created by spr. Do not merge manually using the UI - doing so may have unexpected results.

Add a two-router eBGP lab collected from a real Cisco N9Kv (NX-OS
10.3.9.M) to validate Batfish against live NX-OS device state.

lab_builder changes:
- Add CISCO_N9KV vendor profile (cisco_n9kv containerlab kind,
  cisco_nxos netmiko type, Ethernet1/N interface mapping)
- Add NX-OS health checks for BGP (show ip bgp summary) and
  OSPF (show ip ospf neighbors); return None for ISIS
- Skip platform-warning checks for NX-OS

Parser fix:
- NX-OS interface grammar: accept "Kbit ," (space before comma) in
  the MTU/BW line, matching n9kv 10.3.x output format

Lab (nxos_n9kv_ebgp):
- Two n9kv routers in eBGP (AS 65001/65002), advertising loopbacks
- Collected from vrnetlab/cisco_n9kv:10.3.9.M on EC2 m8i.2xlarge
- 10 tests pass, 3 xfailed (management VRF static route and mgmt0
  bandwidth — both vrnetlab artifacts not in startup config)

infra/README.md: document NX-OS in vendor profiles table, interface
mapping, and show commands collected.

----

Prompt:
```
Now that we have nexus support, add a hello world lab and collect it.
```

commit-id:d05cdbb8
@dhalperi dhalperi enabled auto-merge (squash) May 20, 2026 04:24
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.59%. Comparing base (7417fa0) to head (f8e5a67).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #186   +/-   ##
=======================================
  Coverage   83.59%   83.59%           
=======================================
  Files          87       87           
  Lines        4194     4194           
=======================================
  Hits         3506     3506           
  Misses        688      688           
Flag Coverage Δ
unittests 83.59% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member Author

@dhalperi dhalperi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good.

@dhalperi dhalperi merged commit 7b78e32 into main May 20, 2026
114 checks passed
@dhalperi dhalperi deleted the spr/main/d05cdbb8 branch May 20, 2026 04:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants