From 746f7102675aa7b5ec58a19b3ab5535070fe406f Mon Sep 17 00:00:00 2001
From: Malte Bauch <malte.bauch@stud.h-da.de>
Date: Fri, 29 Jan 2021 18:18:05 +0100
Subject: [PATCH] clean up

---
 nucleus/cli-handling.go | 3 +--
 nucleus/southbound.go   | 4 +---
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/nucleus/cli-handling.go b/nucleus/cli-handling.go
index d3c2e4bfb..d409735d1 100644
--- a/nucleus/cli-handling.go
+++ b/nucleus/cli-handling.go
@@ -162,7 +162,6 @@ func (s *server) CreatePND(ctx context.Context, in *pb.CreatePNDRequest) (*pb.Cr
 	sbi := s.core.southboundInterfaces[in.GetSbi()]
 	id := uuid.New()
 	s.core.principalNetworkDomains[id] = NewPND(in.GetName(), in.GetDescription(), sbi)
-	//TODO: export
 	s.core.MarshallPNDs()
 
 	return &pb.CreatePNDReply{Message: "Created new PND: " + id.String()}, nil
@@ -260,7 +259,7 @@ func (s *server) HandleDeviceGetRequest(ctx context.Context, in *pb.DeviceGetReq
 	if err := device.Add(resp); err != nil {
 		return &pb.DeviceGetReply{Message: err.Error()}, err
 	}
-	d, err := json.Marshal(device.Device)
+	d, err := json.MarshalIndent(device.Device, "", "\t")
 	if err != nil {
 		return &pb.DeviceGetReply{Message: err.Error()}, err
 
diff --git a/nucleus/southbound.go b/nucleus/southbound.go
index 42357ea18..39a060041 100644
--- a/nucleus/southbound.go
+++ b/nucleus/southbound.go
@@ -5,10 +5,10 @@ import (
 
 	"code.fbi.h-da.de/cocsn/yang-models/generated/arista"
 	"code.fbi.h-da.de/cocsn/yang-models/generated/openconfig"
-	log "github.com/golang/glog"
 	gpb "github.com/openconfig/gnmi/proto/gnmi"
 	"github.com/openconfig/goyang/pkg/yang"
 	"github.com/openconfig/ygot/ytypes"
+	log "github.com/sirupsen/logrus"
 )
 
 var lock = &sync.Mutex{}
@@ -73,8 +73,6 @@ func GetOpenconfigInstance() SouthboundInterface {
 			log.Info("creating OpenConfig instance")
 			singleOpenConfig = &OpenConfig{}
 			singleOpenConfig.Name = "openconfig"
-			t := &Gnmi{SetNode: singleOpenConfig.SetNode()}
-			singleOpenConfig.Transport = t
 		}
 	}
 	return singleOpenConfig
-- 
GitLab