ironic.drivers.modules.drac.bios module¶
DRAC BIOS configuration specific methods
- class ironic.drivers.modules.drac.bios.DracRedfishBIOS(*args, **kwargs)[source]¶
Bases:
ironic.drivers.modules.redfish.bios.RedfishBIOS
iDRAC Redfish interface for BIOS settings-related actions.
Presently, this class entirely defers to its base class, a generic, vendor-independent Redfish interface. Future resolution of Dell EMC- specific incompatibilities and introduction of vendor value added should be implemented by this class.
- class ironic.drivers.modules.drac.bios.DracWSManBIOS(*args, **kwargs)[source]¶
Bases:
ironic.drivers.base.BIOSInterface
BIOSInterface Implementation for iDRAC.
- apply_configuration(task, settings)[source]¶
Apply the BIOS configuration to the node
- Parameters
task – a TaskManager instance containing the node to act on
settings – List of BIOS settings to apply
- Raises
DRACOperationError upon an error from python-dracclient
- Returns
states.CLEANWAIT (cleaning) or states.DEPLOYWAIT (deployment) if configuration is in progress asynchronously or None if it is completed.
- cache_bios_settings(task)[source]¶
Store or update the current BIOS settings for the node.
Get the current BIOS settings and store them in the bios_settings database table.
- Parameters
task – a TaskManager instance containing the node to act on.
- Raises
DracOperationError on an error from python-dracclient
- factory_reset(task)[source]¶
Reset the BIOS settings of the node to the factory default.
This uses the Lifecycle Controller configuration to perform BIOS configuration reset. Leveraging the python-dracclient methods already available.
- Parameters
task – a TaskManager instance containing the node to act on
- Raises
DracOperationError on an error from python-dracclient
- Returns
states.CLEANWAIT (cleaning) or states.DEPLOYWAIT (deployment) if reset is in progress asynchronously or None if it is completed.
- ironic.drivers.modules.drac.bios.abandon_config(task)[source]¶
Abandons uncommitted changes added by set_config
- Parameters
task – a TaskManager instance containing the node to act on.
- Raises
DracOperationError on an error from python-dracclient.
- ironic.drivers.modules.drac.bios.commit_config(task, reboot=False)[source]¶
Commits pending changes added by set_config
- Parameters
task – a TaskManager instance containing the node to act on.
reboot – indicates whether a reboot job should be automatically created with the config job.
- Raises
DracOperationError on an error from python-dracclient.
- Returns
the job_id key with the id of the newly created config job.
- ironic.drivers.modules.drac.bios.get_config(node)[source]¶
Get the BIOS configuration.
The BIOS settings look like:
{'EnumAttrib': {'name': 'EnumAttrib', 'current_value': 'Value', 'pending_value': 'New Value', # could also be None 'read_only': False, 'possible_values': ['Value', 'New Value', 'None']}, 'StringAttrib': {'name': 'StringAttrib', 'current_value': 'Information', 'pending_value': None, 'read_only': False, 'min_length': 0, 'max_length': 255, 'pcre_regex': '^[0-9A-Za-z]{0,255}$'}, 'IntegerAttrib': {'name': 'IntegerAttrib', 'current_value': 0, 'pending_value': None, 'read_only': True, 'lower_bound': 0, 'upper_bound': 65535}}
- Parameters
node – an ironic node object.
- Raises
DracOperationError on an error from python-dracclient.
- Returns
a dictionary containing BIOS settings
The above values are only examples, of course. BIOS attributes exposed via this API will always be either an enumerated attribute, a string attribute, or an integer attribute. All attributes have the following parameters:
- Parameters
name – is the name of the BIOS attribute.
current_value – is the current value of the attribute. It will always be either an integer or a string.
pending_value – is the new value that we want the attribute to have. None means that there is no pending value.
read_only – indicates whether this attribute can be changed. Trying to change a read-only value will result in an error. The read-only flag can change depending on other attributes. A future version of this call may expose the dependencies that indicate when that may happen.
Enumerable attributes also have the following parameters:
- Parameters
possible_values – is an array of values it is permissible to set the attribute to.
String attributes also have the following parameters:
- Parameters
min_length – is the minimum length of the string.
max_length – is the maximum length of the string.
pcre_regex – is a PCRE compatible regular expression that the string must match. It may be None if the string is read only or if the string does not have to match any particular regular expression.
Integer attributes also have the following parameters:
- Parameters
lower_bound – is the minimum value the attribute can have.
upper_bound – is the maximum value the attribute can have.
- ironic.drivers.modules.drac.bios.set_config(task, **kwargs)[source]¶
Sets the pending_value parameter for each of the values passed in.
- Parameters
task – a TaskManager instance containing the node to act on.
kwargs – a dictionary of {‘AttributeName’: ‘NewValue’}
- Raises
DracOperationError on an error from python-dracclient.
- Returns
A dictionary containing the ‘is_commit_required’ key with a boolean value indicating whether commit_config() needs to be called to make the changes, and the ‘is_reboot_required’ key which has a value of ‘true’ or ‘false’. This key is used to indicate to the commit_config() call if a reboot should be performed.