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

clean up

parent 28b0f2c9
Branches
Tags
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
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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment