Skip to content

Commit a834714

Browse files
committed
feat: cisco-nxos provider vPC
* Add implementation to configure virtual Port Channel on Cisco NXOS devices.
1 parent 80b6ff0 commit a834714

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// SPDX-FileCopyrightText: 2025 SAP SE or an SAP affiliate company and IronCore contributors
2+
// SPDX-License-Identifier: Apache-2.0
3+
package nxos
4+
5+
import "github.com/ironcore-dev/network-operator/internal/provider/cisco/gnmiext/v2"
6+
7+
var (
8+
_ gnmiext.Configurable = (*VPC)(nil)
9+
)
10+
11+
// VPC represents a virtual Port Channel (vPC)
12+
type VPC struct {
13+
AutoRecovery AdminSt `json:"autoRecovery,omitempty"` // OC: default disabled
14+
AutoRecoveryReloadDelay uint32 `json:"autoRecoveryIntvl,omitempty"` // OC: default 240, range 60..3600
15+
DelayRestoreSVI uint16 `json:"delayRestoreSVI,omitempty"` // OC: default 10, range 1..3600
16+
DelayRestoreVPC uint16 `json:"delayRestoreVPC,omitempty"` // OC: default 30, range 1..3600
17+
FastConvergence AdminSt `json:"fastConvergence,omitempty"` // OC: default disabled
18+
Id uint16 `json:"id"` // OC: range 1..16384
19+
L3PeerRouter AdminSt `json:"l3PeerRouter,omitempty"` // OC: default disabled
20+
PeerGateway AdminSt `json:"peerGw,omitempty"` // OC: default disabled
21+
PeerSwitch AdminSt `json:"peerSwitch,omitempty"` // OC: default disabled
22+
RolePrio uint16 `json:"rolePrio,omitempty"` // OC: default 32667, range 1..65535
23+
SysPrio uint16 `json:"sysPrio,omitempty"` // OC: default 32667, range 1..65535
24+
KeepAliveItems struct {
25+
DestIP string `json:"destIp,omitempty"`
26+
SrcIP string `json:"srcIp,omitempty"`
27+
VRF string `json:"vrf,omitempty"`
28+
} `json:"keepalive-items,omitzero"`
29+
}
30+
31+
func (v *VPC) XPath() string {
32+
return "System/vpc-items/inst-items/dom-items"
33+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// SPDX-FileCopyrightText: 2025 SAP SE or an SAP affiliate company and IronCore contributors
2+
// SPDX-License-Identifier: Apache-2.0
3+
package nxos
4+
5+
func init() {
6+
vpc := &VPC{
7+
AutoRecovery: AdminStEnabled,
8+
AutoRecoveryReloadDelay: 360,
9+
DelayRestoreSVI: 45,
10+
DelayRestoreVPC: 150,
11+
FastConvergence: AdminStEnabled,
12+
Id: 2,
13+
L3PeerRouter: AdminStEnabled,
14+
PeerGateway: AdminStEnabled,
15+
PeerSwitch: AdminStEnabled,
16+
RolePrio: 100,
17+
SysPrio: 10,
18+
}
19+
vpc.KeepAliveItems.DestIP = "10.114.235.156"
20+
vpc.KeepAliveItems.SrcIP = "10.114.235.155"
21+
vpc.KeepAliveItems.VRF = "management"
22+
Register("vpc", vpc)
23+
}

0 commit comments

Comments
 (0)