diff --git a/cmd/gnmi/gnmi.go b/cmd/gnmi/gnmi.go index 65d3640ea79c3710f696b62fd43132618d6989fb..fe2ee8a289e53eb5ac6b07fa1479b329110fdb6a 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 73069aeba8e293e9ba16023c042c224695a539d1..2539413479aa0c1ce87eae96a8c653642f397e72 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 {