Skip to content

Add LLDP configuration brick #179

Open
nikatza wants to merge 3 commits intomainfrom
cable-checker
Open

Add LLDP configuration brick #179
nikatza wants to merge 3 commits intomainfrom
cable-checker

Conversation

@nikatza
Copy link
Contributor

@nikatza nikatza commented Feb 5, 2026

This PR enables LLDP configuration for Cisco devices. Notice that OpenConfig and Cisco models deviate from each other, and thus the provider-agnostic resource is reduced to a minimum set of properties.

OpenConfig model
Cisco DME LLDP Instance
Cisco DME LLDP per-interface configuration

@hardikdr hardikdr added the area/metal-automation Automation processes within the Metal project. label Feb 6, 2026
@hardikdr hardikdr added this to Roadmap Feb 6, 2026
@nikatza nikatza force-pushed the cable-checker branch 2 times, most recently from 0d3b709 to e06b196 Compare February 11, 2026 10:16
@github-actions
Copy link

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/ironcore-dev/network-operator/api/cisco/nx/v1alpha1 0.00% (ø)
github.com/ironcore-dev/network-operator/api/core/v1alpha1 0.00% (ø)
github.com/ironcore-dev/network-operator/cmd 0.00% (ø)
github.com/ironcore-dev/network-operator/internal/controller/core 65.80% (-0.91%) 👎
github.com/ironcore-dev/network-operator/internal/provider 48.00% (ø)
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos 10.79% (-0.13%) 👎

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/ironcore-dev/network-operator/api/cisco/nx/v1alpha1/lldpconfig_types.go 0.00% (ø) 0 0 0
github.com/ironcore-dev/network-operator/api/cisco/nx/v1alpha1/zz_generated.deepcopy.go 0.00% (ø) 0 0 0
github.com/ironcore-dev/network-operator/api/core/v1alpha1/groupversion_info.go 0.00% (ø) 0 0 0
github.com/ironcore-dev/network-operator/api/core/v1alpha1/lldp_types.go 0.00% (ø) 0 0 0
github.com/ironcore-dev/network-operator/api/core/v1alpha1/zz_generated.deepcopy.go 0.00% (ø) 0 0 0
github.com/ironcore-dev/network-operator/cmd/main.go 0.00% (ø) 0 0 0
github.com/ironcore-dev/network-operator/internal/controller/core/lldp_controller.go 48.35% (+48.35%) 182 (+182) 88 (+88) 94 (+94) 🌟
github.com/ironcore-dev/network-operator/internal/controller/core/nve_controller.go 69.50% (+1.50%) 200 139 (+3) 61 (-3) 👍
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos/lldp.go 66.67% (+66.67%) 3 (+3) 2 (+2) 1 (+1) 🌟
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos/provider.go 0.07% (-0.00%) 1518 (+41) 1 1517 (+41) 👎
github.com/ironcore-dev/network-operator/internal/provider/provider.go 48.00% (ø) 25 12 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/controller/core/lldp_controller_test.go
  • github.com/ironcore-dev/network-operator/internal/controller/core/nve_controller_test.go
  • github.com/ironcore-dev/network-operator/internal/controller/core/suite_test.go
  • github.com/ironcore-dev/network-operator/internal/controller/core/vrf_controller_test.go
  • github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos/lldp_test.go

@nikatza nikatza marked this pull request as ready for review February 11, 2026 15:46
@nikatza nikatza requested a review from a team as a code owner February 11, 2026 15:46
Comment on lines +321 to +330
// only cisco/nx for the moment
if gvk == nxv1alpha1.GroupVersion.WithKind("LLDPConfig") {
lc := new(nxv1alpha1.LLDPConfig)
if err := s.ProviderConfig.Into(lc); err != nil {
return reconcile.TerminalError(fmt.Errorf("failed to parse provider config into LLDPConfig: %w", err))
}
if err := r.validateProviderConfigNXOS(ctx, lc, s); err != nil {
return reconcile.TerminalError(fmt.Errorf("configuration error in provider config ref %w", err))
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this we are leaking the Cisco NX-OS specific implementation into the core and thus break our provider pattern, where usually the core would not contain anything that is specific to one platform..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/metal-automation Automation processes within the Metal project.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants