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

removed encoding from device

parent 3a7158cc
Branches
Tags
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 !98. Comments created here will be created in the context of that merge request.
......@@ -19,12 +19,8 @@ func main() {
device := &nucleus.Device{
SBI: sbi,
Config: nucleus.DeviceConfig{
Uuid: uuid.New(),
Address: "localhost:9339",
Username: "admin",
Password: "arista",
Uuid: uuid.New(),
},
Encoding: gpb.Encoding_PROTO,
}
pnd := nucleus.NewPND("openconfig", sbi)
if err := pnd.AddDevice(device); err != nil {
......@@ -33,9 +29,9 @@ func main() {
transport := &nucleus.Gnmi{SetNode: sbi.SetNode()}
cfg := &gnmi.Config{
Addr: device.Config.Address,
Password: device.Config.Password,
Username: device.Config.Username,
Addr: "localhost:9339",
Username: "admin",
Password: "arista",
Encoding: gpb.Encoding_PROTO,
}
transport.SetConfig(cfg)
......
......@@ -2,7 +2,6 @@ package nucleus
import (
"github.com/google/uuid"
gpb "github.com/openconfig/gnmi/proto/gnmi"
"github.com/openconfig/ygot/ygot"
)
......@@ -18,10 +17,6 @@ type Device struct {
// Transport is the device's Transport implementation
Transport Transport
// Encoding is the gNMI encoding. API boundary edge case
// TODO: Move to transport, gNMI dependency
Encoding gpb.Encoding
}
type DeviceConfig struct {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment