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
9cca50b3
Commit
9cca50b3
authored
3 years ago
by
Manuel Kieweg
Browse files
Options
Downloads
Patches
Plain Diff
golint --fix
parent
6a993573
Branches
Branches containing commit
Tags
Tags containing commit
8 merge requests
!246
Develop
,
!245
Develop into Master
,
!244
Master into develop2 into master
,
!219
Draft: Testing
,
!214
Test pipelines
,
!195
DO NOT MERGE 2
,
!194
DO NOT MERGE! just for testing
,
!138
Develop
Pipeline
#74243
passed
3 years ago
Stage: test
Changes
3
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
nucleus/device.go
+10
-1
10 additions, 1 deletion
nucleus/device.go
nucleus/gnmi_transport.go
+2
-0
2 additions, 0 deletions
nucleus/gnmi_transport.go
nucleus/principalNetworkDomain.go
+1
-1
1 addition, 1 deletion
nucleus/principalNetworkDomain.go
with
13 additions
and
2 deletions
nucleus/device.go
+
10
−
1
View file @
9cca50b3
...
...
@@ -3,9 +3,9 @@ package nucleus
import
(
tpb
"code.fbi.h-da.de/cocsn/api/go/gosdn/transport"
"github.com/docker/docker/pkg/namesgenerator"
"github.com/golang/protobuf/proto"
"github.com/google/uuid"
"github.com/openconfig/ygot/ygot"
"google.golang.org/protobuf/proto"
)
// Device represents an Orchestrated Network Device (OND) which is managed by
...
...
@@ -21,6 +21,7 @@ type Device interface {
isDevice
()
}
// CommonDevice represents an OND
type
CommonDevice
struct
{
// UUID represents the Devices UUID
UUID
uuid
.
UUID
...
...
@@ -63,34 +64,42 @@ func (d *CommonDevice) ID() uuid.UUID {
return
d
.
UUID
}
// Model returns the ygot representation of the Device
func
(
d
*
CommonDevice
)
Model
()
ygot
.
GoStruct
{
return
d
.
GoStruct
}
// Transport returns the Transport of the device
func
(
d
*
CommonDevice
)
Transport
()
Transport
{
return
d
.
transport
}
// Name returns the name of the device
func
(
d
*
CommonDevice
)
Name
()
string
{
return
d
.
name
}
// SBI returns the sbi of the Device
func
(
d
*
CommonDevice
)
SBI
()
SouthboundInterface
{
return
d
.
sbi
}
// SetTransport sets the Device's Transport
func
(
d
*
CommonDevice
)
SetTransport
(
t
Transport
)
{
d
.
transport
=
t
}
// SetName sets the Device's name
func
(
d
*
CommonDevice
)
SetName
(
n
string
)
{
d
.
name
=
n
}
// SetSBI sets the Device's SBI
func
(
d
*
CommonDevice
)
SetSBI
(
sbi
SouthboundInterface
)
{
d
.
sbi
=
sbi
}
// ProcessResponse processes a response for the Device
func
(
d
*
CommonDevice
)
ProcessResponse
(
resp
proto
.
Message
)
error
{
return
d
.
transport
.
ProcessResponse
(
resp
,
d
.
GoStruct
,
d
.
sbi
.
Schema
())
}
...
...
This diff is collapsed.
Click to expand it.
nucleus/gnmi_transport.go
+
2
−
0
View file @
9cca50b3
...
...
@@ -342,10 +342,12 @@ func (g *Gnmi) Close() error {
return
nil
}
// SetPassthrough allows to pass an existing SetRequest. Used for cSBI
func
(
g
*
Gnmi
)
SetPassthrough
(
ctx
context
.
Context
,
req
*
gpb
.
SetRequest
)
(
*
gpb
.
SetResponse
,
error
)
{
return
g
.
client
.
Set
(
ctx
,
req
)
}
// GetPassthrough allows to pass an existing GetRequest. Used for cSBI
func
(
g
*
Gnmi
)
GetPassthrough
(
ctx
context
.
Context
,
req
*
gpb
.
GetRequest
)
(
*
gpb
.
GetResponse
,
error
)
{
return
g
.
client
.
Get
(
ctx
,
req
)
}
This diff is collapsed.
Click to expand it.
nucleus/principalNetworkDomain.go
+
1
−
1
View file @
9cca50b3
...
...
@@ -11,11 +11,11 @@ import (
"code.fbi.h-da.de/cocsn/gosdn/forks/goarista/gnmi"
"code.fbi.h-da.de/cocsn/gosdn/nucleus/errors"
"github.com/golang/protobuf/proto"
"github.com/google/uuid"
"github.com/openconfig/ygot/ygot"
"github.com/openconfig/ygot/ytypes"
log
"github.com/sirupsen/logrus"
"google.golang.org/protobuf/proto"
)
// PrincipalNetworkDomain provides an
...
...
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