Skip to content

Commit

Permalink
fix(evpn): fix mac from byte to string
Browse files Browse the repository at this point in the history
  • Loading branch information
atulpatel261194 committed May 20, 2024
1 parent 0765f2d commit 0ba4dc4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/network/evpn-utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ package network
import (
"fmt"
"log"
"net"

"github.com/PraserX/ipconv"
pb "github.com/opiproject/opi-api/network/evpn-gw/v1alpha1/gen/go"
Expand Down Expand Up @@ -52,7 +53,7 @@ func PrintBP(bp *pb.BridgePort) {
log.Println("name:", bp.GetName())
log.Println("status:", bp.GetStatus().GetOperStatus().String())
log.Println("ptype:", bp.GetSpec().GetPtype())
log.Println("mac:", bp.GetSpec().GetMacAddress())
log.Println("mac:", net.HardwareAddr(bp.GetSpec().GetMacAddress()).String())
log.Println("bridges:", bp.GetSpec().GetLogicalBridges())
log.Println("Component Status:")
log.Println(ComposeComponentsInfo(bp.GetStatus().GetComponents()))
Expand All @@ -64,7 +65,7 @@ func PrintSvi(svi *pb.Svi) {
log.Println("status:", svi.GetStatus().GetOperStatus().String())
log.Println("Vrf:", svi.GetSpec().GetVrf())
log.Println("LogicalBridge:", svi.GetSpec().GetLogicalBridge())
log.Println("MacAddress:", svi.GetSpec().GetMacAddress())
log.Println("MacAddress:", net.HardwareAddr(svi.GetSpec().GetMacAddress()).String())
log.Println("EnableBgp:", svi.GetSpec().GetEnableBgp())
log.Println("GwIPs:", ComposeGwIps(svi.GetSpec().GetGwIpPrefix()))
log.Println("remoteAS:", svi.GetSpec().GetRemoteAs())
Expand Down

0 comments on commit 0ba4dc4

Please sign in to comment.