Skip to content

Rewrite OpenConfig provider without ygot/ygnmi#365

Draft
felix-kaestner wants to merge 1 commit into
mainfrom
feat/openconfig
Draft

Rewrite OpenConfig provider without ygot/ygnmi#365
felix-kaestner wants to merge 1 commit into
mainfrom
feat/openconfig

Conversation

@felix-kaestner
Copy link
Copy Markdown
Contributor

Replace the ygot-generated code with hand-crafted structs and gnmiext.Client, following the same patterns used by the NX-OS provider.

The new implementation:

  • Defines Interface structs implementing gnmiext.DataElement with JSON tags derived from the OpenConfig YANG spec
  • Uses gnmiext.Client for gNMI Set/Get operations with automatic diff-based updates
  • Uses value types (not pointers) for YANG leaves that carry defaults (enabled, dhcp-client) to prevent spurious updates caused by nil vs. device-returned default mismatches
  • Removes ygot, ygnmi, goyang, gocloser dependencies
  • Removes the linter and shellcheck exclusions that were needed for generated code

@hardikdr hardikdr added the area/switch-automation Automation processes for network switch management and operations. label May 21, 2026
@hardikdr hardikdr added this to Roadmap May 21, 2026
Replace the ygot-generated code with hand-crafted structs and
gnmiext.Client, following the same patterns used by the NX-OS provider.

The new implementation:
- Defines Interface structs implementing gnmiext.DataElement with
  JSON tags derived from the OpenConfig YANG spec
- Uses gnmiext.Client for gNMI Set/Get operations with automatic
  diff-based updates
- Uses value types (not pointers) for YANG leaves that carry
  defaults (enabled, dhcp-client) to prevent spurious updates
  caused by nil vs. device-returned default mismatches
- Removes ygot, ygnmi, goyang, gocloser dependencies
- Removes the linter and shellcheck exclusions that were needed
  for generated code

Signed-off-by: Felix Kästner <felix.kaestner@sap.com>
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.

2 participants