77 "cmp"
88 "context"
99 "crypto/rsa"
10- "encoding/json"
1110 "errors"
1211 "fmt"
1312 "math"
@@ -32,7 +31,6 @@ import (
3231
3332const (
3433 SpanningTreePortTypeAnnotation = "nx.cisco.networking.metal.ironcore.dev/spanning-tree-port-type"
35- VPCDomainAnnotation = "nx.cisco.networking.metal.ironcore.dev/vpc-domain"
3634)
3735
3836var (
@@ -571,28 +569,6 @@ func (p *Provider) DeleteEVPNInstance(ctx context.Context, req *provider.EVPNIns
571569 return p .client .Delete (ctx , conf ... )
572570}
573571
574- var _ gnmiext.Configurable = (* VPCDom )(nil )
575-
576- type VPCDom struct {
577- ID int `json:"id"`
578- AdminSt AdminSt `json:"adminSt"`
579- PeerGw AdminSt `json:"peerGw"`
580- PeerSwitch AdminSt `json:"peerSwitch"`
581- KeepaliveItems struct {
582- DestIP string `json:"destIp"`
583- SrcIP string `json:"srcIp"`
584- Vrf string `json:"vrf"`
585- PeerlinkItems struct {
586- AdminSt AdminSt `json:"adminSt"`
587- ID string `json:"id"`
588- } `json:"peerlink-items,omitzero"`
589- } `json:"keepalive-items,omitzero"`
590- }
591-
592- func (v * VPCDom ) XPath () string {
593- return "System/vpc-items/inst-items/dom-items"
594- }
595-
596572func (p * Provider ) EnsureInterface (ctx context.Context , req * provider.EnsureInterfaceRequest ) error {
597573 name , err := ShortName (req .Interface .Spec .Name )
598574 if err != nil {
@@ -809,38 +785,6 @@ func (p *Provider) EnsureInterface(ctx context.Context, req *provider.EnsureInte
809785 conf = append (conf , v )
810786 }
811787
812- if s , ok := req .Interface .GetAnnotations ()[VPCDomainAnnotation ]; ok {
813- f2 := new (Feature )
814- f2 .Name = "vpc"
815- f2 .AdminSt = AdminStEnabled
816- conf = append (conf , f2 )
817-
818- var dom struct {
819- Src string `json:"src"`
820- Dst string `json:"dst"`
821- Vrf string `json:"vrf"`
822- }
823- if err := json .Unmarshal ([]byte (s ), & dom ); err != nil {
824- return err
825- }
826- v := new (VPCDom )
827- v .ID = 1
828- v .AdminSt = AdminStEnabled
829- v .PeerGw = AdminStEnabled
830- v .PeerSwitch = AdminStEnabled
831- v .KeepaliveItems .DestIP = dom .Dst
832- v .KeepaliveItems .SrcIP = dom .Src
833- v .KeepaliveItems .Vrf = dom .Vrf
834- v .KeepaliveItems .PeerlinkItems .ID = name
835- v .KeepaliveItems .PeerlinkItems .AdminSt = AdminStEnabled
836- conf = append (conf , v )
837- }
838-
839- // cfg := new(nxv1alpha1.PortChannelConfig)
840- // if err = req.ProviderConfig.Into(cfg); err == nil {
841- // return fmt.Errorf("failed to parse port-channel provider config: %w", err)
842- // }
843-
844788 case v1alpha1 .InterfaceTypeRoutedVLAN :
845789 f := new (Feature )
846790 f .Name = "ifvlan"
0 commit comments