Newer
Older
package nucleus
import (
"github.com/google/uuid"
"github.com/openconfig/ygot/ygot"
)
type Device struct {
// Device inherits properties of ygot.GoStruct
ygot.GoStruct
// SBI is the device's southbound interface implementation
SBI SouthboundInterface `json:"-"`
// Config is the device's config. Under revision
// Transport is the device's Transport implementation
Manuel Kieweg
committed
}
func NewDevice(sbi SouthboundInterface, addr, username, password string,
transport Transport) *Device {
return &Device{
GoStruct: sbi.Schema().Root,
SBI: sbi,
Config: DeviceConfig{
Uuid: uuid.New(),
Address: addr,
Username: username,
Password: password,
},
Transport: transport,
}
}
Uuid uuid.UUID
Address string
Username string
Password string