Skip to content

Add NX-API JSON-RPC client and hack/nxapi helper - #286

Merged
felix-kaestner merged 1 commit into
mainfrom
nxapi
Apr 16, 2026
Merged

felix-kaestner merged 1 commit into
mainfrom
nxapi

Conversation

@felix-kaestner

@felix-kaestner felix-kaestner commented Apr 8, 2026

Copy link
Copy Markdown
Collaborator

Introduce a new nxapi package in internal/transport, which includes a thin HTTP client for the Cisco NX-OS NX-API JSON-RPC endpoint.

Add hack/nxapi, a minimal CLI that sends one or more NX-API commands to a device and pretty-prints the JSON results.

@felix-kaestner
felix-kaestner requested a review from a team April 8, 2026 13:50
@hardikdr hardikdr added the area/switch-automation Automation processes for network switch management and operations. label Apr 9, 2026
@hardikdr hardikdr added this to Roadmap Apr 9, 2026
@felix-kaestner
felix-kaestner force-pushed the refactor/deviceutil branch 2 times, most recently from 897d764 to 21bd916 Compare April 13, 2026 07:58
Base automatically changed from refactor/deviceutil to main April 13, 2026 08:17
@felix-kaestner
felix-kaestner force-pushed the nxapi branch 2 times, most recently from 18ffa43 to 02a79de Compare April 13, 2026 16:29
Comment thread hack/nxapi/main.go Outdated
Comment thread internal/transport/nxapi/nxapi.go
Comment thread internal/provider/cisco/nxos/nxapi_test.go Outdated
@felix-kaestner
felix-kaestner force-pushed the nxapi branch 2 times, most recently from c41d7c4 to 9fc45d8 Compare April 15, 2026 08:42
@felix-kaestner
felix-kaestner requested a review from nikatza April 15, 2026 08:44
Introduce NXAPIClient in internal/provider/cisco/nxos/nxapi.go,
a thin HTTP client for the Cisco NX-OS NX-API JSON-RPC endpoint.

Add hack/nxapi, a minimal CLI that sends one or more NX-API
commands to a device and pretty-prints the JSON results.
@github-actions

Copy link
Copy Markdown

Merging this branch changes the coverage (1 decrease, 1 increase)

Impacted Packages Coverage Δ 🤖
github.com/ironcore-dev/network-operator/hack/nxapi 0.00% (ø)
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos 10.18% (-0.04%) 👎
github.com/ironcore-dev/network-operator/internal/transport/nxapi 71.83% (+71.83%) 🌟

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/ironcore-dev/network-operator/hack/nxapi/main.go 0.00% (ø) 0 0 0
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos/provider.go 0.06% (-0.00%) 1639 (+8) 1 1638 (+8) 👎
github.com/ironcore-dev/network-operator/internal/transport/nxapi/doc.go 0.00% (ø) 0 0 0
github.com/ironcore-dev/network-operator/internal/transport/nxapi/nxapi.go 71.83% (+71.83%) 71 (+71) 51 (+51) 20 (+20) 🌟

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/transport/nxapi/nxapi_test.go

@felix-kaestner
felix-kaestner merged commit 39e6c0c into main Apr 16, 2026
19 checks passed
@felix-kaestner
felix-kaestner deleted the nxapi branch April 16, 2026 07:27
@github-project-automation github-project-automation Bot moved this to Done in Roadmap Apr 16, 2026
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/XL

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants