ironic.objects.allocation.
Allocation
(context=None, **kwargs)[source]¶Bases: ironic.objects.base.IronicObject
, oslo_versionedobjects.base.VersionedObjectDictCompat
VERSION
= '1.1'¶candidate_nodes
¶conductor_affinity
¶create
(context=None)[source]¶Create a Allocation 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.: Allocation(context)
AllocationDuplicateName, AllocationAlreadyExists
created_at
¶dbapi
= <oslo_db.api.DBAPI object>¶destroy
(context=None)[source]¶Delete the Allocation 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.: Allocation(context)
AllocationNotFound
extra
¶fields
= {'candidate_nodes': List(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'conductor_affinity': Integer(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'created_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'extra': FlexibleDict(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'id': Integer(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'last_error': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'name': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'node_id': Integer(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'owner': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'resource_class': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'state': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'traits': List(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'updated_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'uuid': UUID(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True)}¶get
(context, allocation_ident)[source]¶Find an allocation by its ID, UUID or name.
allocation_ident – The ID, UUID or name of an allocation.
context – Security context
An Allocation
object.
InvalidIdentity
get_by_id
(context, allocation_id)[source]¶Find an allocation by its integer ID.
cls – the Allocation
context – Security context
allocation_id – The ID of an allocation.
An Allocation
object.
AllocationNotFound
get_by_name
(context, name)[source]¶Find an allocation based by its name.
cls – the Allocation
context – Security context
name – The name of an allocation.
An Allocation
object.
AllocationNotFound
get_by_uuid
(context, uuid)[source]¶Find an allocation by its UUID.
cls – the Allocation
context – Security context
uuid – The UUID of an allocation.
An Allocation
object.
AllocationNotFound
id
¶last_error
¶list
(context, filters=None, limit=None, marker=None, sort_key=None, sort_dir=None)[source]¶Return a list of Allocation objects.
cls – the Allocation
context – Security context.
filters – Filters to apply.
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”.
A list of Allocation
object.
InvalidParameterValue
name
¶node_id
¶owner
¶refresh
(context=None)[source]¶Loads updates for this Allocation.
Loads an allocation with the same uuid from the database and checks for updated attributes. Updates are applied from the loaded allocation column by column, if there are any updates.
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.: Allocation(context)
AllocationNotFound
resource_class
¶save
(context=None)[source]¶Save updates to this Allocation.
Updates will be made column by column based on the result of self.what_changed().
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.: Allocation(context)
AllocationNotFound, AllocationDuplicateName
state
¶traits
¶updated_at
¶uuid
¶ironic.objects.allocation.
AllocationCRUDNotification
(context=None, **kwargs)[source]¶Bases: ironic.objects.notification.NotificationBase
Notification when ironic creates, updates or deletes an allocation.
VERSION
= '1.0'¶created_at
¶event_type
¶fields
= {'created_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'event_type': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'level': NotificationLevel(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False,valid_values=('debug', 'info', 'warning', 'error', 'critical')), 'payload': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'publisher': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'updated_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True)}¶level
¶payload
¶publisher
¶updated_at
¶ironic.objects.allocation.
AllocationCRUDPayload
(allocation, node_uuid=None)[source]¶Bases: ironic.objects.notification.NotificationPayloadBase
SCHEMA
= {'candidate_nodes': ('allocation', 'candidate_nodes'), 'created_at': ('allocation', 'created_at'), 'extra': ('allocation', 'extra'), 'last_error': ('allocation', 'last_error'), 'name': ('allocation', 'name'), 'owner': ('allocation', 'owner'), 'resource_class': ('allocation', 'resource_class'), 'state': ('allocation', 'state'), 'traits': ('allocation', 'traits'), 'updated_at': ('allocation', 'updated_at'), 'uuid': ('allocation', 'uuid')}¶VERSION
= '1.1'¶candidate_nodes
¶created_at
¶extra
¶fields
= {'candidate_nodes': List(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'created_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'extra': FlexibleDict(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'last_error': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'name': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'node_uuid': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'owner': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'resource_class': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'state': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'traits': List(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'updated_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'uuid': UUID(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True)}¶last_error
¶name
¶node_uuid
¶owner
¶resource_class
¶state
¶traits
¶updated_at
¶uuid
¶Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.