openstack.baremetal.v1.Allocation¶
The Allocation Class¶
The Allocation
class inherits from Resource
.
- class openstack.baremetal.v1.allocation.Allocation(_synchronized=False, connection=None, **attrs)¶
The base resource
- Parameters:
_synchronized (bool) – This is not intended to be used directly. See
new()
andexisting()
.connection (openstack.connection.Connection) – Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of
self._connection
in Resource code should protect itself with a check for None.
- resources_key = 'allocations'¶
Plural form of key for resource.
- base_path = '/allocations'¶
The base part of the URI for this resource.
- allow_create = True¶
Allow create operation for this resource.
- allow_fetch = True¶
Allow get operation for this resource.
- allow_commit = True¶
Allow update operation for this resource.
- allow_delete = True¶
Allow delete operation for this resource.
- allow_list = True¶
Allow list operation for this resource.
- allow_patch = True¶
Allow patch operation for this resource.
- commit_method = 'PATCH'¶
Method for committing a resource (PUT, PATCH, POST)
- commit_jsonpatch = True¶
Whether commit uses JSON patch format.
- candidate_nodes¶
The candidate nodes for this allocation.
- created_at¶
Timestamp at which the allocation was created.
- extra¶
A set of one or more arbitrary metadata key and value pairs.
- id¶
The UUID for the allocation.
- last_error¶
The last error for the allocation.
- links¶
A list of relative links, including the self and bookmark links.
- name¶
The name of the allocation.
- node¶
The node UUID or name to create the allocation against, bypassing the normal allocation process.
- node_id¶
UUID of the node this allocation belongs to.
- owner¶
The tenant who owns the object
- resource_class¶
The requested resource class.
- state¶
The state of the allocation.
- traits¶
The requested traits.
- updated_at¶
Timestamp at which the allocation was last updated.
- wait(session, timeout=None, ignore_error=False)¶
Wait for the allocation to become active.
- Parameters:
session (
Adapter
) – The session to use for making this request.timeout – How much (in seconds) to wait for the allocation. The value of
None
(the default) means no client-side timeout.ignore_error – If
True
, this call will raise an exception if the allocation reaches theerror
state. Otherwise the error state is considered successful and the call returns.
- Returns:
This
Allocation
instance.- Raises:
ResourceFailure
if allocation fails andignore_error
isFalse
.- Raises:
ResourceTimeout
on timeout.