sushy.resources.system package

Submodules

sushy.resources.system.bios module

class sushy.resources.system.bios.ActionsField(*args, **kwargs)

Bases: sushy.resources.base.CompositeField

change_password = <sushy.resources.common.ActionField object>
reset_bios = <sushy.resources.common.ActionField object>
class sushy.resources.system.bios.Bios(connector, path, redfish_version=None, registries=None)

Bases: sushy.resources.base.ResourceBase

property apply_time_settings
attributes = <sushy.resources.base.Field object>

Vendor-specific key-value dict of effective BIOS attributes

Attributes cannot be updated directly. To update use set_attribute() or set_attributes()

change_password(new_password, old_password, password_name)

Change BIOS password

description = <sushy.resources.base.Field object>

Human-readable description of the BIOS resource

identity = <sushy.resources.base.Field object>

The Bios resource identity string

maintenance_window = <sushy.resources.settings.MaintenanceWindowField object>

Indicates if a given resource has a maintenance window assignment for applying settings or operations

name = <sushy.resources.base.Field object>

The name of the resource

property pending_attributes

Pending BIOS attributes

BIOS attributes that have been committed to the system, but for them to take effect system restart is necessary

reset_bios()

Reset the BIOS attributes to default

set_attribute(key, value, apply_time=None, maint_window_start_time=None, maint_window_duration=None)

Update an attribute

Attribute update is not immediate but requires system restart. Committed attributes can be checked at pending_attributes property

Parameters
  • key – Attribute name

  • value – Attribute value

  • apply_time – When to update the attribute. Optional. APPLY_TIME_IMMEDIATE - Immediate, APPLY_TIME_ON_RESET - On reset, APPLY_TIME_MAINT_START - During specified maintenance time APPLY_TIME_MAINT_RESET - On reset during specified maintenance time

  • maint_window_start_time – The start time of a maintenance window, datetime. Required when updating during maintenance window and default maintenance window not set by the system.

  • maint_window_duration – Duration of maintenance time since maintenance window start time in seconds. Required when updating during maintenance window and default maintenance window not set by the system.

set_attributes(value, apply_time=None, maint_window_start_time=None, maint_window_duration=None)

Update many attributes at once

Attribute update is not immediate but requires system restart. Committed attributes can be checked at pending_attributes property

Parameters
  • value – Key-value pairs for attribute name and value

  • apply_time – When to update the attributes. Optional. APPLY_TIME_IMMEDIATE - Immediate, APPLY_TIME_ON_RESET - On reset, APPLY_TIME_MAINT_START - During specified maintenance time APPLY_TIME_MAINT_RESET - On reset during specified maintenance time

  • maint_window_start_time – The start time of a maintenance window, datetime. Required when updating during maintenance window and default maintenance window not set by the system.

  • maint_window_duration – Duration of maintenance time since maintenance window start time in seconds. Required when updating during maintenance window and default maintenance window not set by the system.

property supported_apply_times

List of supported BIOS update apply times

Returns

List of supported update apply time names

property update_status

Status of the last attribute update

Returns

sushy.resources.settings.SettingsUpdate object containing status and any messages

sushy.resources.system.constants module

sushy.resources.system.constants.BOOT_SOURCE_TARGET_BIOS_SETUP = 'bios setup'

Boot to the BIOS Setup Utility

sushy.resources.system.constants.BOOT_SOURCE_TARGET_CD = 'cd'

Boot from the CD/DVD disc

sushy.resources.system.constants.BOOT_SOURCE_TARGET_DIAGS = 'diags'

Boot the manufacturer’s Diagnostics program

sushy.resources.system.constants.BOOT_SOURCE_TARGET_FLOPPY = 'floppy'

Boot from the floppy disk drive

sushy.resources.system.constants.BOOT_SOURCE_TARGET_HDD = 'hdd'

Boot from a hard drive

sushy.resources.system.constants.BOOT_SOURCE_TARGET_NONE = 'none'

Boot from the normal boot device

sushy.resources.system.constants.BOOT_SOURCE_TARGET_PXE = 'pxe'

Boot from the Pre-Boot EXecution (PXE) environment

sushy.resources.system.constants.BOOT_SOURCE_TARGET_SD_CARD = 'sd card'

Boot from an SD Card

sushy.resources.system.constants.BOOT_SOURCE_TARGET_UEFI_HTTP = 'uefi http'

Boot from a UEFI HTTP network location

sushy.resources.system.constants.BOOT_SOURCE_TARGET_UEFI_SHELL = 'uefi shell'

Boot to the UEFI Shell

sushy.resources.system.constants.BOOT_SOURCE_TARGET_UEFI_TARGET = 'uefi target'

Boot to the UEFI Device specified in the UefiTargetBootSourceOverride property

sushy.resources.system.constants.BOOT_SOURCE_TARGET_USB = 'usb'

Boot from a USB device as specified by the system BIOS

sushy.resources.system.constants.BOOT_SOURCE_TARGET_USB_CD = 'usb cd'

Boot from a USB CD device as specified by the system BIOS. NOTE(janders): This is NOT a standard value. On SuperMicro X11 and X12 machines, virtual media is presented as an USB CD drive as opposed to a CD drive. Both are present in the list of boot devices, however only selecting UsbCd as the boot source results in a successful boot from vMedia. If CD is selected, boot fails even if vMedia is inserted.

sushy.resources.system.constants.BOOT_SOURCE_TARGET_UTILITIES = 'utilities'

Boot the manufacturer’s Utilities program(s)

sushy.resources.system.constants.SECURE_BOOT_DISABLED = 'Disabled'

UEFI secure boot is disabled.

sushy.resources.system.constants.SECURE_BOOT_ENABLED = 'Enabled'

UEFI secure boot is enabled.

sushy.resources.system.constants.SYSTEM_INDICATOR_LED_BLINKING = 'indicator led blinking'

The Indicator LED is blinking

Deprecated: Use sushy.resources.constants.INDICATOR_LED_BLINKING.

sushy.resources.system.constants.SYSTEM_INDICATOR_LED_LIT = 'indicator led lit'

The Indicator LED is lit

Deprecated: Use sushy.resources.constants.INDICATOR_LED_LIT.

sushy.resources.system.constants.SYSTEM_INDICATOR_LED_OFF = 'indicator led off'

The Indicator LED is off

Deprecated: Use sushy.resources.constants.INDICATOR_LED_OFF.

sushy.resources.system.constants.SYSTEM_INDICATOR_LED_UNKNOWN = 'indicator led unknown'

The state of the Indicator LED cannot be determine

Deprecated: Use sushy.resources.constants.INDICATOR_LED_UNKNOWN.

sushy.resources.system.constants.SYSTEM_POWER_STATE_OFF = 'off'

The system is powered off, although some components may continue to have AUX power such as management controller

sushy.resources.system.constants.SYSTEM_POWER_STATE_ON = 'on'

The system is powered on

sushy.resources.system.constants.SYSTEM_POWER_STATE_POWERING_OFF = 'powering off'

A temporary state between On and Off. The power off action can take time while the OS is in the shutdown process

sushy.resources.system.constants.SYSTEM_POWER_STATE_POWERING_ON = 'powering on'

A temporary state between Off and On. This temporary state can be very short

sushy.resources.system.constants.SYSTEM_TYPE_COMPOSED = 'Composed'

A computer system created by binding resource blocks together

sushy.resources.system.constants.SYSTEM_TYPE_OS = 'OS'

An operating system instance

sushy.resources.system.constants.SYSTEM_TYPE_PHYSICAL = 'Physical'

A physical computer system

sushy.resources.system.constants.SYSTEM_TYPE_PHYSICALLY_PARTITIONED = 'PhysicallyPartitioned'

A hardware-based partition of a computer system

sushy.resources.system.constants.SYSTEM_TYPE_VIRTUAL = 'Virtual'

A virtual machine instance

sushy.resources.system.constants.SYSTEM_TYPE_VIRTUALLY_PARTITIONED = 'VirtuallyPartitioned'

A virtual or software-based partition of a computer system

sushy.resources.system.ethernet_interface module

class sushy.resources.system.ethernet_interface.EthernetInterface(connector, path='', redfish_version=None, registries=None, reader=None, json_doc=None)

Bases: sushy.resources.base.ResourceBase

This class adds the EthernetInterface resource

description = <sushy.resources.base.Field object>

Description

identity = <sushy.resources.base.Field object>

The Ethernet Interface identity string

mac_address = <sushy.resources.base.Field object>

This is the currently configured MAC address of the interface.

name = <sushy.resources.base.Field object>

The name of the resource or array element

permanent_mac_address = <sushy.resources.base.Field object>

This is the permanent MAC address assigned to this interface (port)

speed_mbps = <sushy.resources.base.Field object>

This is the current speed in Mbps of this interface.

status = <sushy.resources.common.StatusField object>

Describes the status and health of this interface.

class sushy.resources.system.ethernet_interface.EthernetInterfaceCollection(connector, path, redfish_version=None, registries=None)

Bases: sushy.resources.base.ResourceCollectionBase

property summary

Summary of MAC addresses and interfaces state

This filters the MACs whose health is OK, which means the MACs in both ‘Enabled’ and ‘Disabled’ States are returned.

Returns

dictionary in the format {‘aa:bb:cc:dd:ee:ff’: sushy.STATE_ENABLED, ‘aa:bb:aa:aa:aa:aa’: sushy.STATE_DISABLED}

sushy.resources.system.mappings module

sushy.resources.system.processor module

class sushy.resources.system.processor.Processor(connector, identity, redfish_version=None, registries=None)

Bases: sushy.resources.base.ResourceBase

identity = <sushy.resources.base.Field object>

The processor identity string

instruction_set = <sushy.resources.base.MappedField object>

The instruction set of the processor

manufacturer = <sushy.resources.base.Field object>

The processor manufacturer

max_speed_mhz = <sushy.resources.base.Field object>

The maximum clock speed of the processor in MHz.

model = <sushy.resources.base.Field object>

The product model number of this device

processor_architecture = <sushy.resources.base.MappedField object>

The architecture of the processor

processor_id = <sushy.resources.system.processor.ProcessorIdField object>

The processor id

processor_type = <sushy.resources.base.MappedField object>

The type of processor

socket = <sushy.resources.base.Field object>

The socket or location of the processor

status = <sushy.resources.common.StatusField object>

The processor status

property sub_processors

A reference to the collection of Sub-Processors

total_cores = <sushy.resources.base.Field object>

The total number of cores contained in this processor

total_threads = <sushy.resources.base.Field object>

The total number of execution threads supported by this processor

class sushy.resources.system.processor.ProcessorCollection(connector, path, redfish_version=None, registries=None)

Bases: sushy.resources.base.ResourceCollectionBase

property summary

Property to provide ProcessorSummary info

It is calculated once when the first time it is queried. On refresh, this property gets reset.

Returns

A namedtuple containing the count of processors in regards to logical CPUs, and their architecture.

class sushy.resources.system.processor.ProcessorIdField(*args, **kwargs)

Bases: sushy.resources.base.CompositeField

effective_family = <sushy.resources.base.Field object>

The processor effective family

effective_model = <sushy.resources.base.Field object>

The processor effective model

identification_registers = <sushy.resources.base.Field object>

The processor identification registers

microcode_info = <sushy.resources.base.Field object>

The processor microcode info

step = <sushy.resources.base.Field object>

The processor stepping

vendor_id = <sushy.resources.base.Field object>

The processor vendor id

class sushy.resources.system.processor.ProcessorSummary(count, architecture)

Bases: tuple

architecture

Alias for field number 1

count

Alias for field number 0

sushy.resources.system.secure_boot module

class sushy.resources.system.secure_boot.ActionsField(*args, **kwargs)

Bases: sushy.resources.base.CompositeField

reset_keys = <sushy.resources.system.secure_boot.ResetKeysActionField object>

Action that resets the UEFI Secure Boot keys.

class sushy.resources.system.secure_boot.ResetKeysActionField(*args, **kwargs)

Bases: sushy.resources.common.ActionField

allowed_values = <sushy.resources.base.Field object>
class sushy.resources.system.secure_boot.SecureBoot(connector, path, redfish_version=None, registries=None)

Bases: sushy.resources.base.ResourceBase

current_boot = <sushy.resources.base.MappedField object>

The UEFI Secure Boot state during the current boot cycle.

property databases

A collection of secure boot databases.

It is set once when the first time it is queried. On refresh, this property is marked as stale (greedy-refresh not done). Here the actual refresh of the sub-resource happens, if stale.

Raises

MissingAttributeError if ‘SecureBootDatabases/@odata.id’ field is missing.

Returns

SimpleStorageCollection instance

description = <sushy.resources.base.Field object>

Human-readable description of the BIOS resource

enabled = <sushy.resources.base.Field object>

Whether the UEFI Secure Boot takes effect on next boot.

This property can be enabled in UEFI boot mode only.

get_allowed_reset_keys_values()

Get the allowed values for resetting the keys.

Returns

A set with the allowed values.

identity = <sushy.resources.base.Field object>

The Bios resource identity string

mode = <sushy.resources.base.MappedField object>

The current UEFI Secure Boot Mode.

name = <sushy.resources.base.Field object>

The name of the resource

reset_keys(reset_type)

Reset secure boot keys.

Parameters

reset_type – Reset type, one of SECORE_BOOT_RESET_KEYS_* constants.

set_enabled(enabled)

Enable/disable secure boot.

Parameters

enabled – True, if secure boot is enabled for next boot.

sushy.resources.system.secure_boot_database module

class sushy.resources.system.secure_boot_database.ActionsField(*args, **kwargs)

Bases: sushy.resources.base.CompositeField

reset_keys = <sushy.resources.system.secure_boot_database.ResetKeysActionField object>

Action that resets the UEFI Secure Boot keys.

class sushy.resources.system.secure_boot_database.ResetKeysActionField(*args, **kwargs)

Bases: sushy.resources.common.ActionField

allowed_values = <sushy.resources.base.Field object>
class sushy.resources.system.secure_boot_database.SecureBootDatabase(connector, path='', redfish_version=None, registries=None, reader=None, json_doc=None)

Bases: sushy.resources.base.ResourceBase

database_id = <sushy.resources.base.MappedField object>

Standard UEFI database type.

description = <sushy.resources.base.Field object>

The system description

get_allowed_reset_keys_values()

Get the allowed values for resetting the keys.

Returns

A set with the allowed values.

identity = <sushy.resources.base.Field object>

The secure boot database identity string

name = <sushy.resources.base.Field object>

The secure boot database name

reset_keys(reset_type)

Reset secure boot keys.

Parameters

reset_type – Reset type, one of SECORE_BOOT_RESET_KEYS_* constants.

class sushy.resources.system.secure_boot_database.SecureBootDatabaseCollection(connector, path, redfish_version=None, registries=None)

Bases: sushy.resources.base.ResourceCollectionBase

sushy.resources.system.simple_storage module

class sushy.resources.system.simple_storage.DeviceListField(*args, **kwargs)

Bases: sushy.resources.base.ListField

The storage device/s associated with SimpleStorage.

capacity_bytes = <sushy.resources.base.Field object>

The size of the storage device.

name = <sushy.resources.base.Field object>

The name of the storage device

status = <sushy.resources.common.StatusField object>

Describes the status and health of a storage device.

class sushy.resources.system.simple_storage.SimpleStorage(connector, path='', redfish_version=None, registries=None, reader=None, json_doc=None)

Bases: sushy.resources.base.ResourceBase

