Documentation
¶
Overview ¶
Package device contains a shim definition of Device to insulate the onos-config subsystem from the deprecation of onos-topo/api/device.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Credentials ¶
type Credentials struct {
// user with which to connect to the device
User string
// password for connecting to the device
Password string
}
Credentials is the device credentials
type Device ¶
type Device struct {
// globally unique device identifier; maps to Object.ID
ID ID
// host:port of the device
Address string
// device target
Target string
// device software version
Version string
// timeout indicates the device request timeout
Timeout *time.Duration
// credentials for connecting to the device
Credentials Credentials
// TLS configuration for connecting to the device
TLS TLSConfig
// type of the device
Type Type
// role for the device
Role Role
Protocols []*topo.ProtocolState
// user-friendly tag
Displayname string
// arbitrary mapping of attribute keys/values
Attributes map[string]string
// revision of the underlying Object
Revision topo.Revision
}
Device structure provide a shim for topo.Object
type ListResponse ¶
type ListResponse struct {
// type of the event
Type ListResponseType
// device is the device on which the event occurred
Device *Device
}
ListResponse carries a single device event
type ListResponseType ¶
type ListResponseType int32
ListResponseType is a device event type
const ( // ListResponseNONE obviously ListResponseNONE ListResponseType = 0 // ListResponseADDED obviously ListResponseADDED ListResponseType = 1 // ListResponseUPDATED obviously ListResponseUPDATED ListResponseType = 2 // ListResponseREMOVED obviously ListResponseREMOVED ListResponseType = 3 )
type TLSConfig ¶
type TLSConfig struct {
// name of the device's CA certificate
CaCert string
// name of the device's certificate
Cert string
// name of the device's TLS key
Key string
// indicates whether to connect to the device over plaintext
Plain bool
// indicates whether to connect to the device with insecure communication
Insecure bool
}
TLSConfig contains information pertinent to establishing a secure connection
Click to show internal directories.
Click to hide internal directories.