Skip to content

Conversation

@nikatza
Copy link
Contributor

@nikatza nikatza commented Oct 21, 2025

Multi-Chassis Link Aggregation (MC-LAG) is quite vendor and platform
specific. We don't see much intersection in their respective
configuration to justify a common API type. Instead, we move forward
with a platform specific API exclusive to Cisco NXOS devices.

This commit adds new types, controller, and provider to configure
virtual Port Channels (vPCs) via the operator.

Implementation note: Consider the following information about the YANG
model for configuring a vPC:

  • each vPC configured in the domain appears in the tree in this
    location: vpc-items/inst-items/dom-items/if-items/If-list[id=30]
    (where 30 is the vPC ID, not to be confused with the domain ID)
  • the peer-link interface is configured here:
    vpc-items/inst-items/dom-items/keepalive-items/peerlink-items[id=po10]

The interfaces will be added to the vPC config by the LAG provider and
not by this controller. Hence, if we apply a gNMI Replace operation on
the xpath returned by VPC.XPath() we would remove any existing vPC
interfaces. A gNMI Update operation will not modify the configuration
introduced by the LAG provider.

@hardikdr hardikdr added the area/metal-automation Automation processes within the Metal project. label Oct 22, 2025
@hardikdr hardikdr added this to Roadmap Oct 22, 2025
@nikatza nikatza force-pushed the cisco-nxos-vpc branch 2 times, most recently from 0b789b3 to 52078ca Compare October 22, 2025 16:31
@nikatza nikatza changed the title Enable Cisco vPC feat: Enable Cisco vPC Oct 22, 2025
@nikatza nikatza changed the title feat: Enable Cisco vPC feat: Cisco NXOS vPCs Oct 22, 2025
@nikatza nikatza force-pushed the cisco-nxos-vpc branch 11 times, most recently from 218ebd5 to 2f2cd99 Compare October 23, 2025 16:55
@nikatza nikatza force-pushed the cisco-nxos-vpc branch 10 times, most recently from f6fb13c to b3fd3db Compare November 28, 2025 10:16
Multi-Chassis Link Aggregation (MC-LAG) is quite vendor and platform
specific. We don't see much intersection in their respective
configuration to justify a common API type. Instead, we move forward
with a platform specific API exclusive to Cisco NXOS devices.

This commit adds new types, controller, and provider to configure
virtual Port Channels (vPCs) via the operator.

Implementation note: Consider the following information about the YANG
model for configuring a vPC:
* each vPC configured in the domain appears in the tree in this
  location: `vpc-items/inst-items/dom-items/if-items/If-list[id=30]`
(where `30` is the vPC ID)
* the peer-link interface is configured here:
  `vpc-items/inst-items/dom-items/keepalive-items/peerlink-items[id=po10]`

The interfaces will be added to the vPC config by the LAG provider and
not by this controller.  Hence, if we apply a gNMI Replace operation on
the xpath returned by VPC.XPath() we would remove any existing vPC
interfaces. A gNMI Update operation will not modify the configuration
introduced by the LAG provider.
@github-actions
Copy link

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

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/cisco/nx 62.36% (-3.92%) 👎
github.com/ironcore-dev/network-operator/internal/controller/core 69.08% (+0.03%) 👍
github.com/ironcore-dev/network-operator/internal/provider 20.00% (ø)
github.com/ironcore-dev/network-operator/internal/provider/cisco/gnmiext/v2 91.48% (ø)
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos 11.69% (-0.54%) 👎
github.com/ironcore-dev/network-operator/internal/webhook/core/v1alpha1 92.86% (-2.70%) 👎

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/ironcore-dev/network-operator/api/cisco/nx/v1alpha1/groupversion_info.go 0.00% (ø) 0 0 0
github.com/ironcore-dev/network-operator/api/cisco/nx/v1alpha1/vpc_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/vrf_types.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/cisco/nx/provider.go 0.00% (ø) 0 0 0
github.com/ironcore-dev/network-operator/internal/controller/cisco/nx/vpc_controller.go 60.54% (+60.54%) 185 (+185) 112 (+112) 73 (+73) 🌟
github.com/ironcore-dev/network-operator/internal/controller/core/interface_controller.go 79.19% (-0.75%) 346 (+2) 274 (-1) 72 (+3) 👎
github.com/ironcore-dev/network-operator/internal/provider/cisco/gnmiext/v2/client.go 89.36% (ø) 141 126 15
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos/intf.go 11.24% (ø) 89 10 79
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos/provider.go 0.10% (-0.01%) 1051 (+65) 1 1050 (+65) 👎
github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos/vpc.go 17.65% (-10.92%) 17 (+10) 3 (+1) 14 (+9) 💀
github.com/ironcore-dev/network-operator/internal/provider/provider.go 20.00% (ø) 25 5 20
github.com/ironcore-dev/network-operator/internal/webhook/core/v1alpha1/vrf_webhook.go 92.86% (-2.70%) 42 (-3) 39 (-4) 3 (+1) 👎

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/cisco/nx/suite_test.go
  • github.com/ironcore-dev/network-operator/internal/controller/cisco/nx/vpc_controller_test.go
  • github.com/ironcore-dev/network-operator/internal/controller/core/suite_test.go
  • github.com/ironcore-dev/network-operator/internal/provider/cisco/nxos/vpc_test.go
  • github.com/ironcore-dev/network-operator/internal/webhook/core/v1alpha1/vrf_webhook_test.go

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