ironic.objects.node_history module

class ironic.objects.node_history.NodeHistory(context=None, **kwargs)[source]

Bases: IronicObject, VersionedObjectDictCompat

VERSION = '1.0'
property conductor
create(context=None)[source]

Create a NodeHistory record in the 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.: NodeHistory(context)

property created_at
dbapi = <oslo_db.api.DBAPI object>
destroy(context=None)[source]

Delete the NodeHistory from the 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.: NodeHistory(context)

Raises:

NodeHistoryNotFound

property event
property event_type
fields = {'conductor': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'created_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'event': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'event_type': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'id': Integer(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'node_id': Integer(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'severity': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'updated_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'user': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'uuid': UUID(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True)}
classmethod get(context, history_ident)[source]

Get a history based on its id or uuid.

Parameters:
  • history_ident – The id or uuid of a history.

  • context – Security context

Returns:

A NodeHistory object.

Raises:

InvalidIdentity

classmethod get_by_id(context, history_id)[source]

Get a NodeHistory object by its integer ID.

Parameters:
  • cls – the NodeHistory

  • context – Security context

  • history_id – The ID of a history.

Returns:

A NodeHistory object.

Raises:

NodeHistoryNotFound

classmethod get_by_uuid(context, uuid)[source]

Get a NodeHistory object by its UUID.

Parameters:
  • cls – the NodeHistory

  • context – Security context

  • uuid – The UUID of a NodeHistory.

Returns:

A NodeHistory object.

Raises:

NodeHistoryNotFound

property id
classmethod list(context, limit=None, marker=None, sort_key=None, sort_dir=None)[source]

Return a list of NodeHistory objects.

Parameters:
  • cls – the NodeHistory

  • context – Security context.

  • limit – Maximum number of resources to return in a single result.

  • marker – Pagination marker for large data sets.

  • sort_key – Column to sort results by.

  • sort_dir – Direction to sort. “asc” or “desc”.

Returns:

A list of NodeHistory object.

Raises:

InvalidParameterValue

classmethod list_by_node_id(context, node_id, limit=None, marker=None, sort_key=None, sort_dir=None)[source]

Return a list of NodeHistory objects belongs to a given node ID.

Parameters:
  • cls – the NodeHistory

  • context – Security context.

  • node_id – The ID of the node.

  • limit – Maximum number of resources to return in a single result.

  • marker – Pagination marker for large data sets.

  • sort_key – Column to sort results by.

  • sort_dir – Direction to sort. “asc” or “desc”.

Returns:

A list of NodeHistory object.

Raises:

InvalidParameterValue

property node_id
property severity
property updated_at
property user
property uuid