diff --git a/nucleus/cli-handling.go b/nucleus/cli-handling.go index 2749fbd12473d0b563ba6a78e9ff3dc3eded6407..a1172fdbc2353e5ae48edea5a5649dceadf1b5f7 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 bbf3dbd95533e75bad0d76f9829ff6c8f19f7a6d..bb0cc0bb00072711f1a906baf5a140e6b0107e16 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 }