Skip to content

Commit

Permalink
Make missing port mapping a warn in inspect
Browse files Browse the repository at this point in the history
Signed-off-by: Sergei Lukianov <[email protected]>
  • Loading branch information
Frostman committed Feb 11, 2025
1 parent 9de1a3c commit 17c0fed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/util/apiutil/lldp.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package apiutil
import (
"context"
"fmt"
"log/slog"
"strings"

agentapi "go.githedgehog.com/fabric/api/agent/v1beta1"
Expand Down Expand Up @@ -174,7 +175,7 @@ func GetLLDPNeighbors(ctx context.Context, kube client.Reader, sw *wiringapi.Swi
if apiPort, ok := ports[port]; ok {
port = apiPort
} else {
return nil, fmt.Errorf("port mapping for %s not found in switch %s", port, status.Expected.Name) //nolint:goerr113
slog.Warn("port mapping for %s not found in switch %s", port, status.Expected.Name)
}
}

Expand Down

0 comments on commit 17c0fed

Please sign in to comment.