Skip to content

feat(test/gnmi): Enable cisco-nxos-gnmi - #522

Open
nikatza wants to merge 3 commits into
mainfrom
add-gnmi-tests-nxos
Open

feat(test/gnmi): Enable cisco-nxos-gnmi#522
nikatza wants to merge 3 commits into
mainfrom
add-gnmi-tests-nxos

Conversation

@nikatza

@nikatza nikatza commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Details in commit messages. This PR enables preliminaty set of gnmi tests for cisco nxos.

@nikatza
nikatza force-pushed the add-gnmi-tests-nxos branch 6 times, most recently from 20712ac to e6faa9f Compare August 25, 2026 15:12
@nikatza
nikatza marked this pull request as ready for review August 25, 2026 15:19
@hardikdr hardikdr added the area/switch-automation Automation processes for network switch management and operations. label Aug 26, 2026
@hardikdr hardikdr added this to Roadmap Aug 26, 2026
@felix-kaestner

Copy link
Copy Markdown
Contributor

Please note that this project doesn't follow semantic commits: https://github.com/ironcore-dev/network-operator/blob/main/AGENTS.md?plain=1#L53-L57

@nikatza
nikatza force-pushed the add-gnmi-tests-nxos branch from e6faa9f to daeedba Compare August 26, 2026 08:09
Register the NX-OS provider and its controllers (System, VPCDomain,
BorderGateway) so integration tests can run against cisco-nxos-gnmi.

The Makefile test-gnmi target is switched to use the ginkgo CLI with
parallel procs instead of go test.

The mock gNMI server is fixed to store list-key values as integers when
they are numeric (e.g. VPC domain ID, VNI) so they match the JSON the
provider expects in Get responses.

Moved the per-test reset from AfterEach into the test body so that each
test explicitly owns its initial state setup.

A WaitForCacheSync call is added to BeforeSuite to avoid races where
tests create resources before informers are ready.

Signed-off-by: Pujol <enric.pujol@sap.com>
Signed-off-by: Pujol <enric.pujol@sap.com>
The state/delete assertions intentionally retain some configuration.  On
NX-OS, deleting a resource does not always clear all device state:

- Physical interfaces cannot be removed; they reset to platform
  defaults (Layer2 access, vlan-1, mtu 1500, trunkVlans 1-4094).
- Feature enablement flags (fm-items) stay on after the resource using
  them is gone.
- Config items implementing Defaultable reset to their default value
  instead of being deleted (e.g. banner, gRPC, jumbo MTU 9216).
- SNMP traps cannot be removed once configured on NX-OS, so
  traps-items persists (as an empty container) after deletion.

The ethernetsegment controller gets the resource status via nxapi. This
test suite does not support it yet but is left here for reference.

Signed-off-by: Pujol <enric.pujol@sap.com>
@nikatza
nikatza force-pushed the add-gnmi-tests-nxos branch from daeedba to 376c01a Compare August 26, 2026 08:10
@github-actions

Copy link
Copy Markdown

Merging this branch will not change overall coverage

Impacted Packages Coverage Δ 🤖
github.com/ironcore-dev/network-operator/test/gnmi 0.00% (ø)
github.com/ironcore-dev/network-operator/test/gnmi/server 0.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/ironcore-dev/network-operator/test/gnmi/server/server.go 0.00% (ø) 0 0 0

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/ironcore-dev/network-operator/test/gnmi/gnmi_suite_test.go
  • github.com/ironcore-dev/network-operator/test/gnmi/gnmi_test.go

@@ -0,0 +1,160 @@
# NX-OS AAA TACACS+ with provider config (loginErrorEnable, keyEncryption)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: do we need that line? Also I guess "NX-OS" is already clear from the package? (Same applies to all test files).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't this just be called bgp_peer.go?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/switch-automation Automation processes for network switch management and operations. size/XXL

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants