Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions internal/provider/cisco/nxos/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -947,9 +947,10 @@ func (p *Provider) EnsureInterface(ctx context.Context, req *provider.EnsureInte
conf = append(conf, addr)
}

bfd := new(BFD)
bfd.ID = name
if req.Interface.Spec.BFD != nil {
bfd := new(BFD)
bfd.ID = name

f := new(Feature)
f.Name = "bfd"
f.AdminSt = AdminStEnabled
Expand Down Expand Up @@ -985,8 +986,10 @@ func (p *Provider) EnsureInterface(ctx context.Context, req *provider.EnsureInte
icmp.ID = name
switch req.Interface.Spec.Type {
case v1alpha1.InterfaceTypePhysical:
if err := p.client.Delete(ctx, icmp); err != nil {
return err
if req.Interface.Spec.Switchport == nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this creating an error? Because the delete call seems to be working just fine for switchport interfaces.

λ gnmic -a 127.0.0.1 -u admin -p admin --port 9339 --skip-verify get --path 'System/intf-items/phys-items/PhysIf-list[id=eth1/12]/layer' --values-only --type config
[
  "Layer2"
]

λ gnmic -a 127.0.0.1 -u admin -p admin --port 9339 --skip-verify set --delete 'System/icmpv4-items/inst-items/dom-items/Dom-list[name=default]/if-items/If-list[id=eth1/12]'
{
  "source": "127.0.0.1",
  "timestamp": 1773406679784925525,
  "time": "2026-03-13T13:57:59.784925525+01:00",
  "results": [
    {
      "operation": "DELETE",
      "path": "System/icmpv4-items/inst-items/dom-items/Dom-list[name=default]/if-items/If-list[id=eth1/12]"
    }
  ]
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore this commit for now, i am still investigating an issue that may have some relation to this. One thing that caught our attention is that we configure icmp settings on interfaces that have no addressing configured. I will probably change this and push into this PR.

if err := p.client.Delete(ctx, icmp); err != nil {
return err
}
}
case v1alpha1.InterfaceTypeLoopback:
icmp.Ctrl = "port-unreachable,redirect"
Expand Down
Loading