This class represents a simple storage.

It represents the properties of a storage controller and its directly-attached devices. A storage device can be a disk drive or optical media device.

devices = <sushy.resources.system.simple_storage.DeviceListField object>

The storage devices associated with this resource.

identity = <sushy.resources.base.Field object>

The SimpleStorage identity string

name = <sushy.resources.base.Field object>

The name of the resource

class sushy.resources.system.simple_storage.SimpleStorageCollection(connector, path, redfish_version=None, registries=None)

Bases: sushy.resources.base.ResourceCollectionBase

Represents a collection of simple storage associated with system.

property disks_sizes_bytes

Sizes of each Disk in bytes in SimpleStorage collection resource.

Returns the list of cached values until it (or its parent resource) is refreshed.

property max_size_bytes

Max size available (in bytes) among all enabled Disk resources.

Returns the cached value until it (or its parent resource) is refreshed.

sushy.resources.system.system module

class sushy.resources.system.system.ActionsField(*args, **kwargs)

Bases: sushy.resources.base.CompositeField

reset = <sushy.resources.common.ResetActionField object>
class sushy.resources.system.system.BootField(*args, **kwargs)

Bases: sushy.resources.base.CompositeField

allowed_values = <sushy.resources.base.Field object>
enabled = <sushy.resources.base.MappedField object>
mode = <sushy.resources.base.MappedField object>
target = <sushy.resources.base.MappedField object>
class sushy.resources.system.system.MemorySummaryField(*args, **kwargs)

Bases: sushy.resources.base.CompositeField

health = <sushy.resources.base.Field object>

The overall health state of memory.

This signifies health state of memory along with its dependent resources.

size_gib = <sushy.resources.base.Field object>

The size of memory of the system in GiB.

This signifies the total installed, operating system-accessible memory (RAM), measured in GiB.

class sushy.resources.system.system.System(connector, identity, redfish_version=None, registries=None)

Bases: sushy.resources.base.ResourceBase

asset_tag = <sushy.resources.base.Field object>

The system asset tag

property bios

Property to reference Bios instance

It is set once when the first time it is queried. On refresh, this property is marked as stale (greedy-refresh not done). Here the actual refresh of the sub-resource happens, if stale.

bios_version = <sushy.resources.base.Field object>

The system BIOS version

boot = <sushy.resources.system.system.BootField object>

A dictionary containing the current boot device, frequency and mode

property chassis

A list of chassis where this system resides.

Returns a list of Chassis objects representing the chassis or cabinets where this system is mounted.

Raises

MissingAttributeError if @odata.id’ field is missing.

Returns

A list of Chassis instances

description = <sushy.resources.base.Field object>

The system description

property ethernet_interfaces

Property to reference EthernetInterfaceCollection instance

It is set once when the first time it is queried. On refresh, this property is marked as stale (greedy-refresh not done). Here the actual refresh of the sub-resource happens, if stale.

get_allowed_reset_system_values()

Get the allowed values for resetting the system.

Returns

A set with the allowed values.

get_allowed_system_boot_source_values()

Get the allowed values for changing the boot source.

Returns

A set with the allowed values.

hostname = <sushy.resources.base.Field object>

The system hostname

identity = <sushy.resources.base.Field object>

The system identity string

indicator_led = <sushy.resources.base.MappedField object>

Whether the indicator LED is lit or off

maintenance_window = <sushy.resources.settings.MaintenanceWindowField object>

Indicates if a given resource has a maintenance window assignment for applying settings or operations

property managers

A list of managers for this system.

Returns a list of Manager objects representing the managers that manage this system.

Raises

MissingAttributeError if @odata.id’ field is missing.

Returns

A list of Manager instances

manufacturer = <sushy.resources.base.Field object>

The system manufacturer

memory_summary = <sushy.resources.system.system.MemorySummaryField object>

The summary info of memory of the system in general detail

name = <sushy.resources.base.Field object>

The system name

part_number = <sushy.resources.base.Field object>

The system part number

power_state = <sushy.resources.base.MappedField object>

The system power state

property processors

Property to reference ProcessorCollection instance

It is set once when the first time it is queried. On refresh, this property is marked as stale (greedy-refresh not done). Here the actual refresh of the sub-resource happens, if stale.

reset_system(value)

Reset the system.

Parameters

value – The target value.

Raises

InvalidParameterValueError, if the target value is not allowed.

property secure_boot

Property to reference SecureBoot instance

It is set once when the first time it is queried. On refresh, this property is marked as stale (greedy-refresh not done). Here the actual refresh of the sub-resource happens, if stale.

serial_number = <sushy.resources.base.Field object>

The system serial number

set_indicator_led(state)

Set IndicatorLED to the given state.

Parameters

state – Desired LED state, lit (INDICATOR_LED_LIT), blinking (INDICATOR_LED_BLINKING), off (INDICATOR_LED_OFF)

Raises

InvalidParameterValueError, if any information passed is invalid.

set_system_boot_options(target=None, enabled=None, mode=None)

Set boot source and/or boot frequency and/or boot mode.

Set the boot source and/or boot frequency and/or boot mode to use on next reboot of the System.

Parameters
  • target – The target boot source, optional.

  • enabled – The frequency, whether to set it for the next reboot only (BOOT_SOURCE_ENABLED_ONCE) or persistent to all future reboots (BOOT_SOURCE_ENABLED_CONTINUOUS) or disabled (BOOT_SOURCE_ENABLED_DISABLED), optional.

  • mode – The boot mode (UEFI: BOOT_SOURCE_MODE_UEFI or BIOS: BOOT_SOURCE_MODE_BIOS), optional.

Raises

InvalidParameterValueError, if any information passed is invalid.

set_system_boot_source(target, enabled='once', mode=None)

Set boot source and/or boot frequency and/or boot mode.

Set the boot source and/or boot frequency and/or boot mode to use on next reboot of the System.

This method is obsoleted by set_system_boot_options.

Parameters
  • target – The target boot source.

  • enabled – The frequency, whether to set it for the next reboot only (BOOT_SOURCE_ENABLED_ONCE) or persistent to all future reboots (BOOT_SOURCE_ENABLED_CONTINUOUS) or disabled (BOOT_SOURCE_ENABLED_DISABLED). Default is BOOT_SOURCE_ENABLED_ONCE.

  • mode – The boot mode (UEFI: BOOT_SOURCE_MODE_UEFI or BIOS: BOOT_SOURCE_MODE_BIOS), optional.

Raises

InvalidParameterValueError, if any information passed is invalid.

property simple_storage

A collection of simple storage associated with system.

This returns a reference to SimpleStorageCollection instance. SimpleStorage represents the properties of a storage controller and its directly-attached devices.

It is set once when the first time it is queried. On refresh, this property is marked as stale (greedy-refresh not done). Here the actual refresh of the sub-resource happens, if stale.

Raises

MissingAttributeError if ‘SimpleStorage/@odata.id’ field is missing.

Returns

SimpleStorageCollection instance

sku = <sushy.resources.base.Field object>

The system stock-keeping unit

status = <sushy.resources.common.StatusField object>

The system status

property storage

A collection of storage subsystems associated with system.

This returns a reference to StorageCollection instance. A storage subsystem represents a set of storage controllers (physical or virtual) and the resources such as drives and volumes that can be accessed from that subsystem.

It is set once when the first time it is queried. On refresh, this property is marked as stale (greedy-refresh not done). Here the actual refresh of the sub-resource happens, if stale.

Raises

MissingAttributeError if ‘Storage/@odata.id’ field is missing.

Returns

StorageCollection instance

system_type = <sushy.resources.base.MappedField object>

The system type

uuid = <sushy.resources.base.Field object>

The system UUID

class sushy.resources.system.system.SystemCollection(connector, path, redfish_version=None, registries=None)

Bases: sushy.resources.base.ResourceCollectionBase

Module contents