Skip to content

Integrate WBB proxy Functional Translator (FT) support#156

Merged
robshakir merged 9 commits intoopenconfig:mainfrom
islandmoves:main
Jun 19, 2025
Merged

Integrate WBB proxy Functional Translator (FT) support#156
robshakir merged 9 commits intoopenconfig:mainfrom
islandmoves:main

Conversation

@islandmoves
Copy link
Copy Markdown
Contributor

This enables ygnmi clients to validate telemetry data that needs to be translated from alternative sources to OpenConfig in production use.

  • Add FunctionalTranslator interface with the FT methods for translating subscriptions and notifications.
  • Add ygnmi.WithFT() option to apply an FT to queries matching the FT when calling ygnmi methods such as ygnmi.Get, etc

Caveats:

  • ygnmi.WithFT only supports leaf queries.
  • When using queries that set specific keys (e.g. name=Optics0/0/0/16) with ygnmi.WithFT, we strip the key before passing it to the functional translator’s subscription translation method OutputToInput. This usually results in excess data from other keys being sent. We filter out notifications that don't match the original query after translation. Such queries may then have linear time performance when FNT authors expected constant time.

This enables ygnmi clients to validate telemetry data that needs to be translated from alternative sources to OpenConfig in production use.

- Add FunctionalTranslator interface with the FT methods for translating subscriptions and notifications.
- Add ygnmi.WithFT() option to apply an FT to queries matching the FT when calling ygnmi methods such as ygnmi.Get, etc

Caveats:
- ygnmi.WithFT only supports leaf queries.
- When using queries that set specific keys (e.g. name=Optics0/0/0/16) with ygnmi.WithFT, we strip the key before passing it to the functional translator’s subscription translation method OutputToInput. This usually results in excess data from other keys being sent. We filter out notifications that don't match the original query after translation. Such queries may then have linear time performance when FNT authors expected constant time.
@coveralls
Copy link
Copy Markdown

coveralls commented Jun 13, 2025

Pull Request Test Coverage Report for Build 15755819894

Details

  • 56 of 72 (77.78%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 5.203%

Changes Missing Coverage Covered Lines Changed/Added Lines %
ygnmi/gnmi.go 47 63 74.6%
Totals Coverage Status
Change from base Build 15572259029: 0.1%
Covered Lines: 2298
Relevant Lines: 44171

💛 - Coveralls

@robshakir
Copy link
Copy Markdown
Member

Looks like just a gofmt pending on this one, thanks Michael.

@robshakir robshakir merged commit 141c4e8 into openconfig:main Jun 19, 2025
7 checks passed
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.

3 participants