Skip to content

Commit 1feeb03

Browse files
committed
[NX-OS] Remove vPC creation via annotation
1 parent eaa0673 commit 1feeb03

File tree

1 file changed

+0
-55
lines changed

1 file changed

+0
-55
lines changed

internal/provider/cisco/nxos/provider.go

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"cmp"
88
"context"
99
"crypto/rsa"
10-
"encoding/json"
1110
"errors"
1211
"fmt"
1312
"math"
@@ -557,28 +556,6 @@ func (p *Provider) DeleteEVPNInstance(ctx context.Context, req *provider.EVPNIns
557556
return p.client.Delete(ctx, conf...)
558557
}
559558

560-
var _ gnmiext.Configurable = (*VPCDom)(nil)
561-
562-
type VPCDom struct {
563-
ID int `json:"id"`
564-
AdminSt AdminSt `json:"adminSt"`
565-
PeerGw AdminSt `json:"peerGw"`
566-
PeerSwitch AdminSt `json:"peerSwitch"`
567-
KeepaliveItems struct {
568-
DestIP string `json:"destIp"`
569-
SrcIP string `json:"srcIp"`
570-
Vrf string `json:"vrf"`
571-
PeerlinkItems struct {
572-
AdminSt AdminSt `json:"adminSt"`
573-
ID string `json:"id"`
574-
} `json:"peerlink-items,omitzero"`
575-
} `json:"keepalive-items,omitzero"`
576-
}
577-
578-
func (v *VPCDom) XPath() string {
579-
return "System/vpc-items/inst-items/dom-items"
580-
}
581-
582559
func (p *Provider) EnsureInterface(ctx context.Context, req *provider.EnsureInterfaceRequest) error {
583560
name, err := ShortName(req.Interface.Spec.Name)
584561
if err != nil {
@@ -795,38 +772,6 @@ func (p *Provider) EnsureInterface(ctx context.Context, req *provider.EnsureInte
795772
conf = append(conf, v)
796773
}
797774

798-
if s, ok := req.Interface.GetAnnotations()[VPCDomainAnnotation]; ok {
799-
f2 := new(Feature)
800-
f2.Name = "vpc"
801-
f2.AdminSt = AdminStEnabled
802-
conf = append(conf, f2)
803-
804-
var dom struct {
805-
Src string `json:"src"`
806-
Dst string `json:"dst"`
807-
Vrf string `json:"vrf"`
808-
}
809-
if err := json.Unmarshal([]byte(s), &dom); err != nil {
810-
return err
811-
}
812-
v := new(VPCDom)
813-
v.ID = 1
814-
v.AdminSt = AdminStEnabled
815-
v.PeerGw = AdminStEnabled
816-
v.PeerSwitch = AdminStEnabled
817-
v.KeepaliveItems.DestIP = dom.Dst
818-
v.KeepaliveItems.SrcIP = dom.Src
819-
v.KeepaliveItems.Vrf = dom.Vrf
820-
v.KeepaliveItems.PeerlinkItems.ID = name
821-
v.KeepaliveItems.PeerlinkItems.AdminSt = AdminStEnabled
822-
conf = append(conf, v)
823-
}
824-
825-
// cfg := new(nxv1alpha1.PortChannelConfig)
826-
// if err = req.ProviderConfig.Into(cfg); err == nil {
827-
// return fmt.Errorf("failed to parse port-channel provider config: %w", err)
828-
// }
829-
830775
case v1alpha1.InterfaceTypeRoutedVLAN:
831776
f := new(Feature)
832777
f.Name = "ifvlan"

0 commit comments

Comments
 (0)