From 4abc9504365dde17a642b72e4e7811013380d7ab Mon Sep 17 00:00:00 2001 From: Manuel Kieweg <mail@manuelkieweg.de> Date: Tue, 9 Feb 2021 16:23:40 +0000 Subject: [PATCH] removed encoding from device --- cmd/gnmi/gnmi.go | 12 ++++-------- nucleus/device.go | 5 ----- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/cmd/gnmi/gnmi.go b/cmd/gnmi/gnmi.go index 65d3640ea..fe2ee8a28 100644 --- a/cmd/gnmi/gnmi.go +++ b/cmd/gnmi/gnmi.go @@ -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) diff --git a/nucleus/device.go b/nucleus/device.go index 73069aeba..253941347 100644 --- a/nucleus/device.go +++ b/nucleus/device.go @@ -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 { -- GitLab