Versions in this module Expand all Collapse all v0 v0.5.1 Oct 10, 2024 Changes in this version + var ErrInventoryDeviceObjNil = errors.New("method Inventory() expects a valid device object, got nil") + var ErrPanic = errors.New("recovered from panic") + var ErrUpdaterUtilNotIdentified = errors.New("updater utility not identifed") + var ErrVendorComponentOptions = errors.New("component vendor does not match update options vendor attribute") + var ErrVirtualDiskManagerUtilNotIdentified = errors.New("virtual disk management utility not identifed") + func UpdateAll(ctx context.Context, device *common.Device, options []*model.UpdateOptions) error + func UpdateBIOS(ctx context.Context, bios *common.BIOS, options *model.UpdateOptions) error + func UpdateBMC(ctx context.Context, bmc *common.BMC, options *model.UpdateOptions) error + func UpdateComponent(ctx context.Context, device *common.Device, option *model.UpdateOptions) error + func UpdateDrive(ctx context.Context, drives []*common.Drive, options *model.UpdateOptions) error + func UpdateNIC(ctx context.Context, nics []*common.NIC, options *model.UpdateOptions) error + func UpdateRequirements(componentSlug, componentVendor, componentModel string) (*model.UpdateRequirements, error) + type BIOSCollector interface + BIOS func(ctx context.Context) (*common.BIOS, error) + type BIOSConfiguror interface + GetBIOSConfiguration func(ctx context.Context, deviceModel string) (map[string]string, error) + type BIOSUpdater interface + UpdateBIOS func(ctx context.Context, updateFile, modelNumber string) error + func GetBIOSUpdater(vendor string) (BIOSUpdater, error) + type BMCCollector interface + BMC func(ctx context.Context) (*common.BMC, error) + type BMCUpdater interface + UpdateBMC func(ctx context.Context, updateFile, modelNumber string) error + func GetBMCUpdater(vendor string) (BMCUpdater, error) + type CPLDCollector interface + CPLDs func(ctx context.Context) ([]*common.CPLD, error) + type CPLDUpdater interface + UpdateCPLD func() error + type Collectors struct + DriveCapabilitiesCollectors []DriveCapabilityCollector + DriveCollectors []DriveCollector + StorageControllerCollectors []StorageControllerCollector + func (c *Collectors) Empty() bool + type DeviceManager interface + type DriveCapabilityCollector interface + DriveCapabilities func(ctx context.Context, logicalName string) ([]*common.Capability, error) + type DriveCollector interface + Drives func(ctx context.Context) ([]*common.Drive, error) + func DriveCollectorByStorageControllerVendor(vendor string, trace bool) DriveCollector + type DriveUpdater interface + UpdateDrive func(ctx context.Context, updateFile, modelNumber, serialNumber string) error + func GetDriveUpdater(vendor string) (DriveUpdater, error) + type DriveWiper interface + WipeDrive func(context.Context, *logrus.Logger, *common.Drive) error + type FirmwareChecksumCollector interface + BIOSLogoChecksum func(ctx context.Context) (string, error) + type Getter interface + GetBIOSConfiguration func(ctx context.Context) (map[string]string, error) + GetInventory func(ctx context.Context, options ...Option) (*common.Device, error) + GetInventoryOEM func(ctx context.Context, device *common.Device, options *model.UpdateOptions) error + GetModel func() string + GetVendor func() string + ListAvailableUpdates func(ctx context.Context, options *model.UpdateOptions) (*common.Device, error) + RebootRequired func() bool + UpdateRequirements func(ctx context.Context, componentSlug, componentVendor, componentModel string) (*model.UpdateRequirements, error) + UpdatesApplied func() bool + type InventoryCollector interface + Collect func(ctx context.Context, device *common.Device) error + type InventoryCollectorAction struct + func NewInventoryCollectorAction(ll *logrus.Logger, options ...Option) *InventoryCollectorAction + func (a *InventoryCollectorAction) Collect(ctx context.Context, device *common.Device) error + func (a *InventoryCollectorAction) CollectBIOS(ctx context.Context) (err error) + func (a *InventoryCollectorAction) CollectBMC(ctx context.Context) (err error) + func (a *InventoryCollectorAction) CollectCPLDs(ctx context.Context) (err error) + func (a *InventoryCollectorAction) CollectDriveCapabilities(ctx context.Context) (err error) + func (a *InventoryCollectorAction) CollectDrives(ctx context.Context) (err error) + func (a *InventoryCollectorAction) CollectFirmwareChecksums(ctx context.Context) (err error) + func (a *InventoryCollectorAction) CollectNICs(ctx context.Context) (err error) + func (a *InventoryCollectorAction) CollectStorageControllers(ctx context.Context) (err error) + func (a *InventoryCollectorAction) CollectTPMs(ctx context.Context) (err error) + func (a *InventoryCollectorAction) CollectUEFIVariables(ctx context.Context) (err error) + type NICCollector interface + NICs func(ctx context.Context) ([]*common.NIC, error) + type NICUpdater interface + UpdateNIC func(ctx context.Context, updateFile, modelNumber string, force bool) error + func GetNICUpdater(vendor string) (NICUpdater, error) + type Option func(*InventoryCollectorAction) + func WithCollectors(collectors *Collectors) Option + func WithDisabledCollectorUtilities(utilityNames []model.CollectorUtility) Option + func WithDynamicCollection() Option + func WithFailOnError() Option + func WithTraceLevel() Option + type RaidController interface + type Setter interface + SetBIOSConfiguration func(ctx context.Context, config map[string]string) error + type StorageControllerAction struct + Logger *logrus.Logger + func NewStorageControllerAction(logger *logrus.Logger) *StorageControllerAction + func (s *StorageControllerAction) CreateVirtualDisk(ctx context.Context, hba *common.StorageController, ...) error + func (s *StorageControllerAction) DestroyVirtualDisk(ctx context.Context, hba *common.StorageController, ...) error + func (s *StorageControllerAction) GetControllerUtility(vendorName, modelName string) (VirtualDiskManager, error) + func (s *StorageControllerAction) GetWipeUtility(drive *common.Drive) (DriveWiper, error) + func (s *StorageControllerAction) ListVirtualDisks(ctx context.Context, hba *common.StorageController) ([]*common.VirtualDisk, error) + func (s *StorageControllerAction) WipeDrive(ctx context.Context, log *logrus.Logger, drive *common.Drive) error + type StorageControllerCollector interface + StorageControllers func(ctx context.Context) ([]*common.StorageController, error) + func StorageControllerCollectorByVendor(vendor string, trace bool) StorageControllerCollector + type StorageControllerUpdater interface + UpdateStorageController func() error + type TPMCollector interface + TPMs func(ctx context.Context) ([]*common.TPM, error) + type UEFIVarsCollector interface + GetUEFIVars func(ctx context.Context) (utils.UEFIVars, error) + type UpdateRequirementsGetter interface + UpdateRequirements func(componentModel string) *model.UpdateRequirements + type Updater interface + ApplyUpdate func(ctx context.Context, updateFile, component string) error + InstallUpdates func(ctx context.Context, options *model.UpdateOptions) error + type Updaters struct + BIOS BIOSUpdater + BMC BMCUpdater + Drives DriveUpdater + NICs NICUpdater + StorageControllers StorageControllerUpdater + type UtilAttributeGetter interface + Attributes func() (utilName model.CollectorUtility, absolutePath string, err error) + type Utility interface + type VirtualDiskCreator interface + CreateVirtualDisk func(ctx context.Context, raidMode string, physicalDisks []uint, name string, ...) error + type VirtualDiskDestroyer interface + DestroyVirtualDisk func(ctx context.Context, virtualDiskID int) error + type VirtualDiskManager interface + VirtualDisks func(ctx context.Context) ([]*utils.MvcliDevice, error)