Skip to content

Implement NX-OS reprovisioning via NX-API#381

Open
felix-kaestner wants to merge 1 commit into
mainfrom
chore/nxos-reprovision
Open

Implement NX-OS reprovisioning via NX-API#381
felix-kaestner wants to merge 1 commit into
mainfrom
chore/nxos-reprovision

Conversation

@felix-kaestner
Copy link
Copy Markdown
Contributor

Replace the defunct GNMI-based reprovisioning with NXAPI JSON-RPC calls. The new implementation issues two requests:

  1. boot poap enable + copy running-config startup-config (batched with stop-on-error rollback)
  2. reload (separate request that tolerates transport errors because the device goes down before responding)

Add nxapi.IsTransportError to distinguish network-level errors (EOF, timeout, connection reset) from logical errors (RPCError, HTTPError), enabling callers of disruptive commands to tolerate expected connection drops.

Remove the now unused BootPOAP GNMI type.

Replace the defunct GNMI-based reprovisioning with NXAPI
JSON-RPC calls. The new implementation issues two requests:

1. boot poap enable + copy running-config startup-config
   (batched with stop-on-error rollback)
2. reload (separate request that tolerates transport errors
   because the device goes down before responding)

Add nxapi.IsTransportError to distinguish network-level
errors (EOF, timeout, connection reset) from logical errors
(RPCError, HTTPError), enabling callers of disruptive
commands to tolerate expected connection drops.

Remove the now unused BootPOAP GNMI type.

Signed-off-by: Felix Kästner <felix.kaestner@sap.com>
@felix-kaestner felix-kaestner requested a review from a team as a code owner May 27, 2026 16:52
@github-actions
Copy link
Copy Markdown

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos 10.39% (+0.44%) 👍
github.com/ironcore-dev/network-operator/internal/transport/nxapi 90.91% (+19.08%) 🎉

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos/provider.go 0.67% (+0.62%) 1781 (+2) 12 (+11) 1769 (-9) 👍
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos/system.go 3.33% (+0.11%) 30 (-1) 1 29 (-1) 👍
github.com/ironcore-dev/network-operator/internal/transport/nxapi/nxapi.go 90.91% (+19.08%) 77 (+6) 70 (+19) 7 (-13) 🎉

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/internal/provider/cisco/nxos/reprovision_test.go
  • github.com/ironcore-dev/network-operator/internal/transport/nxapi/nxapi_test.go

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.

1 participant