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
9ce4b7ba
Commit
9ce4b7ba
authored
2 years ago
by
Malte Bauch
Browse files
Options
Downloads
Patches
Plain Diff
Remove `SetModel` for NetworkElement
parent
a902bd06
No related branches found
No related tags found
1 merge request
!401
Change the current gosdn plugin implementation from Go's internal plugin system to hashicorp's go-plugins
Pipeline
#135865
failed
2 years ago
Stage: build
Stage: test
Stage: analyze
Stage: integration-test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
controller/interfaces/networkelement/networkElement.go
+0
-2
0 additions, 2 deletions
controller/interfaces/networkelement/networkElement.go
controller/nucleus/networkElement.go
+0
-24
0 additions, 24 deletions
controller/nucleus/networkElement.go
with
0 additions
and
26 deletions
controller/interfaces/networkelement/networkElement.go
+
0
−
2
View file @
9ce4b7ba
...
...
@@ -5,7 +5,6 @@ import (
"code.fbi.h-da.de/danet/gosdn/controller/interfaces/plugin"
"code.fbi.h-da.de/danet/gosdn/controller/interfaces/transport"
"github.com/google/uuid"
"github.com/openconfig/ygot/ygot"
"google.golang.org/protobuf/proto"
tpb
"code.fbi.h-da.de/danet/gosdn/api/go/gosdn/transport"
...
...
@@ -18,7 +17,6 @@ type NetworkElement interface {
GetModel
()
([]
byte
,
error
)
GetPlugin
()
plugin
.
Plugin
GetModelAsFilteredCopy
()
([]
byte
,
error
)
SetModel
(
ygot
.
GoStruct
)
Transport
()
transport
.
Transport
Name
()
string
ProcessResponse
(
proto
.
Message
)
error
...
...
This diff is collapsed.
Click to expand it.
controller/nucleus/networkElement.go
+
0
−
24
View file @
9ce4b7ba
...
...
@@ -11,7 +11,6 @@ import (
"code.fbi.h-da.de/danet/gosdn/controller/interfaces/transport"
"github.com/docker/docker/pkg/namesgenerator"
"github.com/google/uuid"
"github.com/openconfig/ygot/ygot"
"go.mongodb.org/mongo-driver/bson"
"google.golang.org/protobuf/proto"
)
...
...
@@ -97,12 +96,6 @@ func (n *CommonNetworkElement) GetModelAsFilteredCopy() ([]byte, error) {
return
n
.
Plugin
.
Model
(
true
)
}
// SetModel sets the ygot representation of the Network Element.
// TODO: check if needed; if this is the case, then extend plugin to provide this functionality.
func
(
n
*
CommonNetworkElement
)
SetModel
(
model
ygot
.
GoStruct
)
{
//n.Model = model
}
// Transport returns the Transport of the network element.
func
(
n
*
CommonNetworkElement
)
Transport
()
transport
.
Transport
{
return
n
.
transport
...
...
@@ -173,12 +166,6 @@ func (n *CsbiNetworkElement) GetModelAsFilteredCopy() ([]byte, error) {
return
n
.
Plugin
.
Model
(
true
)
}
// SetModel returns the ygot representation of the Network Element.
// TODO: check if needed; if this is the case, then extend plugin to provide this functionality.
func
(
n
*
CsbiNetworkElement
)
SetModel
(
model
ygot
.
GoStruct
)
{
//n.Model = model
}
// Transport returns the Transport of the network element.
func
(
n
*
CsbiNetworkElement
)
Transport
()
transport
.
Transport
{
return
n
.
transport
...
...
@@ -329,14 +316,3 @@ func (d *CommonNetworkElement) GetModelAsString() (string, error) {
byteModel
,
err
:=
d
.
Plugin
.
Model
(
false
)
return
string
(
byteModel
),
err
}
//TODO: check if this can be removed
//func (n *CommonNetworkElement) getYgotEmitJSONConfig() *ygot.EmitJSONConfig {
// return &ygot.EmitJSONConfig{
// Format: ygot.RFC7951,
// Indent: "",
// SkipValidation: true,
// RFC7951Config: &ygot.RFC7951JSONConfig{
// AppendModuleName: true,
// }}
//}
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