Skip to content

Commit

Permalink
fix(evpn): fix mac address bytes to readable string
Browse files Browse the repository at this point in the history
Signed-off-by: atulpatel261194 <Atul.Patel@intel.com>
  • Loading branch information
atulpatel261194 committed May 20, 2024
1 parent d1e34c8 commit 4781826
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 @@ -57,7 +58,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("MacAddress:", net.HardwareAddr(bp.GetSpec().GetMacAddress()).String())
log.Println("bridges:", bp.GetSpec().GetLogicalBridges())
log.Println("Component Status:")
log.Println(ComposeComponentsInfo(bp.GetStatus().GetComponents()))
Expand All @@ -69,7 +70,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 4781826

Please sign in to comment.