ironic.api.controllers.v1.allocation module¶
- class ironic.api.controllers.v1.allocation.AllocationsController(*args, **kwargs)[source]¶
- Bases: - RestController- REST controller for allocations. - delete(allocation_ident)[source]¶
- Delete an allocation. - Parameters - allocation_ident – The UUID or name of the allocation. 
 
 - get_all(node=None, resource_class=None, state=None, marker=None, limit=None, sort_key='id', sort_dir='asc', fields=None, owner=None)[source]¶
- Retrieve a list of allocations. - Parameters - node – Filter the list of allocations by the node UUID or name. 
 - resource_class – The requested resource class for the allocation. Can only be missing when backfilling an allocation (will be set to the node’s ``resource_class`` in such case). 
 - state – Filter the list of allocations by the allocation state, one of ``active``, ``allocating`` or ``error``. 
 - marker – The ID of the last-seen item. Use the ``limit`` parameter to make an initial limited request and use the ID of the last-seen item from the response as the ``marker`` parameter value in a subsequent limited request. 
 - limit – Requests a page size of items. Returns a number of items up to a limit value. Use the ``limit`` parameter to make an initial limited request and use the ID of the last-seen item from the response as the ``marker`` parameter value in a subsequent limited request. This value cannot be larger than the ``max_limit`` option in the ``[api]`` section of the configuration. If it is higher than ``max_limit``, only ``max-limit`` resources will be returned. 
 - sort_key – Sorts the response by this attribute value. Default is ``id``. You can specify multiple pairs of sort key and sort direction query parameters. If you omit the sort direction in a pair, the API uses the natural sorting direction of the server attribute that is provided as the ``sort_key``. 
 - sort_dir – Sorts the response by the requested sort direction. A valid value is ``asc`` (ascending) or ``desc`` (descending). Default is ``asc``. You can specify multiple pairs of sort key and sort direction query parameters. If you omit the sort direction in a pair, the API uses the natural sorting direction of the server attribute that is provided as the ``sort_key``. 
 - fields – One or more fields to be returned in the response. For example, the following request returns only the ``uuid`` and ``name`` fields for each node: :: GET /v1/nodes?fields=uuid,name 
 - owner – Filter the list of returned allocations, and only return those with the specified owner. 
 
 - get_one(allocation_ident, fields=None)[source]¶
- Retrieve information about the given allocation. - Parameters - allocation_ident – The UUID or name of the allocation. 
 - fields – One or more fields to be returned in the response. For example, the following request returns only the ``uuid`` and ``name`` fields for each node: :: GET /v1/nodes?fields=uuid,name 
 
 - invalid_sort_key_list = ['extra', 'candidate_nodes', 'traits']¶
 
- class ironic.api.controllers.v1.allocation.NodeAllocationController(*args, **kwargs)[source]¶
- Bases: - RestController- REST controller for allocations. - get_all(fields=None)[source]¶
- Get all allocations. - Parameters - fields – One or more fields to be returned in the response. For example, the following request returns only the ``uuid`` and ``name`` fields for each node: :: GET /v1/nodes?fields=uuid,name 
 
 - invalid_sort_key_list = ['extra', 'candidate_nodes', 'traits']¶
 
