Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
biplamal committed Jul 5, 2024
1 parent fc4b519 commit 9652b6d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion helpers/dut/gnmi.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,15 @@ func NewGnmiClient(d *DutApi) (*GnmiClient, error) {
location := fmt.Sprintf("%s:%d", d.dutConfig.Host, d.dutConfig.GnmiPort)
d.t.Logf("Creating gNMI client for server %s ...\n", location)

grpcConn, err := grpc.Dial(
grpcConn, err := grpc.NewClient(
location,
grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{InsecureSkipVerify: true})),
grpc.WithPerRPCCredentials(&grpcPassCred{
username: d.dutConfig.GnmiUsername,
password: d.dutConfig.GnmiPassword,
}),
)

if err != nil {
return nil, fmt.Errorf("failed to dial gRPC for location %s: %v", location, err)
}
Expand Down

0 comments on commit 9652b6d

Please sign in to comment.