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

Remove `SetModel` for NetworkElement

parent a902bd06
No related branches found
No related tags found
1 merge request!401Change the current gosdn plugin implementation from Go's internal plugin system to hashicorp's go-plugins
Pipeline #135865 failed
......@@ -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
......
......@@ -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,
// }}
//}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment