diff --git a/nucleus/cli-handling.go b/nucleus/cli-handling.go index d3c2e4bfb2c2515347cd6dc42c9b5ad60bdc9cdf..d409735d105350364712fc82531873317b9eb8fa 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 42357ea185f5f5fa6cc91bb44f6fc2d0b545b6b0..39a06004180255220633639853353832094f9fe1 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