|
7 | 7 | "cmp" |
8 | 8 | "context" |
9 | 9 | "crypto/rsa" |
10 | | - "encoding/json" |
11 | 10 | "errors" |
12 | 11 | "fmt" |
13 | 12 | "math" |
@@ -557,28 +556,6 @@ func (p *Provider) DeleteEVPNInstance(ctx context.Context, req *provider.EVPNIns |
557 | 556 | return p.client.Delete(ctx, conf...) |
558 | 557 | } |
559 | 558 |
|
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 | | - |
582 | 559 | func (p *Provider) EnsureInterface(ctx context.Context, req *provider.EnsureInterfaceRequest) error { |
583 | 560 | name, err := ShortName(req.Interface.Spec.Name) |
584 | 561 | if err != nil { |
@@ -795,38 +772,6 @@ func (p *Provider) EnsureInterface(ctx context.Context, req *provider.EnsureInte |
795 | 772 | conf = append(conf, v) |
796 | 773 | } |
797 | 774 |
|
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 | | - |
830 | 775 | case v1alpha1.InterfaceTypeRoutedVLAN: |
831 | 776 | f := new(Feature) |
832 | 777 | f.Name = "ifvlan" |
|
0 commit comments