Documentation ¶
Index ¶
- Constants
- Variables
- type Mock
- type Repository
- type Serverservice
- func (s *Serverservice) AssetByID(ctx context.Context, id string) (*model.Asset, error)
- func (s *Serverservice) FirmwareByDeviceVendorModel(ctx context.Context, deviceVendor, deviceModel string) ([]*model.Firmware, error)
- func (s *Serverservice) FirmwareSetByID(ctx context.Context, id uuid.UUID) ([]*model.Firmware, error)
- type Yaml
Constants ¶
View Source
const (
InventorySourceYAML = "inventoryStoreYAML"
)
Variables ¶
View Source
var ( ErrNoAttributes = errors.New("no flasher attribute found") ErrAttributeList = errors.New("error in serverservice flasher attribute list") ErrAttributeCreate = errors.New("error in serverservice flasher attribute create") ErrAttributeUpdate = errors.New("error in serverservice flasher attribute update") ErrVendorModelAttributes = errors.New("device vendor, model attributes not found in serverservice") ErrDeviceStatus = errors.New("error serverservice device status") ErrDeviceID = errors.New("device UUID error") // ErrBMCAddress is returned when an error occurs in the BMC address lookup. ErrBMCAddress = errors.New("error in server BMC Address") // ErrDeviceState is returned when an error occurs in the device state lookup. ErrDeviceState = errors.New("error in device state") // ErrServerserviceAttrObj is retuned when an error occurred in unpacking the attribute. ErrServerserviceAttrObj = errors.New("serverservice attribute error") // ErrServerserviceVersionedAttrObj is retuned when an error occurred in unpacking the versioned attribute. ErrServerserviceVersionedAttrObj = errors.New("serverservice versioned attribute error") // ErrServerserviceQuery is returned when a server service query fails. ErrServerserviceQuery = errors.New("serverservice query returned error") ErrFirmwareSetLookup = errors.New("firmware set error") )
View Source
var (
ErrYamlSource = errors.New("error in Yaml inventory")
)
Functions ¶
This section is empty.
Types ¶
type Mock ¶
type Mock struct{}
func (*Mock) FirmwareByDeviceVendorModel ¶
type Repository ¶
type Repository interface { // AssetByID returns asset. AssetByID(ctx context.Context, id string) (*model.Asset, error) FirmwareSetByID(ctx context.Context, id uuid.UUID) ([]*model.Firmware, error) // FirmwareByDeviceVendorModel returns the firmware for the device vendor, model. FirmwareByDeviceVendorModel(ctx context.Context, deviceVendor, deviceModel string) ([]*model.Firmware, error) }
func NewMockInventory ¶
func NewMockInventory() (Repository, error)
func NewServerserviceStore ¶
func NewServerserviceStore(ctx context.Context, config *app.ServerserviceOptions, logger *logrus.Logger) (Repository, error)
func NewYamlInventory ¶
func NewYamlInventory(yamlFile string) (Repository, error)
NewYamlInventory returns a Yaml type that implements the inventory interface.
type Serverservice ¶
type Serverservice struct {
// contains filtered or unexported fields
}
func (*Serverservice) AssetByID ¶
AssetByID returns an Asset object with various attributes populated.
func (*Serverservice) FirmwareByDeviceVendorModel ¶
func (s *Serverservice) FirmwareByDeviceVendorModel(ctx context.Context, deviceVendor, deviceModel string) ([]*model.Firmware, error)
FirmwareByDeviceVendorModel returns the firmware for the device vendor, model.
func (*Serverservice) FirmwareSetByID ¶
func (s *Serverservice) FirmwareSetByID(ctx context.Context, id uuid.UUID) ([]*model.Firmware, error)
FirmwareSetByID returns a list of firmwares part of a firmware set identified by the given id.
type Yaml ¶
type Yaml struct {
YamlFile string
}
Yaml type implements the inventory interface
Click to show internal directories.
Click to hide internal directories.