Remove Placement API reference

The placement project has published the API reference
in its own repository and the related jobs for the nova project
has been removed since Ia4680f24d78af1260f2f0106a458b78a079c1287.

So remove the files and definitions related to
the placement API reference in the nova repository.

Change-Id: Ia43b958a28e7e763e7ecb29e06f8d21d2b9a850f
This commit is contained in:
Takashi NATSUME 2018-10-31 17:37:35 +09:00
parent 62245235bc
commit 311110e81b
69 changed files with 6 additions and 3563 deletions

1
.gitignore vendored
View File

@ -33,7 +33,6 @@ doc/source/api/*
doc/build/*
api-guide/build/*
api-ref/build/*
placement-api-ref/build/*
etc/nova/nova.conf.sample
etc/nova/policy.yaml.sample
etc/nova/policy.yaml.merged

View File

@ -12,7 +12,7 @@
- openstack/nova
- openstack/tempest
irrelevant-files: &dsvm-irrelevant-files
- ^(placement-)?api-.*$
- ^api-.*$
- ^(test-|)requirements.txt$
- ^.*\.rst$
- ^.git.*$
@ -53,7 +53,6 @@
- ^api-.*$
- ^doc/source/.*$
- ^nova/locale/.*$
- ^placement-api-ref/.*$
- ^releasenotes/.*$
vars:
tox_envlist: functional
@ -100,7 +99,7 @@
# playbook and tempest rc files so this can be self-testing).
irrelevant-files:
- ^(?!.zuul.yaml)(?!playbooks/legacy/nova-lvm/)(?!devstack/tempest-dsvm-lvm-rc)(?!nova/virt/libvirt/).*$
- ^(placement-)?api-.*$
- ^api-.*$
- ^(test-|)requirements.txt$
- ^.*\.rst$
- ^.git.*$

View File

@ -27,9 +27,10 @@ Compute API reference
Placement API reference
-----------------------
* API reference text: ``placement-api-ref/source/*.inc``
* Parameter definition: ``placement-api-ref/source/parameters.yaml``
* JSON request/response samples: ``placement-api-ref/source/samples/*``
The placement project has the API reference files in its own repository
under `api-ref/source
<https://github.com/openstack/placement/tree/master/api-ref/source>`_
directory.
Structure of inc file
---------------------

View File

@ -1,68 +0,0 @@
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
"""Test to see if docs exists for routes and methods in the placement API."""
import os
from nova.api.openstack.placement import handler
# A humane ordering of HTTP methods for sorted output.
ORDERED_METHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE']
DEPRECATED_METHODS = [('POST', '/resource_providers/{uuid}/inventories')]
def _header_line(map_entry):
method, route = map_entry
line = '.. rest_method:: %s %s' % (method, route)
return line
def inspect_doc(app):
"""Load up doc_files and see if any routes are missing.
The routes are defined in handler.ROUTE_DECLARATIONS.
"""
doc_files = [os.path.join(app.srcdir, file)
for file in os.listdir(app.srcdir) if file.endswith(".inc")]
routes = []
for route in sorted(handler.ROUTE_DECLARATIONS, key=len):
# Skip over the '' route.
if route:
for method in ORDERED_METHODS:
if method in handler.ROUTE_DECLARATIONS[route]:
routes.append((method, route))
header_lines = []
for map_entry in routes:
if map_entry not in DEPRECATED_METHODS:
header_lines.append(_header_line(map_entry))
content_lines = []
for doc_file in doc_files:
with open(doc_file) as doc_fh:
content_lines.extend(doc_fh.read().splitlines())
missing_lines = []
for line in header_lines:
if line not in content_lines:
missing_lines.append(line)
if missing_lines:
msg = ['Documentation likely missing for the following routes:', '']
for line in missing_lines:
msg.append(line)
raise ValueError('\n'.join(msg))
def setup(app):
app.connect('builder-inited', inspect_doc)

View File

@ -1,156 +0,0 @@
============================
Resource provider aggregates
============================
Each resource provider can be associated with one or more other
resource providers in groups called aggregates. API calls in this
section are used to list and update the aggregates that are associated
with one resource provider.
Provider aggregates are used for modeling relationships among providers.
Examples may include:
* A shared storage pool providing DISK_GB resources to compute node providers
that provide VCPU and MEMORY_MB resources.
* Affinity/anti-affinity relationships such as physical location, power failure
domains, or other reliability/availability constructs.
* Groupings of compute host providers *corresponding to* Nova host aggregates
or availability zones.
.. note:: Placement aggregates are *not* the same as Nova host
aggregates and should not be considered equivalent.
The primary differences between Nova's host aggregates and placement
aggregates are the following:
* In Nova, a host aggregate associates a *nova-compute service* with
other nova-compute services. Placement aggregates are not specific
to a nova-compute service and are, in fact, not
compute-specific at all. A resource provider in the Placement API is
generic, and placement aggregates are simply groups of generic
resource providers. This is an important difference especially for
Ironic, which when used with Nova, has many Ironic baremetal nodes
attached to a single nova-compute service. In the Placement API,
each Ironic baremetal node is its own resource provider and can
therefore be associated to other Ironic baremetal nodes via a
placement aggregate association.
* In Nova, a host aggregate may have *metadata* key/value pairs
attached to it. All nova-compute services associated with a Nova
host aggregate share the same metadata. Placement aggregates have no
such metadata because placement aggregates *only* represent the
grouping of resource providers. In the Placement API, resource
providers are individually decorated with *traits* that provide
qualitative information about the resource provider.
* In Nova, a host aggregate dictates the *availability zone* within
which one or more nova-compute services reside. While placement aggregates
may be used to *model* availability zones, they have no inherent concept
thereof.
.. note:: Aggregates API requests are availiable starting from version 1.1.
List resource provider aggregates
=================================
.. rest_method:: GET /resource_providers/{uuid}/aggregates
Return a list of aggregates associated with the resource provider
identified by `{uuid}`.
Normal Response Codes: 200
Error response codes: itemNotFound(404) if the provider does not exist. (If the
provider has no aggregates, the result is 200 with an empty aggregate list.)
Request
-------
.. rest_parameters:: parameters.yaml
- uuid: resource_provider_uuid_path
Response (microversions 1.1 - 1.18)
-----------------------------------
.. rest_parameters:: parameters.yaml
- aggregates: aggregates
Response Example (microversions 1.1 - 1.18)
-------------------------------------------
.. literalinclude:: ./samples/aggregates/get-aggregates.json
:language: javascript
Response (microversions 1.19 - )
--------------------------------
.. rest_parameters:: parameters.yaml
- aggregates: aggregates
- resource_provider_generation: resource_provider_generation
Response Example (microversions 1.19 - )
----------------------------------------
.. literalinclude:: ./samples/aggregates/get-aggregates-1.19.json
:language: javascript
Update resource provider aggregates
===================================
Associate a list of aggregates with the resource provider identified by `{uuid}`.
.. rest_method:: PUT /resource_providers/{uuid}/aggregates
Normal Response Codes: 200
Error response codes: badRequest(400), itemNotFound(404), conflict(409)
Request (microversion 1.1 - 1.18)
---------------------------------
.. rest_parameters:: parameters.yaml
- uuid: resource_provider_uuid_path
- aggregates: aggregates
Request example (microversion 1.1 - 1.18)
-----------------------------------------
.. literalinclude:: ./samples/aggregates/update-aggregates-request.json
:language: javascript
Request (microversion 1.19 - )
---------------------------------
.. rest_parameters:: parameters.yaml
- uuid: resource_provider_uuid_path
- aggregates: aggregates
- resource_provider_generation: resource_provider_generation
Request example (microversion 1.19 - )
-----------------------------------------
.. literalinclude:: ./samples/aggregates/update-aggregates-request-1.19.json
:language: javascript
Response (microversion 1.1 - )
------------------------------
.. rest_parameters:: parameters.yaml
- aggregates: aggregates
- resource_provider_generation: resource_provider_generation_v1_19
Response Example (microversion 1.1 - 1.18)
------------------------------------------
.. literalinclude:: ./samples/aggregates/update-aggregates.json
:language: javascript
Response Example (microversion 1.19 - )
------------------------------------------
.. literalinclude:: ./samples/aggregates/update-aggregates-1.19.json
:language: javascript

View File

@ -1,92 +0,0 @@
=====================
Allocation candidates
=====================
.. note:: Allocation candidates API requests are availiable starting from version 1.10.
List allocation candidates
==========================
Returns a dictionary representing a collection of allocation requests
and resource provider summaries. Each allocation request has
information to form a ``PUT /allocations/{consumer_uuid}`` request to claim
resources against a related set of resource providers. Additional parameters
might be required, see `Update allocations`_. As several allocation
requests are available it's necessary to select one. To make a
decision, resource provider summaries are provided with the
inventory/capacity information. For example, this information is used by
nova-scheduler's FilterScheduler to make decisions about on which compute host
to build a server.
.. rest_method:: GET /allocation_candidates
Normal Response Codes: 200
Error response codes: badRequest(400)
Request
-------
.. rest_parameters:: parameters.yaml
- resources: resources_query_ac
- required: required_traits_unnumbered
- member_of: member_of_1_21
- resourcesN: resources_query_granular
- requiredN: required_traits_granular
- member_ofN: member_of_granular
- group_policy: allocation_candidates_group_policy
- limit: allocation_candidates_limit
Response (microversions 1.12 - )
--------------------------------
.. rest_parameters:: parameters.yaml
- allocation_requests: allocation_requests
- provider_summaries: provider_summaries_1_12
- allocations: allocations_by_resource_provider
- resources: resources
- capacity: capacity
- used: used
- traits: traits_1_17
- parent_provider_uuid: resource_provider_parent_provider_uuid_response_1_29
- root_provider_uuid: resource_provider_root_provider_uuid_1_29
Response Example (microversions 1.29 - )
----------------------------------------
.. literalinclude:: ./samples/allocation_candidates/get-allocation_candidates-1.29.json
:language: javascript
Response Example (microversions 1.17 - 1.28)
--------------------------------------------
.. literalinclude:: ./samples/allocation_candidates/get-allocation_candidates-1.17.json
:language: javascript
Response Example (microversions 1.12 - 1.16)
--------------------------------------------
.. literalinclude:: ./samples/allocation_candidates/get-allocation_candidates-1.12.json
:language: javascript
Response (microversions 1.10 - 1.11)
------------------------------------
.. rest_parameters:: parameters.yaml
- allocation_requests: allocation_requests
- provider_summaries: provider_summaries
- allocations: allocations_array
- resource_provider: resource_provider_object
- uuid: resource_provider_uuid
- resources: resources
- capacity: capacity
- used: used
Response Example (microversions 1.10 - 1.11)
--------------------------------------------
.. literalinclude:: ./samples/allocation_candidates/get-allocation_candidates.json
:language: javascript

View File

@ -1,198 +0,0 @@
===========
Allocations
===========
Allocations are records representing resources that have been assigned
and used by some consumer of that resource. They indicate the amount
of a particular resource that has been allocated to a given consumer
of that resource from a particular resource provider.
Manage allocations
==================
Create, update or delete allocations for multiple consumers in a single
request. This allows a client to atomically set or swap allocations for
multiple consumers as may be required during a migration or move type
operation.
The allocations for an individual consumer uuid mentioned in the request
can be removed by setting the `allocations` to an empty object (see the
example below).
**Available as of microversion 1.13.**
.. rest_method:: POST /allocations
Normal response codes: 204
Error response codes: badRequest(400), conflict(409)
* `409 Conflict` if there is no available inventory in any of the
resource providers for any specified resource classes or inventories
are updated by another thread while attempting the operation.
Request
-------
.. rest_parameters:: parameters.yaml
- consumer_uuid: consumer_uuid_body
- consumer_generation: consumer_generation_min
- project_id: project_id_body
- user_id: user_id_body
- allocations: allocations_dict_empty
- generation: resource_provider_generation_optional
- resources: resources
Request example (microversions 1.28 - )
---------------------------------------
.. literalinclude:: ./samples/allocations/manage-allocations-request-1.28.json
:language: javascript
Request example (microversions 1.13 - 1.27)
-------------------------------------------
.. literalinclude:: ./samples/allocations/manage-allocations-request.json
:language: javascript
Response
--------
No body content is returned after a successful request
List allocations
================
List all allocation records for the consumer identified by
`{consumer_uuid}` on all the resource providers it is consuming.
.. note:: When listing allocations for a consumer uuid that has no
allocations a dict with an empty value is returned
``{"allocations": {}}``.
.. rest_method:: GET /allocations/{consumer_uuid}
Normal Response Codes: 200
Request
-------
.. rest_parameters:: parameters.yaml
- consumer_uuid: consumer_uuid
Response
--------
.. rest_parameters:: parameters.yaml
- allocations: allocations_by_resource_provider
- generation: resource_provider_generation
- resources: resources
- consumer_generation: consumer_generation_min
- project_id: project_id_body_1_12
- user_id: user_id_body_1_12
Response Example (1.28 - )
--------------------------
.. literalinclude:: ./samples/allocations/get-allocations-1.28.json
:language: javascript
Response Example (1.12 - 1.27)
------------------------------
.. literalinclude:: ./samples/allocations/get-allocations.json
:language: javascript
Update allocations
==================
Create or update one or more allocation records representing the consumption of
one or more classes of resources from one or more resource providers by
the consumer identified by `{consumer_uuid}`.
If allocations already exist for this consumer, they are replaced.
.. rest_method:: PUT /allocations/{consumer_uuid}
Normal Response Codes: 204
Error response codes: badRequest(400), itemNotFound(404), conflict(409)
* `409 Conflict` if there is no available inventory in any of the
resource providers for any specified resource classes or inventories
are updated by another thread while attempting the operation.
Request (microversions 1.12 - )
-------------------------------
.. rest_parameters:: parameters.yaml
- consumer_uuid: consumer_uuid
- allocations: allocations_dict
- resources: resources
- consumer_generation: consumer_generation_min
- project_id: project_id_body
- user_id: user_id_body
- generation: resource_provider_generation_optional
Request example (microversions 1.28 - )
---------------------------------------
.. literalinclude:: ./samples/allocations/update-allocations-request-1.28.json
:language: javascript
Request example (microversions 1.12 - 1.27)
-------------------------------------------
.. literalinclude:: ./samples/allocations/update-allocations-request-1.12.json
:language: javascript
Request (microversions 1.0 - 1.11)
----------------------------------
.. rest_parameters:: parameters.yaml
- consumer_uuid: consumer_uuid
- allocations: allocations_array
- resources: resources
- resource_provider: resource_provider_object
- uuid: resource_provider_uuid
- project_id: project_id_body_1_8
- user_id: user_id_body_1_8
Request example (microversions 1.0 - 1.11)
------------------------------------------
.. literalinclude:: ./samples/allocations/update-allocations-request.json
:language: javascript
Response
--------
No body content is returned on a successful PUT.
Delete allocations
==================
Delete all allocation records for the consumer identified by
`{consumer_uuid}` on all resource providers it is consuming.
.. rest_method:: DELETE /allocations/{consumer_uuid}
Normal Response Codes: 204
Error response codes: itemNotFound(404)
Request
-------
.. rest_parameters:: parameters.yaml
- consumer_uuid: consumer_uuid
Response
--------
No body content is returned on a successful DELETE.

View File

@ -1,101 +0,0 @@
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# placement-api-ref documentation build configuration file, created by
# sphinx-quickstart on Sat May 1 15:17:47 2010.
#
# This file is execfile()d with the current directory set to
# its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import os
import sys
from nova.version import version_info
sys.path.insert(0, os.path.abspath('../'))
extensions = [
'openstackdocstheme',
'os_api_ref',
'ext.validator',
]
# -- General configuration ----------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
# The suffix of source filenames.
source_suffix = '.rst'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'Placement API Reference'
copyright = u'2010-present, OpenStack Foundation'
# openstackdocstheme options
repository_name = 'openstack/nova'
bug_project = 'nova'
bug_tag = 'placement-api-ref'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The full version, including alpha/beta/rc tags.
release = version_info.release_string()
# The short X.Y version.
version = version_info.version_string()
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# -- Options for HTML output --------------------------------------------------
# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
html_theme = 'openstackdocs'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
html_theme_options = {
"sidebar_mode": "toc",
}
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# -- Options for LaTeX output -------------------------------------------------
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
# [howto/manual]).
latex_documents = [
('index', 'Placement.tex', u'OpenStack Placement API Documentation',
u'OpenStack Foundation', 'manual'),
]
# -- Options for openstackdocstheme -------------------------------------------
openstack_projects = [
'nova',
]

View File

@ -1,33 +0,0 @@
:tocdepth: 2
===============
Placement API
===============
This is a reference for the OpenStack Placement API. To learn more about
OpenStack Placement API concepts, please refer to the :nova-doc:`Placement
Introduction <user/placement.html>`.
The Placement API uses JSON for data exchange. As such, the ``Content-Type``
header for APIs sending data payloads in the request body (i.e. ``PUT`` and
``POST``) must be set to ``application/json`` unless otherwise noted.
.. rest_expand_all::
.. include:: request-ids.inc
.. include:: root.inc
.. include:: resource_providers.inc
.. include:: resource_provider.inc
.. include:: resource_classes.inc
.. include:: resource_class.inc
.. include:: inventories.inc
.. include:: inventory.inc
.. include:: aggregates.inc
.. include:: traits.inc
.. include:: resource_provider_traits.inc
.. include:: allocations.inc
.. include:: resource_provider_allocations.inc
.. include:: usages.inc
.. include:: resource_provider_usages.inc
.. include:: allocation_candidates.inc
.. include:: reshaper.inc

View File

@ -1,134 +0,0 @@
=============================
Resource provider inventories
=============================
Each resource provider has inventory records for one or more classes
of resources. An inventory record contains information about the total
and reserved amounts of the resource and any consumption constraints
for that resource against the provider.
List resource provider inventories
==================================
.. rest_method:: GET /resource_providers/{uuid}/inventories
Normal Response Codes: 200
Error response codes: itemNotFound(404)
Request
-------
.. rest_parameters:: parameters.yaml
- uuid: resource_provider_uuid_path
Response
--------
.. rest_parameters:: parameters.yaml
- inventories: inventories
- resource_provider_generation: resource_provider_generation
- allocation_ratio: allocation_ratio
- max_unit: max_unit
- min_unit: min_unit
- reserved: reserved
- step_size: step_size
- total: total
Response Example
----------------
.. literalinclude:: ./samples/inventories/get-inventories.json
:language: javascript
Update resource provider inventories
====================================
Replaces the set of inventory records for the resource provider identified by `{uuid}`.
.. rest_method:: PUT /resource_providers/{uuid}/inventories
Normal Response Codes: 200
Error response codes: badRequest(400), itemNotFound(404), conflict(409)
Request
-------
.. rest_parameters:: parameters.yaml
- uuid: resource_provider_uuid_path
- resource_provider_generation: resource_provider_generation
- inventories: inventories
- total: total
- allocation_ratio: allocation_ratio_opt
- max_unit: max_unit_opt
- min_unit: min_unit_opt
- reserved: reserved_opt
- step_size: step_size_opt
Request example
---------------
.. literalinclude:: ./samples/inventories/update-inventories-request.json
:language: javascript
Response
--------
.. rest_parameters:: parameters.yaml
- resource_provider_generation: resource_provider_generation
- inventories: inventories
- allocation_ratio: allocation_ratio
- max_unit: max_unit
- min_unit: min_unit
- reserved: reserved
- step_size: step_size
- total: total
Response Example
----------------
.. literalinclude:: ./samples/inventories/update-inventories.json
:language: javascript
Delete resource provider inventories
====================================
Deletes all inventory records for the resource provider identified by `{uuid}`.
**Troubleshooting**
The request returns an HTTP 409 when there are alllocations against
the provider or if the provider's inventory is updated by another
thread while attempting the operation.
.. note:: Method is available starting from version 1.5.
.. rest_method:: DELETE /resource_providers/{uuid}/inventories
Normal Response Codes: 204
Error response codes: itemNotFound(404), conflict(409)
.. note:: Since this request does not accept the resource provider generation,
it is not safe to use when multiple threads are managing inventories
for a single provider. In such situations, use the
``PUT /resource_providers/{uuid}/inventories`` API with an empty
``inventories`` dict.
Request
-------
.. rest_parameters:: parameters.yaml
- uuid: resource_provider_uuid_path
Response
--------
No body content is returned on a successful DELETE.

View File

@ -1,128 +0,0 @@
===========================
Resource provider inventory
===========================
See `Resource provider inventories`_ for a description.
This group of API calls works with a single inventory identified by ``resource_class``.
One inventory can be listed, created, updated and deleted per each call.
Show resource provider inventory
================================
.. rest_method:: GET /resource_providers/{uuid}/inventories/{resource_class}
Normal Response Codes: 200
Error response codes: itemNotFound(404)
Request
-------
.. rest_parameters:: parameters.yaml
- uuid: resource_provider_uuid_path
- resource_class: resource_class_path
Response
--------
.. rest_parameters:: parameters.yaml
- resource_provider_generation: resource_provider_generation
- allocation_ratio: allocation_ratio
- max_unit: max_unit
- min_unit: min_unit
- reserved: reserved
- step_size: step_size
- total: total
Response Example
----------------
.. literalinclude:: ./samples/inventories/get-inventory.json
:language: javascript
Update resource provider inventory
==================================
Replace the inventory record of the `{resource_class}` for the resource
provider identified by `{uuid}`.
.. rest_method:: PUT /resource_providers/{uuid}/inventories/{resource_class}
Normal Response Codes: 200
Error response codes: badRequest(400), itemNotFound(404), conflict(409)
Request
-------
.. rest_parameters:: parameters.yaml
- uuid: resource_provider_uuid_path
- resource_class: resource_class_path
- resource_provider_generation: resource_provider_generation
- total: total
- allocation_ratio: allocation_ratio_opt
- max_unit: max_unit_opt
- min_unit: min_unit_opt
- reserved: reserved_opt
- step_size: step_size_opt
Request example
---------------
.. literalinclude:: ./samples/inventories/update-inventory-request.json
:language: javascript
Response
--------
.. rest_parameters:: parameters.yaml
- resource_provider_generation: resource_provider_generation
- allocation_ratio: allocation_ratio
- max_unit: max_unit
- min_unit: min_unit
- reserved: reserved
- step_size: step_size
- total: total
Response Example
----------------
.. literalinclude:: ./samples/inventories/update-inventory.json
:language: javascript
Delete resource provider inventory
==================================
Delete the inventory record of the `{resource_class}` for
the resource provider identified by `{uuid}`.
See `Troubleshooting`_ section in ``Delete resource provider
inventories`` for a description. In addition, the request returns
HTTP 409 when there are allocations for the specified resource
provider and resource class.
.. _Troubleshooting: ?expanded=delete-resource-provider-inventories-detail#delete-resource-provider-inventories
.. rest_method:: DELETE /resource_providers/{uuid}/inventories/{resource_class}
Normal Response Codes: 204
Error response codes: itemNotFound(404), conflict(409)
Request
-------
.. rest_parameters:: parameters.yaml
- uuid: resource_provider_uuid_path
- resource_class: resource_class_path
Response
--------
No body content is returned on a successful DELETE.

View File

@ -1,640 +0,0 @@
# variables in header
location:
description: |
The location URL of the resource created,
HTTP header "Location: <Location URL>" will be returned.
in: header
required: true
type: string
# variables in path
consumer_uuid: &consumer_uuid
type: string
in: path
required: true
description: >
The uuid of a consumer.
resource_class_path: &resource_class_path
type: string
in: path
required: true
description: >
The name of one resource class.
resource_class_path_custom: &resource_class_path_custom
type: string
in: path
required: true
description: >
The name of one resource class. The name must start with
the prefix ``CUSTOM_``. If not, the request returns a ``Bad Request (400)``
response code.
resource_provider_uuid_path: &resource_provider_uuid_path
type: string
in: path
required: true
description: >
The uuid of a resource provider.
trait_name:
type: string
in: path
required: true
description: >
The name of a trait.
# variables in query
allocation_candidates_group_policy:
type: string
in: query
required: false
min_version: 1.25
description: >
When more than one ``resourcesN`` query parameter is supplied,
``group_policy`` is required to indicate how the groups should interact.
With ``group_policy=none``, separate groupings - numbered or unnumbered -
may or may not be satisfied by the same provider. With
``group_policy=isolate``, numbered groups are guaranteed to be satisfied by
*different* providers - though there may still be overlap with the
unnumbered group.
allocation_candidates_limit:
type: integer
in: query
required: false
min_version: 1.16
description: >
A positive integer used to limit the maximum number of allocation
candidates returned in the response.
member_of: &member_of
type: string
in: query
required: false
description: >
A string representing an aggregate uuid; or the prefix ``in:`` followed by
a comma-separated list of strings representing aggregate uuids. The
returned resource providers must be associated with at least one of the
aggregates identified by uuid::
member_of=5e08ea53-c4c6-448e-9334-ac4953de3cfa
member_of=in:42896e0d-205d-4fe3-bd1e-100924931787,5e08ea53-c4c6-448e-9334-ac4953de3cfa
**Starting from microversion 1.24** specifying multiple ``member_of`` query
string parameters is possible. Multiple ``member_of`` parameters will
result in filtering providers that are associated with aggregates listed in
all of the ``member_of`` query string values. For example, to get the
providers that are associated with aggregate A as well as associated with
any of aggregates B or C, the user could issue the following query::
member_of=AGGA_UUID&member_of=in:AGGB_UUID,AGGC_UUID
min_version: 1.3
member_of_1_21:
<<: *member_of
min_version: 1.21
member_of_granular:
type: string
in: query
required: false
description: >
A string representing an aggregate uuid; or the prefix ``in:`` followed by
a comma-separated list of strings representing aggregate uuids. The
returned resource providers must be associated with at least one of the
aggregates identified by uuid. The parameter key is ``member_ofN``, where
``N`` represents a positive integer suffix corresponding with a
``resourcesN`` parameter. The value format is the same as for the
(unnumbered) ``member_of`` parameter; but all of the resources and traits
specified in a numbered grouping will always be satisfied by the same
resource provider. Separate groupings - numbered or unnumbered - may or may
not be satisfied by the same provider, depending on the value of the
``group_policy`` parameter.
It is an error to specify a ``member_ofN`` parameter without a
corresponding ``resourcesN`` parameter with the same suffix.
min_version: 1.25
project_id: &project_id
type: string
in: query
required: true
description: >
The uuid of a project.
required_traits_granular:
type: string
in: query
required: false
description: |
A comma-separated list of traits that a provider must have, or (if prefixed
with a ``!``) **not** have::
required42=HW_CPU_X86_AVX,HW_CPU_X86_SSE,!HW_CPU_X86_AVX2
The parameter key is ``requiredN``, where ``N`` represents a
positive integer suffix corresponding with a ``resourcesN`` parameter.
The value format is the same as for the (unnumbered) ``required``
parameter; but all of the resources and traits specified in a numbered
grouping will always be satisfied by the same resource provider. Separate
groupings - numbered or unnumbered - may or may not be satisfied by the
same provider, depending on the value of the ``group_policy`` parameter.
It is an error to specify a ``requiredN`` parameter without a corresponding
``resourcesN`` parameter with the same suffix.
min_version: 1.25
required_traits_unnumbered:
type: string
in: query
required: false
min_version: 1.17
description: |
A comma-separated list of traits that a provider must have::
required=HW_CPU_X86_AVX,HW_CPU_X86_SSE
Allocation requests in the response will be for resource providers that
have capacity for all requested resources and the set of those resource
providers will *collectively* contain all of the required traits. These
traits may be satisfied by any provider in the same non-sharing tree or
associated via aggregate. **Starting from microversion 1.22** traits which
are forbidden from any resource provider may be expressed by prefixing a
trait with a ``!``.
resource_provider_name_query:
type: string
in: query
required: false
description: >
The name of a resource provider to filter the list.
resource_provider_required_query:
type: string
in: query
required: false
description: >
A comma-delimited list of string trait names. Results will be filtered to
include only resource providers having all the specified traits. **Starting
from microversion 1.22** traits which are forbidden from any resource
provider may be expressed by prefixing a trait with a ``!``.
min_version: 1.18
resource_provider_tree_query:
type: string
in: query
required: false
description: >
A UUID of a resource provider. The returned resource providers will be in
the same "provider tree" as the specified provider.
min_version: 1.14
resource_provider_uuid_query:
<<: *resource_provider_uuid_path
in: query
required: false
resources_query_1_4:
type: string
in: query
required: false
description: |
A comma-separated list of strings indicating an amount of
resource of a specified class that a provider must have the
capacity and availability to serve::
resources=VCPU:4,DISK_GB:64,MEMORY_MB:2048
min_version: 1.4
resources_query_ac:
type: string
in: query
required: false
description: |
A comma-separated list of strings indicating an amount of
resource of a specified class that providers in each allocation request
must *collectively* have the capacity and availability to serve::
resources=VCPU:4,DISK_GB:64,MEMORY_MB:2048
These resources may be satisfied by any provider in the same non-sharing
tree or associated via aggregate.
resources_query_granular:
type: string
in: query
required: false
description: |
A comma-separated list of strings indicating an amount of
resource of a specified class that a provider must have the
capacity to serve::
resources42=VCPU:4,DISK_GB:64,MEMORY_MB:2048
The parameter key is ``resourcesN``, where ``N`` represents a unique
positive integer suffix. The value format is the same as for the
(unnumbered) ``resources`` parameter, but the resources specified in a
``resourcesN`` parameter will always be satisfied by a single provider.
Separate groupings - numbered or unnumbered - may or may not be satisfied
by the same provider depending on the value of the ``group_policy``
parameter.
min_version: 1.25
trait_associated:
type: string
in: query
required: false
description: >
If this parameter has a true value, the returned traits will be
those that are associated with at least one resource provider.
Available values for the parameter are true and false.
trait_name_query:
type: string
in: query
required: false
description: |
A string to filter traits. The following options are available:
`startswith` operator filters the traits whose name begins with a
specific prefix, e.g. name=startswith:CUSTOM,
`in` operator filters the traits whose name is in the specified list, e.g.
name=in:HW_CPU_X86_AVX,HW_CPU_X86_SSE,HW_CPU_X86_INVALID_FEATURE.
user_id: &user_id
type: string
in: query
required: false
description: >
The uuid of a user.
# variables in body
aggregates:
type: array
in: body
required: true
description: >
A list of aggregate uuids. Previously nonexistent aggregates are
created automatically.
allocation_ratio: &allocation_ratio
type: float
in: body
required: true
description: |
It is used in determining whether consumption of the resource of
the provider can exceed physical constraints.
For example, for a vCPU resource with::
allocation_ratio = 16.0
total = 8
Overall capacity is equal to 128 vCPUs.
allocation_ratio_opt:
<<: *allocation_ratio
required: false
allocation_requests:
type: array
in: body
required: true
description: >
A list of objects that contain a
serialized HTTP body that a client may subsequently use in a call
to PUT /allocations/{consumer_uuid} to claim resources against a
related set of resource providers.
allocations_array:
type: array
in: body
required: true
description: >
A list of dictionaries.
allocations_by_resource_provider:
type: object
in: body
required: true
description: >
A dictionary of allocations keyed by resource provider uuid.
allocations_dict: &allocations_dict
type: object
in: body
required: true
description: >
A dictionary of resource allocations keyed by resource provider uuid.
allocations_dict_empty:
<<: *allocations_dict
description: >
A dictionary of resource allocations keyed by resource provider uuid.
If this is an empty object, allocations for this consumer will be
removed.
min_version: null
capacity:
type: integer
in: body
required: true
description: >
The amount of the resource that the provider can accommodate.
consumer_generation: &consumer_generation
type: integer
in: body
required: true
description: >
The generation of the consumer. Should be set to ``null`` when indicating
that the caller expects the consumer does not yet exist.
consumer_generation_min:
<<: *consumer_generation
min_version: 1.28
consumer_uuid_body:
<<: *consumer_uuid
in: body
inventories:
type: object
in: body
required: true
description: >
A dictionary of inventories keyed by resource classes.
max_unit: &max_unit
type: integer
in: body
required: true
description: >
A maximum amount any single allocation against an inventory can have.
max_unit_opt:
<<: *max_unit
required: false
min_unit: &min_unit
type: integer
in: body
required: true
description: >
A minimum amount any single allocation against an inventory can have.
min_unit_opt:
<<: *min_unit
required: false
project_id_body: &project_id_body
<<: *project_id
in: body
project_id_body_1_12:
<<: *project_id_body
min_version: 1.12
project_id_body_1_8:
<<: *project_id_body
min_version: 1.8
provider_summaries:
type: object
in: body
required: true
description: >
A dictionary keyed by resource provider UUID included in the
``allocation_requests``, of dictionaries of inventory/capacity information.
provider_summaries_1_12:
type: object
in: body
required: true
description: >
A dictionary keyed by resource provider UUID included in the
``allocation_requests``, of dictionaries of inventory/capacity information.
The list of traits the resource provider has associated with it is included
in version 1.17 and above.
Starting from microversion 1.29, the provider summaries include
all resource providers in the same resource provider tree that has one
or more resource providers included in the ``allocation_requests``.
reserved: &reserved
type: integer
in: body
required: true
description: >
The amount of the resource a provider has reserved for its own use.
reserved_opt:
<<: *reserved
required: false
description: >
The amount of the resource a provider has reserved for its own use.
Up to microversion 1.25, this value has to be less than the value of
``total``. Starting from microversion 1.26, this value has to be less
than or equal to the value of ``total``.
reshaper_allocations:
type: object
in: body
required: true
description: >
A dictionary of multiple allocations, keyed by consumer uuid. Each
collection of allocations describes the full set of allocations for
each consumer. Each consumer allocations dict is itself a dictionary
of resource allocations keyed by resource provider uuid. An empty
dictionary indicates no change in existing allocations, whereas an empty
``allocations`` dictionary **within** a consumer dictionary indicates that
all allocations for that consumer should be deleted.
reshaper_inventories:
type: object
in: body
required: true
description: >
A dictionary of multiple inventories, keyed by resource provider uuid. Each
inventory describes the desired full inventory for each resource provider.
An empty dictionary causes the inventory for that provider to be deleted.
resource_class:
<<: *resource_class_path
in: body
resource_class_custom:
<<: *resource_class_path_custom
in: body
resource_class_links:
type: array
in: body
required: true
description: >
A list of links associated with one resource class.
resource_classes:
type: array
in: body
required: true
description: >
A list of ``resource_class`` objects.
resource_provider_allocations:
type: object
in: body
required: true
description: >
A dictionary of allocation records keyed by consumer uuid.
resource_provider_generation: &resource_provider_generation
type: integer
in: body
required: true
description: >
A consistent view marker that assists with the management of
concurrent resource provider updates.
resource_provider_generation_optional:
<<: *resource_provider_generation
required: false
description: >
A consistent view marker that assists with the management of
concurrent resource provider updates. The value is ignored;
it is present to preserve symmetry between read and
write representations.
resource_provider_generation_v1_19:
<<: *resource_provider_generation
min_version: 1.19
resource_provider_links: &resource_provider_links
type: array
in: body
required: true
description: |
A list of links associated with one resource provider.
.. note::
Aggregates relationship link is available starting from version 1.1.
Traits relationship link is available starting from version 1.6.
Allocations relationship link is available starting from version 1.11.
resource_provider_links_v1_20:
<<: *resource_provider_links
description: |
A list of links associated with the resource provider.
resource_provider_name:
type: string
in: body
required: true
description: >
The name of one resource provider.
resource_provider_object:
type: object
in: body
required: true
description: >
A dictionary which contains the UUID of the resource provider.
resource_provider_parent_provider_uuid_request:
type: string
in: body
required: false
description: >
The UUID of the immediate parent of the resource provider. Once set, the
parent of a resource provider cannot be changed.
min_version: 1.14
resource_provider_parent_provider_uuid_required_no_min:
type: string
in: body
required: true
description: >
The UUID of the immediate parent of the resource provider.
resource_provider_parent_provider_uuid_response_1_14:
type: string
in: body
required: true
description: >
The UUID of the immediate parent of the resource provider.
min_version: 1.14
resource_provider_parent_provider_uuid_response_1_29:
type: string
in: body
required: true
description: >
The UUID of the immediate parent of the resource provider.
min_version: 1.29
resource_provider_root_provider_uuid_1_29:
type: string
in: body
required: true
description: >
UUID of the top-most provider in this provider tree.
min_version: 1.29
resource_provider_root_provider_uuid_no_min: &resource_provider_root_provider_uuid_no_min
type: string
in: body
required: true
description: >
UUID of the top-most provider in this provider tree.
resource_provider_root_provider_uuid_required:
<<: *resource_provider_root_provider_uuid_no_min
description: >
Read-only UUID of the top-most provider in this provider tree.
min_version: 1.14
resource_provider_usages:
type: object
in: body
required: true
description: >
The usage summary of the resource provider. This is a dictionary that
describes how much each class of resource is being consumed on this
resource provider. For example, ``"VCPU": 1`` means 1 VCPU is used.
resource_provider_uuid:
<<: *resource_provider_uuid_path
in: body
resource_provider_uuid_opt:
<<: *resource_provider_uuid_path
in: body
required: false
resource_providers:
type: array
in: body
required: true
description: >
A list of ``resource_provider`` objects.
resources:
type: object
in: body
required: true
description: >
A dictionary of resource records keyed by resource class name.
step_size: &step_size
type: integer
in: body
required: