Skip to content
Snippets Groups Projects
Commit 4abc9504 authored by Manuel Kieweg's avatar Manuel Kieweg
Browse files

removed encoding from device

parent 3a7158cc
No related branches found
No related tags found
4 merge requests!100Resolve "Remove all exported API calls from device",!98Resolve "gNMI proto encoding",!91"Overhaul Architecture",!90Develop
Pipeline #63658 passed with warnings
This commit is part of merge request !91. Comments created here will be created in the context of that merge request.
...@@ -19,12 +19,8 @@ func main() { ...@@ -19,12 +19,8 @@ func main() {
device := &nucleus.Device{ device := &nucleus.Device{
SBI: sbi, SBI: sbi,
Config: nucleus.DeviceConfig{ Config: nucleus.DeviceConfig{
Uuid: uuid.New(), Uuid: uuid.New(),
Address: "localhost:9339",
Username: "admin",
Password: "arista",
}, },
Encoding: gpb.Encoding_PROTO,
} }
pnd := nucleus.NewPND("openconfig", sbi) pnd := nucleus.NewPND("openconfig", sbi)
if err := pnd.AddDevice(device); err != nil { if err := pnd.AddDevice(device); err != nil {
...@@ -33,9 +29,9 @@ func main() { ...@@ -33,9 +29,9 @@ func main() {
transport := &nucleus.Gnmi{SetNode: sbi.SetNode()} transport := &nucleus.Gnmi{SetNode: sbi.SetNode()}
cfg := &gnmi.Config{ cfg := &gnmi.Config{
Addr: device.Config.Address, Addr: "localhost:9339",
Password: device.Config.Password, Username: "admin",
Username: device.Config.Username, Password: "arista",
Encoding: gpb.Encoding_PROTO, Encoding: gpb.Encoding_PROTO,
} }
transport.SetConfig(cfg) transport.SetConfig(cfg)
......
...@@ -2,7 +2,6 @@ package nucleus ...@@ -2,7 +2,6 @@ package nucleus
import ( import (
"github.com/google/uuid" "github.com/google/uuid"
gpb "github.com/openconfig/gnmi/proto/gnmi"
"github.com/openconfig/ygot/ygot" "github.com/openconfig/ygot/ygot"
) )
...@@ -18,10 +17,6 @@ type Device struct { ...@@ -18,10 +17,6 @@ type Device struct {
// Transport is the device's Transport implementation // Transport is the device's Transport implementation
Transport Transport Transport Transport
// Encoding is the gNMI encoding. API boundary edge case
// TODO: Move to transport, gNMI dependency
Encoding gpb.Encoding
} }
type DeviceConfig struct { type DeviceConfig struct {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment