openstack.baremetal.v1.Allocation

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() and existing().
  • 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.

A list of relative links, including the self and bookmark links.

name

The name of the allocation.

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 the error state. Otherwise the error state is considered successful and the call returns.
Returns:

This Allocation instance.

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.