Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Communicator ¶
type Communicator interface {
// GetIdentifier returns the identifier of the class of a network device.
GetIdentifier() string
// GetAvailableComponents returns the components available for a network device.
GetAvailableComponents() []string
// HasComponent checks whether the specified component is available.
HasComponent(component component.Component) bool
// Match checks if the device matches the device class
Match(ctx context.Context) (bool, error)
// UpdateConnection updates the device connection with class specific values
UpdateConnection(ctx context.Context) error
// GetIdentifyProperties returns the identify properties of a device like vendor, model...
GetIdentifyProperties(ctx context.Context) (device.Properties, error)
// GetUPSComponent returns the ups component of a device if available.
GetUPSComponent(ctx context.Context) (device.UPSComponent, error)
// GetSBCComponent returns the sbc component of a device if available.
GetSBCComponent(ctx context.Context) (device.SBCComponent, error)
// GetServerComponent returns the sbc component of a device if available.
GetServerComponent(ctx context.Context) (device.ServerComponent, error)
// GetDiskComponent returns the disk component of a device if available.
GetDiskComponent(ctx context.Context) (device.DiskComponent, error)
// GetHardwareHealthComponent returns the hardware health component of a device if available.
GetHardwareHealthComponent(ctx context.Context) (device.HardwareHealthComponent, error)
// GetHighAvailabilityComponent returns the hardware health component of a device if available.
GetHighAvailabilityComponent(ctx context.Context) (device.HighAvailabilityComponent, error)
Functions
}
Communicator represents a communicator for a device.
func CreateNetworkDeviceCommunicator ¶
func CreateNetworkDeviceCommunicator(deviceClassCommunicator Communicator, codeCommunicator Functions) Communicator
CreateNetworkDeviceCommunicator creates a network device communicator which combines a device class communicator and code communicator
type Functions ¶
type Functions interface {
// GetVendor returns the vendor of a device.
GetVendor(ctx context.Context) (string, error)
// GetModel returns the model of a device.
GetModel(ctx context.Context) (string, error)
// GetModelSeries returns the model series of a device.
GetModelSeries(ctx context.Context) (string, error)
// GetSerialNumber returns the serial number of a device.
GetSerialNumber(ctx context.Context) (string, error)
// GetOSVersion returns the os version of a device.
GetOSVersion(ctx context.Context) (string, error)
// GetInterfaces returns the interfaces of a device.
GetInterfaces(ctx context.Context, filter ...groupproperty.Filter) ([]device.Interface, error)
// GetCountInterfaces returns the count of interfaces of a device.
GetCountInterfaces(ctx context.Context) (int, error)
// contains filtered or unexported methods
}
Functions represents all overrideable functions which can be used to communicate with a device.
Click to show internal directories.
Click to hide internal directories.