Skip to content
Snippets Groups Projects
Commit 62af76aa authored by Manuel Kieweg's avatar Manuel Kieweg
Browse files

fixed authentication issue

parent 41062266
No related branches found
No related tags found
2 merge requests!91"Overhaul Architecture",!90Develop
Pipeline #63776 passed with warnings
This commit is part of merge request !91. Comments created here will be created in the context of that merge request.
......@@ -32,7 +32,7 @@ func main() {
Addr: "portainer.danet.fbi.h-da.de:6030",
Username: "admin",
Password: "arista",
Encoding: gpb.Encoding_PROTO,
Encoding: gpb.Encoding_JSON_IETF,
}
transport.SetConfig(cfg)
......
......@@ -141,6 +141,7 @@ func (g *Gnmi) getWithRequest(ctx context.Context, req *gpb.GetRequest) (interfa
// Set calls GNMI set
func (g *Gnmi) set(ctx context.Context, setOps []*gnmi.Operation,
exts ...*gnmi_ext.Extension) error {
ctx = gnmi.NewContext(ctx, g.config)
client, err := gnmi.Dial(g.config)
if err != nil {
return err
......@@ -150,6 +151,7 @@ func (g *Gnmi) set(ctx context.Context, setOps []*gnmi.Operation,
// Subscribe calls GNMI subscribe
func (g *Gnmi) subscribe(ctx context.Context) error {
ctx = gnmi.NewContext(ctx, g.config)
client, err := gnmi.Dial(g.config)
if err != nil {
return err
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment