Documentation ¶
Index ¶
- Constants
- Variables
- type BMCQueryor
- type MockBmclib
- func (m *MockBmclib) Close(_ context.Context) error
- func (m *MockBmclib) GetBiosConfiguration(_ context.Context) (biosConfig map[string]string, err error)
- func (m *MockBmclib) Inventory(_ context.Context) (*common.Device, error)
- func (m *MockBmclib) Open(_ context.Context) error
- func (m *MockBmclib) SetMockDevice(d *common.Device)
- type Queryor
Constants ¶
View Source
const ( LoginError model.CollectorError = "LoginError" InventoryError model.CollectorError = "InventoryError" GetBiosConfigError model.CollectorError = "GetBiosConfigError" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BMCQueryor ¶
type BMCQueryor interface { Open(ctx context.Context) error Close(ctx context.Context) error Inventory(ctx context.Context) (*common.Device, error) GetBiosConfiguration(ctx context.Context) (map[string]string, error) GetPowerState(ctx context.Context) (state string, err error) }
BMCQueryor interface defines methods that the bmclib client exposes this is mainly to swap the bmclib instance for tests
type MockBmclib ¶
type MockBmclib struct { // embed bmclib client to provide methods bmclibv2.Client // contains filtered or unexported fields }
nolint:govet // fieldalignment, pointless in tests
func NewMockBmclib ¶
func NewMockBmclib() *MockBmclib
func NewMockBmclibClient ¶
func NewMockBmclibClient() *MockBmclib
func (*MockBmclib) GetBiosConfiguration ¶
func (*MockBmclib) SetMockDevice ¶
func (m *MockBmclib) SetMockDevice(d *common.Device)
type Queryor ¶
type Queryor struct {
// contains filtered or unexported fields
}
OutOfBand collector collects hardware, firmware inventory out of band
func NewQueryor ¶
NewQueryor returns a instance of the Queryor inventory collector
func (*Queryor) BiosConfiguration ¶
func (*Queryor) Inventory ¶
Inventory retrieves device component and firmware information and updates the given asset object with the inventory
func (*Queryor) SessionActive ¶
func (o *Queryor) SessionActive(ctx context.Context, bmc BMCQueryor) bool
Click to show internal directories.
Click to hide internal directories.