Skip to content

Commit

Permalink
Dump bgp ip
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Paolinelli <[email protected]>
  • Loading branch information
fedepaol committed Jul 11, 2024
1 parent 5a6a4db commit d80357c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions e2etests/pkg/dump/frr.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ func BGPInfo(testName string, FRRContainers []*frrcontainer.FRR, cs clientset.In
ginkgo.GinkgoWriter.Printf("External frr dump for container %s, failed to write to file %v", c.Name, err)
continue
}

fmt.Fprintf(f, "Dumping show bgp ip for %s, local addresses: ipv4 - %s, ipv6 - %s\n", c.Name, c.Ipv4, c.Ipv6)
ipall, err := c.Exec("vtysh", "-c", "show bgp vrf all ipv4")
_, err = fmt.Fprint(f, ipall)
if err != nil {
ginkgo.GinkgoWriter.Printf("External frr ipall for container %s, failed to write to file %v", c.Name, err)
continue
}

}

frrk8sPods, err := k8s.FRRK8sPods(cs)
Expand All @@ -71,6 +80,14 @@ func BGPInfo(testName string, FRRContainers []*frrcontainer.FRR, cs clientset.In
ginkgo.GinkgoWriter.Printf("External frr dump for pod %s, failed to write to file %v", pod.Name, err)
continue
}

fmt.Fprintf(f, "Dumping show bgp ip for %s, local addresses: %s\n", pod.Name, pod.Status.PodIPs)
ipall, err := podExec.Exec("vtysh", "-c", "show bgp vrf all ipv4")
_, err = fmt.Fprint(f, ipall)
if err != nil {
ginkgo.GinkgoWriter.Printf("External frr ipall for pod %s, failed to write to file %v", pod.Name, err)
continue
}
}
}

Expand Down

0 comments on commit d80357c

Please sign in to comment.