ironic.objects.bios module

class ironic.objects.bios.BIOSSetting(context: Any = None, **kwargs: Any)[source]

Bases: IronicObject

VERSION: str = '1.2'
property allowable_values: Any
property attribute_type: Any
create(context=None)[source]

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.

property created_at: Any
dbapi = <oslo_db.api.DBAPI object>
classmethod delete(context, node_id, name)[source]

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.

fields: MutableMapping[str, obj_fields.Field[Any]] = {'allowable_values': List(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'attribute_type': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'created_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'lower_bound': Integer(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'max_length': Integer(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'min_length': Integer(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'name': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'node_id': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'read_only': Boolean(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'reset_required': Boolean(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'unique': Boolean(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'updated_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'upper_bound': Integer(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'value': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True)}
classmethod get(context, node_id, name)[source]

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.

property lower_bound: Any
property max_length: Any
property min_length: Any
property name: Any
property node_id: Any
property read_only: Any
registry_fields = ('attribute_type', 'allowable_values', 'lower_bound', 'max_length', 'min_length', 'read_only', 'reset_required', 'unique', 'upper_bound')
property reset_required: Any
save(context=None)[source]

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.

property unique: Any
property updated_at: Any
property upper_bound: Any
property value: Any
class ironic.objects.bios.BIOSSettingList(*args: Any, **kwargs: Any)[source]

Bases: IronicObjectListBase, IronicObject

VERSION: str = '1.1'
classmethod 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.

property created_at: Any
dbapi = <oslo_db.api.DBAPI object>
classmethod 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.

fields: MutableMapping[str, obj_fields.Field[Any]] = {'created_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'objects': List(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'updated_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True)}
classmethod 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.

property objects: Any
classmethod 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 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.

property updated_at: Any