machine

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// DefaultControllerMachineType is the default type for discovered Machines
	DefaultControllerMachineType = controllerMachineStateUnknown

	// Machine component attributes
	// MachineComponentVendor specifies the attribute name for the vendor of the component
	MachineComponentVendor = "Vendor"
	// MachineCPUCoreCount specifies the attribute name for number of cores in the CPU
	MachineCPUCoreCount = "Cores"
	// MachineCPUThreadCount specifies the attribute name for number of threads in the CPU
	MachineCPUThreadCount = "Threads"
	// MachineNetworkMacAddress specifies the attribute name for MAC address of the network interface
	MachineNetworkMacAddress = "MacAddress"
	// MachineNetworkDevice specifies the attribute name for the device name of the network interface
	MachineNetworkDevice = "Device"
	// MachineStorageFirmwareRevision specifies the attribute name for the firmware revision of the storage device
	MachineStorageFirmwareRevision = "FirmwareRev"
	// MachineBlockStorageRevision specifies the attribute name for the firmware revision of the storage device
	MachineBlockStorageRevision = "Revision"

	// MachineBlockStorageNoModel specifies the attribute name for the storage device that could not be identified and will be discarded
	MachineBlockStorageNoModel = "NO_MODEL"
	// MachineBlockStorageLogicalVolume specifies the attribute name for the logical volume storage device and will be discarded
	MachineBlockStorageLogicalVolume = "LOGICAL_VOLUME"
	// VirtualDevicePattern is a regex pattern to identify virtual CD-ROM and SD devices by their naming convention.
	VirtualDevicePattern = `Virtual_CDROM\d+|Virtual_SD\d+`

	// MachineGPUSerial specifies the attribute name for the serial number of the GPU
	MachineGPUSerial = "Serial"
	// MachineMemoryTypeUnknown specifies the attribute name for unknown type of memory
	MachineMemoryTypeUnknown = "Unknown"

	// Machine attributes
	// MachineVendorName specifies the attribute name for the vendor of the Machine
	MachineVendorName = "SysVendor"
	// MachineBoardSerialNumber specifies the attribute name for the serial number of the Machine
	MachineBoardSerialNumber = "BoardSerial"

	// Machine health attributes
	MachinePreventAllocations             = "PreventAllocations"
	MachinePreventAllocationStatusMessage = "Machine has one or more health probe alerts that prevents allocation"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ManageMachine

type ManageMachine struct {
	// contains filtered or unexported fields
}

ManageMachine is an activity wrapper for Machine management tasks that allows injecting DB access

func NewManageMachine

func NewManageMachine(dbSession *cdb.Session, siteClientPool *sc.ClientPool) ManageMachine

NewManageMachine returns a new ManageMachine activity

func (*ManageMachine) UpdateMachinesInDB

func (mm *ManageMachine) UpdateMachinesInDB(ctx context.Context, siteIDStr string, machineInventory *cwssaws.MachineInventory) error

UpdateMachinesInDB is an activity that creates/updates Machine data in DB

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL