From 730bdec623606da469cde16b73f0c5019eefc11d Mon Sep 17 00:00:00 2001 From: Malte Bauch <malte.bauch@stud.h-da.de> Date: Wed, 10 Feb 2021 19:21:51 +0100 Subject: [PATCH] removed unnecessary logs --- nucleus/cli-handling.go | 4 +++- nucleus/controller.go | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/nucleus/cli-handling.go b/nucleus/cli-handling.go index 2749fbd12..a1172fdbc 100644 --- a/nucleus/cli-handling.go +++ b/nucleus/cli-handling.go @@ -20,6 +20,7 @@ import ( pb "code.fbi.h-da.de/cocsn/gosdn/api/proto" "code.fbi.h-da.de/cocsn/gosdn/forks/goarista/gnmi" + gpb "github.com/openconfig/gnmi/proto/gnmi" log "github.com/sirupsen/logrus" "google.golang.org/grpc" "google.golang.org/grpc/health" @@ -211,11 +212,13 @@ func (s *server) AddDevice(ctx context.Context, in *pb.AddDeviceRequest) (*pb.Ad } sbi := s.core.principalNetworkDomains[uuidPND].GetSBIs()["default"] + //TODO: could the transport and the related config be created in device? transport := &Gnmi{SetNode: sbi.SetNode()} cfg := &gnmi.Config{ Addr: in.Device.Address, Username: in.Device.Username, Password: in.Device.Password, + Encoding: gpb.Encoding_JSON_IETF, } transport.SetConfig(cfg) @@ -261,7 +264,6 @@ func (s *server) HandleDeviceGetRequest(ctx context.Context, in *pb.DeviceGetReq if err != nil { return &pb.DeviceGetReply{Message: err.Error()}, err } - log.Info(device) d, err := json.MarshalIndent(device, "", "\t") if err != nil { diff --git a/nucleus/controller.go b/nucleus/controller.go index bbf3dbd95..bb0cc0bb0 100644 --- a/nucleus/controller.go +++ b/nucleus/controller.go @@ -34,9 +34,6 @@ func (c *Core) Initialize(IsRunningChannel chan bool) { } c.AttachDatabase() c.CreateSouthboundInterfaces() - for sbi := range c.southboundInterfaces { - log.Info(sbi) - } c.IsRunning = IsRunningChannel } -- GitLab