ironic.objects.bios module

ironic.objects.bios module

service None

Bases: ironic.objects.base.IronicObject

BIOSSetting.create(context=None)

Create a BIOS Setting record in DB.

Parameters:context – Security context. NOTE: This should only be used internally by the indirection_api. Unfortunately, RPC requires context as the first argument, even though we don’t use it. A context should be set when instantiating the object, e.g.: BIOSSetting(context)
Raises:NodeNotFound if the node id is not found.
Raises:BIOSSettingAlreadyExists if the setting record already exists.
classmethod BIOSSetting.delete(context, node_id, name)

Delete a BIOS Setting based on its node_id and name.

Parameters:
  • context – Security context.
  • node_id – The node id.
  • name – BIOS setting name to be deleted.
Raises:

NodeNotFound if the node id is not found.

Raises:

BIOSSettingNotFound if the bios setting name is not found.

classmethod BIOSSetting.get(context, node_id, name)

Get a BIOS Setting based on its node_id and name.

Parameters:
  • context – Security context.
  • node_id – The node id.
  • name – BIOS setting name to be retrieved.
Raises:

NodeNotFound if the node id is not found.

Raises:

BIOSSettingNotFound if the bios setting name is not found.

Returns:

A :class:’BIOSSetting’ object.

BIOSSetting.save(context=None)

Save BIOS Setting update in DB.

Parameters:context – Security context. NOTE: This should only be used internally by the indirection_api. Unfortunately, RPC requires context as the first argument, even though we don’t use it. A context should be set when instantiating the object, e.g.: BIOSSetting(context)
Raises:NodeNotFound if the node id is not found.
Raises:BIOSSettingNotFound if the bios setting name is not found.
service None

Bases: ironic.objects.base.IronicObjectListBase, ironic.objects.base.IronicObject

classmethod BIOSSettingList.create(context, node_id, settings)[source]

Create a list of BIOS Setting records in DB.

Parameters:
  • context – Security context. NOTE: This should only be used internally by the indirection_api. Unfortunately, RPC requires context as the first argument, even though we don’t use it. A context should be set when instantiating the object, e.g.: BIOSSetting(context)
  • node_id – The node id.
  • settings – A list of bios settings.
Raises:

NodeNotFound if the node id is not found.

Raises:

BIOSSettingAlreadyExists if any of the setting records already exists.

Returns:

A list of BIOSSetting objects.

classmethod BIOSSettingList.delete(context, node_id, names)[source]

Delete BIOS Settings based on node_id and names.

Parameters:
  • context – Security context.
  • node_id – The node id.
  • names – List of BIOS setting names to be deleted.
Raises:

NodeNotFound if the node id is not found.

Raises:

BIOSSettingNotFound if any of BIOS setting fails to delete.

classmethod BIOSSettingList.get_by_node_id(context, node_id)[source]

Get BIOS Setting based on node_id.

Parameters:
  • context – Security context.
  • node_id – The node id.
Raises:

NodeNotFound if the node id is not found.

Returns:

A list of BIOSSetting objects.

classmethod BIOSSettingList.save(context, node_id, settings)[source]

Save a list of BIOS Setting updates in DB.

Parameters:
  • context – Security context. NOTE: This should only be used internally by the indirection_api. Unfortunately, RPC requires context as the first argument, even though we don’t use it. A context should be set when instantiating the object, e.g.: BIOSSetting(context)
  • node_id – The node id.
  • settings – A list of bios settings.
Raises:

NodeNotFound if the node id is not found.

Raises:

BIOSSettingNotFound if any of the bios setting names is not found.

Returns:

A list of BIOSSetting objects.

classmethod BIOSSettingList.sync_node_setting(context, node_id, settings)[source]

Returns lists of create/update/delete/unchanged settings.

This method sync with ‘bios_settings’ database table and sorts out four lists of create/update/delete/unchanged settings.

Parameters:
  • context – Security context.
  • node_id – The node id.
  • settings – BIOS settings to be synced.
Returns:

A 4-tuple of lists of BIOS settings to be created, updated, deleted and unchanged.

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.