openconfig / lemming

An OpenConfig reference device implementation
Apache License 2.0
31 stars 9 forks source link

grpc.NewClient breaks sysrib #433

Open wenovus opened 5 months ago

wenovus commented 5 months ago

This breaks TestRoutePropagation in bgp/tests/local_tests

diff --git a/gribi/gribi.go b/gribi/gribi.go
index edf5803..d86ed3e 100644
--- a/gribi/gribi.go
+++ b/gribi/gribi.go
@@ -74,7 +74,7 @@ func New(s *grpc.Server, gClient gpb.GNMIClient, target string, root *oc.Root, s
 // - root, if specified, will be used to populate connected routes into the RIB
 // manager. Note this is intended to be used for unit/standalone device testing.
 func createGRIBIServer(gClient gpb.GNMIClient, target string, root *oc.Root, sysribAddr string) (*server.Server, error) {
-       gzebraConn, err := grpc.NewClient(sysribAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
+       gzebraConn, err := grpc.Dial(sysribAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
        if err != nil {
                return nil, fmt.Errorf("cannot dial to sysrib, %v", err)
        }