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.
-
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.
-
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.