Skip to content

Implement Openconfig NTP provider - #517

Draft
adamtrizuljak-sap wants to merge 1 commit into
mainfrom
feat/openconfig-ntp
Draft

Implement Openconfig NTP provider#517
adamtrizuljak-sap wants to merge 1 commit into
mainfrom
feat/openconfig-ntp

Conversation

@adamtrizuljak-sap

@adamtrizuljak-sap adamtrizuljak-sap commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Work in progress

Add OpenConfig provider implementation for the NTP resource (internal/provider/openconfig/ntp.go) and a gnmi testdata file (test/gnmi/testdata/openconfig/ntp.txt).

Cisco vs Openconfig compatibility issue

NTPSpec defines the SourceInterfaceName field https://github.com/ironcore-dev/network-operator/blob/main/api/core/v1alpha1/ntp_types.go#L36. Openconfig has something similar source-address https://openconfig.net/projects/models/schemadocs/yangdoc/openconfig-system.html#system-ntp-servers-server-config-source-address

A way to handle it would be to look up the interface given by SourceInterfaceName , get its IPv4 address and put it into source-address. Does it make sense? Do you usually do such operations, or do you keep the provider code clean from reading any additional k8s resources?

Other way would be to just ignore SourceInterfaceName and not pass it into the Openconfig struct, or even throw a apistatus.FieldViolation saying that it's unsupported

Proposed solution

Discussed with @nikatza and @rgildein

Since both fields are optional, the change will be backwards-compatible with the previous NTPSpec and the generated custom resources.

Signed-off-by: Adam Trizuljak <adam.trizuljak@sap.com>
@github-actions

Copy link
Copy Markdown

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/ironcore-dev/network-operator/internal/provider/openconfig 7.84% (-0.14%) 👎

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/ironcore-dev/network-operator/internal/provider/openconfig/ntp.go 0.00% (ø) 10 (+10) 0 10 (+10)

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.

@hardikdr hardikdr added the area/switch-automation Automation processes for network switch management and operations. label Aug 22, 2026
@hardikdr hardikdr added this to Roadmap Aug 22, 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/L

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants