summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeff Bean <bean@uber.com>2018-06-23 18:33:40 -0700
committerJeff Bean <bean@uber.com>2018-06-23 18:38:23 -0700
commit72bbb9678381686acf14b0177dbf442a6761f41b (patch)
treee8f48b5097c6cedc392d0c24641c1058acf69bcb
parentbc4854ce505e2f3fe434a1ce30526f77c4d1fef4 (diff)
potential - Found a bug in the python tests
-rw-r--r--gobgp/cmd/vrf.go8
-rw-r--r--server/server.go4
-rw-r--r--test/scenario_test/route_reflector_test.py1
-rw-r--r--zebra/zapi.go2
4 files changed, 6 insertions, 9 deletions
diff --git a/gobgp/cmd/vrf.go b/gobgp/cmd/vrf.go
index 4fe64802..84cb20fd 100644
--- a/gobgp/cmd/vrf.go
+++ b/gobgp/cmd/vrf.go
@@ -22,12 +22,11 @@ import (
"strconv"
"strings"
- "github.com/golang/protobuf/ptypes/any"
-
- "github.com/spf13/cobra"
-
api "github.com/osrg/gobgp/api"
"github.com/osrg/gobgp/packet/bgp"
+
+ "github.com/golang/protobuf/ptypes/any"
+ "github.com/spf13/cobra"
)
func getVrfs() (vrfs, error) {
@@ -167,7 +166,6 @@ func modVrf(typ string, args []string) error {
}
func NewVrfCmd() *cobra.Command {
-
ribCmd := &cobra.Command{
Use: CMD_RIB,
Run: func(cmd *cobra.Command, args []string) {
diff --git a/server/server.go b/server/server.go
index c4e5f5de..31d2d42e 100644
--- a/server/server.go
+++ b/server/server.go
@@ -1711,8 +1711,8 @@ func (s *BgpServer) AddVrf(name string, id uint32, rd bgp.RouteDistinguisherInte
AS: s.bgpConfig.Global.Config.As,
LocalID: net.ParseIP(s.bgpConfig.Global.Config.RouterId).To4(),
}
- if pathList, e := s.globalRib.AddVrf(name, id, rd, im, ex, pi); e != nil {
- return e
+ if pathList, err := s.globalRib.AddVrf(name, id, rd, im, ex, pi); err != nil {
+ return err
} else if len(pathList) > 0 {
s.propagateUpdate(nil, pathList)
}
diff --git a/test/scenario_test/route_reflector_test.py b/test/scenario_test/route_reflector_test.py
index 3008ad14..53654c34 100644
--- a/test/scenario_test/route_reflector_test.py
+++ b/test/scenario_test/route_reflector_test.py
@@ -241,7 +241,6 @@ class GoBGPTestBase(unittest.TestCase):
def test_12_routes_from_separate_rts_peers_are_isolated_by_rr(self):
self.tyrell1.local("gobgp vrf add a1 rd 100:100 rt both 100:100")
- self.tyrell1.local("gobgp vrf add a1 rd 100:100 rt both 100:100")
self.tyrell1.local("gobgp vrf a1 rib add 10.10.0.0/16 local-pref 200")
self.tyrell1.local("gobgp vrf a1 rib add 10.30.0.0/16")
time.sleep(1)
diff --git a/zebra/zapi.go b/zebra/zapi.go
index 3b303082..667cfcd9 100644
--- a/zebra/zapi.go
+++ b/zebra/zapi.go
@@ -546,7 +546,7 @@ func NewClient(network, address string, typ ROUTE_TYPE, version uint8) (*Client,
if err != nil {
log.WithFields(log.Fields{
"Topic": "Zebra",
- }).Warnf("failed to serialize: %s", m)
+ }).Warnf("failed to serialize: %v", m)
continue
}