Skip to content

bmctools.redfish.gigafish

GigaFish

Gigabyte (GIGA Computing) Redfish implementation.

Gigabyte BMCs typically use ‘1’ as the system ID under /redfish/v1/Systems/.

Parameters:

NameTypeDefaultDescription
fishapiRedfishAPI

get_boot_order

def get_boot_order() -> list

Get the current boot order from the Gigabyte system.

Returns: List of boot option references in order.

Raises: ValueError: If the boot order cannot be retrieved.

Returns: list

get_boot_options

def get_boot_options(nocache: bool = False) -> list

Get all available boot options.

Args: nocache: If True, bypass the cache and query the BMC directly.

Returns: List of boot option dictionaries.

Raises: ValueError: If boot options cannot be retrieved.

Parameters:

NameTypeDefaultDescription
nocacheboolFalse

Returns: list

get_boot_option_by_mac

def get_boot_option_by_mac(mac_address: str, type: Optional[str] = None, nocache: bool = False) -> dict

Get a boot option by MAC address.

Args: mac_address: MAC address to search for (format: XX:XX:XX:XX:XX:XX or XXXXXXXXXXXX). type: Optional boot option type to filter by (e.g., 'PXE'). nocache: If True, force a fresh API call instead of using cached boot options.

Returns: Dict containing the matching boot option data.

Raises: ValueError: If no boot option is found with the specified MAC address or type.

Parameters:

NameTypeDefaultDescription
mac_addressstr
typeOptional[str]None
nocacheboolFalse

Returns: dict

get_boot_option_by_alias

def get_boot_option_by_alias(alias: str, nocache: bool = False) -> dict

Get a boot option by its alias/name.

Args: alias: Boot option alias to search for (case-insensitive). nocache: If True, force a fresh API call instead of using cached boot options.

Returns: Dict containing the matching boot option data.

Raises: ValueError: If no boot option is found with the specified alias.

Parameters:

NameTypeDefaultDescription
aliasstr
nocacheboolFalse

Returns: dict

set_boot_order

def set_boot_order(boot_order: list) -> bool

Set the boot order for the system.

Args: boot_order: Ordered list of boot option references (e.g., ['Boot0003', 'Boot0004', ...]). Must include ALL existing boot options — no additions or omissions.

Returns: True on success.

Raises: ValueError: If boot_order does not match the current set of options, or if the PATCH request fails.

Parameters:

NameTypeDefaultDescription
boot_orderlist

Returns: bool

get_supported_reset_types

def get_supported_reset_types() -> dict

Get the reset types supported by this system.

Returns: Dict with keys 'types' (list of allowable reset type strings), 'actions' (raw Actions dict), and 'reset_action' (the ComputerSystem.Reset action dict).

Raises: ValueError: If the system resource cannot be read.

Returns: dict

reset_system

def reset_system(reset_type: str = None) -> bool

Reset the system.

Args: reset_type: Optional Redfish reset type (e.g., 'GracefulRestart', 'ForceRestart'). When None, the type is chosen automatically from the supported reset types.

Returns: True on success.

Raises: ValueError: If the reset request fails.

Parameters:

NameTypeDefaultDescription
reset_typestrNone

Returns: bool

get_firmware_inventory

def get_firmware_inventory() -> dict

Get the firmware inventory for all installed components.

Returns: Dict with 'firmware_count' (int) and 'firmware' (list of dicts containing Id, Name, Version, Updateable, and Status).

Raises: ValueError: If the firmware inventory endpoint cannot be read.

Returns: dict

get_network_interfaces

def get_network_interfaces() -> list

Get all Ethernet interfaces for the system.

Returns: List of dicts, one per EthernetInterface resource.

Raises: ValueError: If the EthernetInterfaces collection cannot be read.

Returns: list

set_boot_first_by_mac

def set_boot_first_by_mac(mac_address: str, boot_type: str = None) -> dict

Move the boot option matching a MAC address to the front of the boot order.

Args: mac_address: MAC address of the target NIC boot_type: Optional boot option type filter (e.g., ‘PXE’)

Returns: Dict with the new boot order and the promoted option

Raises: ValueError: If no matching boot option or set fails

Parameters:

NameTypeDefaultDescription
mac_addressstr
boot_typestrNone

Returns: dict