ironic.objects.trait.
Trait
(context=None, **kwargs)[source]¶Bases: ironic.objects.base.IronicObject
VERSION
= '1.0'¶create
(context=None)[source]¶Create a Trait record in the DB.
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.: Trait(context).
InvalidParameterValue if adding the trait would exceed the per-node traits limit.
NodeNotFound if the node no longer appears in the database.
created_at
¶dbapi
= <oslo_db.api.DBAPI object>¶destroy
(context, node_id, trait)[source]¶Delete the Trait from the DB.
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.: Trait(context).
node_id – The id of a node.
trait – A trait string.
NodeNotFound if the node no longer appears in the database.
NodeTraitNotFound if the trait is not found.
exists
(context, node_id, trait)[source]¶Check whether a Trait exists in the DB.
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.: Trait(context).
node_id – The id of a node.
trait – A trait string.
True if the trait exists otherwise False.
NodeNotFound if the node no longer appears in the database.
fields
= {'created_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'node_id': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'trait': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'updated_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True)}¶node_id
¶trait
¶updated_at
¶ironic.objects.trait.
TraitList
(*args, **kwargs)[source]¶Bases: ironic.objects.base.IronicObjectListBase
, ironic.objects.base.IronicObject
VERSION
= '1.0'¶create
(context, node_id, traits)[source]¶Replace all existing traits with the specified list.
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.: Trait(context).
node_id – The id of a node.
traits – List of Strings; traits to set.
InvalidParameterValue if adding the trait would exceed the per-node traits limit.
NodeNotFound if the node no longer appears in the database.
created_at
¶dbapi
= <oslo_db.api.DBAPI object>¶destroy
(context, node_id)[source]¶Delete all traits for the specified node.
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.: Trait(context).
node_id – The id of a node.
NodeNotFound if the node no longer appears in the database.
fields
= {'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)}¶get_by_node_id
(context, node_id)[source]¶Return all traits for the specified node.
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.: Trait(context).
node_id – The id of a node.
NodeNotFound if the node no longer appears in the database.
objects
¶updated_at
¶Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.