Documentation
¶
Overview ¶
Package communicator contains the logic for interacting with device classes. It contains methods that read out the .yaml files representing device classes. On top of that, code communicators that extend .yaml files can be added here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Condition ¶
type Condition struct { Type string `yaml:"type"` MatchMode matchMode `yaml:"match_mode" mapstructure:"match_mode"` Value []string `yaml:"values" mapstructure:"values"` }
Condition is a single condition.
type ConditionSet ¶
type ConditionSet struct { LogicalOperator logicalOperator Conditions []condition }
ConditionSet defines a set of conditions.
type HTTPCondition ¶
HTTPCondition is a condition based on http.
type ModelCondition ¶
type ModelCondition struct {
Condition `yaml:",inline" mapstructure:",squash"`
}
ModelCondition is a condition based on a model.
type ModelSeriesCondition ¶
type ModelSeriesCondition struct {
Condition `yaml:",inline" mapstructure:",squash"`
}
ModelSeriesCondition is a condition based on a model series.
type NetworkDeviceCommunicator ¶
type NetworkDeviceCommunicator interface { // GetDeviceClass returns the device class of a network device. GetDeviceClass() string // GetAvailableComponents returns the components available for a network device. GetAvailableComponents() []string // GetIdentifyProperties returns the identify properties of a device like vendor, model... GetIdentifyProperties(ctx context.Context) (device.Properties, error) // GetCPUComponent returns the cpu component of a device if available. GetCPUComponent(ctx context.Context) (device.CPUComponent, 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) // contains filtered or unexported methods }
NetworkDeviceCommunicator represents a communicator for a device.
func CreateNetworkDeviceCommunicator ¶
func CreateNetworkDeviceCommunicator(ctx context.Context, deviceClassIdentifier string) (NetworkDeviceCommunicator, error)
CreateNetworkDeviceCommunicator creates a communicator.
func IdentifyNetworkDeviceCommunicator ¶
func IdentifyNetworkDeviceCommunicator(ctx context.Context) (NetworkDeviceCommunicator, error)
IdentifyNetworkDeviceCommunicator identifies a devices and creates a network device communicator.
type SnmpCondition ¶
type SnmpCondition struct { Condition `yaml:",inline" mapstructure:",squash"` network.SNMPGetConfiguration `yaml:",inline" mapstructure:",squash"` }
SnmpCondition is a condition based on snmp.
type VendorCondition ¶
type VendorCondition struct {
Condition `yaml:",inline" mapstructure:",squash"`
}
VendorCondition is a condition based on a vendor.
Source Files
¶
- base.go
- ceraos-ip10.go
- create.go
- device_class.go
- device_class_communicator.go
- device_class_condition.go
- device_class_group_properties.go
- device_class_operator.go
- device_class_properties.go
- device_class_to_code_communicator.go
- ekinops.go
- ekinops_module_reader.go
- ekinops_module_reader_amplifier.go
- ekinops_module_reader_opm.go
- ekinops_module_reader_transponder.go
- generic.go
- ios.go
- ironware.go
- network_device_communicator.go
- network_device_communicator_adapter.go
- powerone.go