Skip to content
Snippets Groups Projects
Commit 746f7102 authored by Malte Bauch's avatar Malte Bauch
Browse files

clean up

parent 28b0f2c9
No related branches found
No related tags found
3 merge requests!97Resolve "PND handling via CLI and database",!91"Overhaul Architecture",!90Develop
Pipeline #62213 passed with warnings
This commit is part of merge request !91. Comments created here will be created in the context of that merge request.
...@@ -162,7 +162,6 @@ func (s *server) CreatePND(ctx context.Context, in *pb.CreatePNDRequest) (*pb.Cr ...@@ -162,7 +162,6 @@ func (s *server) CreatePND(ctx context.Context, in *pb.CreatePNDRequest) (*pb.Cr
sbi := s.core.southboundInterfaces[in.GetSbi()] sbi := s.core.southboundInterfaces[in.GetSbi()]
id := uuid.New() id := uuid.New()
s.core.principalNetworkDomains[id] = NewPND(in.GetName(), in.GetDescription(), sbi) s.core.principalNetworkDomains[id] = NewPND(in.GetName(), in.GetDescription(), sbi)
//TODO: export
s.core.MarshallPNDs() s.core.MarshallPNDs()
return &pb.CreatePNDReply{Message: "Created new PND: " + id.String()}, nil return &pb.CreatePNDReply{Message: "Created new PND: " + id.String()}, nil
...@@ -260,7 +259,7 @@ func (s *server) HandleDeviceGetRequest(ctx context.Context, in *pb.DeviceGetReq ...@@ -260,7 +259,7 @@ func (s *server) HandleDeviceGetRequest(ctx context.Context, in *pb.DeviceGetReq
if err := device.Add(resp); err != nil { if err := device.Add(resp); err != nil {
return &pb.DeviceGetReply{Message: err.Error()}, err return &pb.DeviceGetReply{Message: err.Error()}, err
} }
d, err := json.Marshal(device.Device) d, err := json.MarshalIndent(device.Device, "", "\t")
if err != nil { if err != nil {
return &pb.DeviceGetReply{Message: err.Error()}, err return &pb.DeviceGetReply{Message: err.Error()}, err
......
...@@ -5,10 +5,10 @@ import ( ...@@ -5,10 +5,10 @@ import (
"code.fbi.h-da.de/cocsn/yang-models/generated/arista" "code.fbi.h-da.de/cocsn/yang-models/generated/arista"
"code.fbi.h-da.de/cocsn/yang-models/generated/openconfig" "code.fbi.h-da.de/cocsn/yang-models/generated/openconfig"
log "github.com/golang/glog"
gpb "github.com/openconfig/gnmi/proto/gnmi" gpb "github.com/openconfig/gnmi/proto/gnmi"
"github.com/openconfig/goyang/pkg/yang" "github.com/openconfig/goyang/pkg/yang"
"github.com/openconfig/ygot/ytypes" "github.com/openconfig/ygot/ytypes"
log "github.com/sirupsen/logrus"
) )
var lock = &sync.Mutex{} var lock = &sync.Mutex{}
...@@ -73,8 +73,6 @@ func GetOpenconfigInstance() SouthboundInterface { ...@@ -73,8 +73,6 @@ func GetOpenconfigInstance() SouthboundInterface {
log.Info("creating OpenConfig instance") log.Info("creating OpenConfig instance")
singleOpenConfig = &OpenConfig{} singleOpenConfig = &OpenConfig{}
singleOpenConfig.Name = "openconfig" singleOpenConfig.Name = "openconfig"
t := &Gnmi{SetNode: singleOpenConfig.SetNode()}
singleOpenConfig.Transport = t
} }
} }
return singleOpenConfig return singleOpenConfig
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment