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

disable protp tap in set

parent d625f7e5
No related branches found
No related tags found
2 merge requests!120Resolve "Code Quality",!90Develop
...@@ -6,6 +6,7 @@ import ( ...@@ -6,6 +6,7 @@ import (
"code.fbi.h-da.de/cocsn/gosdn/nucleus/util/proto" "code.fbi.h-da.de/cocsn/gosdn/nucleus/util/proto"
"context" "context"
pb "google.golang.org/protobuf/proto" pb "google.golang.org/protobuf/proto"
"os"
) )
// Set sends a gNMI Set request to the specified target. Only one // Set sends a gNMI Set request to the specified target. Only one
...@@ -39,8 +40,11 @@ func Set(a, u, p, typ string, args ...string) error { ...@@ -39,8 +40,11 @@ func Set(a, u, p, typ string, args ...string) error {
return err return err
} }
if err := proto.Write(resp.(pb.Message), "resp-set-system-config-hostname"); err != nil { _, tap := os.LookupEnv("GOSDN_TAP")
return err if tap {
if err := proto.Write(resp.(pb.Message), "resp-set-system-config-hostname"); err != nil {
return err
}
} }
return nil return nil
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment