Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
goSDN
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
danet
goSDN
Commits
746f7102
Commit
746f7102
authored
4 years ago
by
Malte Bauch
Browse files
Options
Downloads
Patches
Plain Diff
clean up
parent
28b0f2c9
Branches
Branches containing commit
Tags
Tags containing commit
3 merge requests
!97
Resolve "PND handling via CLI and database"
,
!91
"Overhaul Architecture"
,
!90
Develop
Pipeline
#62213
passed with warnings
4 years ago
Stage: test
Stage: deploy
This commit is part of merge request
!91
. Comments created here will be created in the context of that merge request.
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
nucleus/cli-handling.go
+1
-2
1 addition, 2 deletions
nucleus/cli-handling.go
nucleus/southbound.go
+1
-3
1 addition, 3 deletions
nucleus/southbound.go
with
2 additions
and
5 deletions
nucleus/cli-handling.go
+
1
−
2
Edit
View file @
746f7102
...
...
@@ -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
.
Marshal
Indent
(
device
.
Device
,
""
,
"
\t
"
)
if
err
!=
nil
{
return
&
pb
.
DeviceGetReply
{
Message
:
err
.
Error
()},
err
...
...
This diff is collapsed.
Click to expand it.
nucleus/southbound.go
+
1
−
3
Edit
View file @
746f7102
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment