bmctools.redfish.gigafish
GigaFish
Gigabyte (GIGA Computing) Redfish implementation.
Gigabyte BMCs typically use ‘1’ as the system ID under /redfish/v1/Systems/.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
fishapi | RedfishAPI | — |
get_boot_order
def get_boot_order() -> listGet 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) -> listGet 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:
| Name | Type | Default | Description |
|---|---|---|---|
nocache | bool | False |
Returns: list
get_boot_option_by_mac
def get_boot_option_by_mac(mac_address: str, type: Optional[str] = None, nocache: bool = False) -> dictGet 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:
| Name | Type | Default | Description |
|---|---|---|---|
mac_address | str | — | |
type | Optional[str] | None | |
nocache | bool | False |
Returns: dict
get_boot_option_by_alias
def get_boot_option_by_alias(alias: str, nocache: bool = False) -> dictGet 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:
| Name | Type | Default | Description |
|---|---|---|---|
alias | str | — | |
nocache | bool | False |
Returns: dict
set_boot_order
def set_boot_order(boot_order: list) -> boolSet 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:
| Name | Type | Default | Description |
|---|---|---|---|
boot_order | list | — |
Returns: bool
get_supported_reset_types
def get_supported_reset_types() -> dictGet 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) -> boolReset 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:
| Name | Type | Default | Description |
|---|---|---|---|
reset_type | str | None |
Returns: bool
get_firmware_inventory
def get_firmware_inventory() -> dictGet 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() -> listGet 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) -> dictMove 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:
| Name | Type | Default | Description |
|---|---|---|---|
mac_address | str | — | |
boot_type | str | None |
Returns: dict