diff --git a/.gitignore b/.gitignore index f254e0545979..1a3838669549 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/.zuul.yaml b/.zuul.yaml index 1ab46dcc528d..86bf1158c06f 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -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.*$ diff --git a/doc/source/contributor/api-ref-guideline.rst b/doc/source/contributor/api-ref-guideline.rst index d5bb8aa7b2af..5c6ade5ea327 100644 --- a/doc/source/contributor/api-ref-guideline.rst +++ b/doc/source/contributor/api-ref-guideline.rst @@ -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 +`_ +directory. Structure of inc file --------------------- diff --git a/placement-api-ref/ext/__init__.py b/placement-api-ref/ext/__init__.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/placement-api-ref/ext/validator.py b/placement-api-ref/ext/validator.py deleted file mode 100644 index 44a4cef36af3..000000000000 --- a/placement-api-ref/ext/validator.py +++ /dev/null @@ -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) diff --git a/placement-api-ref/source/aggregates.inc b/placement-api-ref/source/aggregates.inc deleted file mode 100644 index 83a77fb3bc5e..000000000000 --- a/placement-api-ref/source/aggregates.inc +++ /dev/null @@ -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 diff --git a/placement-api-ref/source/allocation_candidates.inc b/placement-api-ref/source/allocation_candidates.inc deleted file mode 100644 index d2d224b5a556..000000000000 --- a/placement-api-ref/source/allocation_candidates.inc +++ /dev/null @@ -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 diff --git a/placement-api-ref/source/allocations.inc b/placement-api-ref/source/allocations.inc deleted file mode 100644 index 0269af495c91..000000000000 --- a/placement-api-ref/source/allocations.inc +++ /dev/null @@ -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. diff --git a/placement-api-ref/source/conf.py b/placement-api-ref/source/conf.py deleted file mode 100644 index d4766be180de..000000000000 --- a/placement-api-ref/source/conf.py +++ /dev/null @@ -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', -] diff --git a/placement-api-ref/source/index.rst b/placement-api-ref/source/index.rst deleted file mode 100644 index c72c796210de..000000000000 --- a/placement-api-ref/source/index.rst +++ /dev/null @@ -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 `. - -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 diff --git a/placement-api-ref/source/inventories.inc b/placement-api-ref/source/inventories.inc deleted file mode 100644 index 468fcc74a0c8..000000000000 --- a/placement-api-ref/source/inventories.inc +++ /dev/null @@ -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. diff --git a/placement-api-ref/source/inventory.inc b/placement-api-ref/source/inventory.inc deleted file mode 100644 index 2ae07c8c93c5..000000000000 --- a/placement-api-ref/source/inventory.inc +++ /dev/null @@ -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. diff --git a/placement-api-ref/source/parameters.yaml b/placement-api-ref/source/parameters.yaml deleted file mode 100644 index 9c76f4b1012b..000000000000 --- a/placement-api-ref/source/parameters.yaml +++ /dev/null @@ -1,640 +0,0 @@ -# variables in header -location: - description: | - The location URL of the resource created, - HTTP header "Location: " 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: true - description: > - A representation of the divisible amount of the resource - that may be requested. For example, step_size = 5 means - that only values divisible by 5 (5, 10, 15, etc.) can be requested. -step_size_opt: - <<: *step_size - required: false -total: - type: integer - in: body - required: true - description: > - The actual amount of the resource that the provider can accommodate. -traits: &traits - type: array - in: body - required: true - description: > - A list of traits. -traits_1_17: - <<: *traits - min_version: 1.17 -used: - type: integer - in: body - required: true - description: > - The amount of the resource that has been already allocated. -user_id_body: &user_id_body - <<: *user_id - in: body - required: true -user_id_body_1_12: - <<: *user_id_body - min_version: 1.12 -user_id_body_1_8: - <<: *user_id_body - min_version: 1.8 -version_id: - type: string - in: body - required: true - description: > - A common name for the version being described. Informative only. -version_links: - type: array - in: body - required: true - description: > - A list of links related to and describing this version. -version_max: - type: string - in: body - required: true - description: > - The maximum microversion that is supported. -version_min: - type: string - in: body - required: true - description: > - The minimum microversion that is supported. -version_status: - type: string - in: body - required: true - description: > - The status of the version being described. With placement this is - "CURRENT". -versions: - type: array - in: body - required: true - description: > - A list of version objects that describe the API versions available. diff --git a/placement-api-ref/source/request-ids.inc b/placement-api-ref/source/request-ids.inc deleted file mode 100644 index e5b76f9bf178..000000000000 --- a/placement-api-ref/source/request-ids.inc +++ /dev/null @@ -1,66 +0,0 @@ -=========== -Request IDs -=========== - -All logs on the system, by default, include the global request ID and -the local request ID when available. -The local request ID is a unique ID locally generated by each service, -and thus different for each service (Nova, Cinder, Glance, Neutron, etc.) -involved in that operation. The format is ``req-`` + UUID (UUID4). -The global request ID is a user-specified request ID which is utilized as -a common identifier by all services. This request ID is same among all -services involved in that operation. The format is ``req-`` + UUID (UUID4). -This allows an administrator to track -the API request processing as it transitions between all the different -nova services or between nova and other component services called by Nova -during that request. - -Even if specifying a global request ID in a request, users receive always -a local request ID as the response. - -For more details about request IDs, please reference: `Faults -`_ -(It is *not* for Placement APIs, but there are some common points.) - -**Request** - -.. NOTE(takashin): The 'rest_parameters' directive needs the 'rest_method' - directive before itself. But this file does not contain - the 'rest_method' directive. - So the 'rest_parameters' directive is not used. - -.. list-table:: - :widths: 20 10 10 60 - :header-rows: 1 - - * - Name - - In - - Type - - Description - * - X-Openstack-Request-Id (Optional) - - header - - string - - The global request ID, which is a unique common ID for tracking each - request in OpenStack components. The format of the global request ID - must be ``req-`` + UUID (UUID4). If not in accordance with the format, - it is ignored. It is associated with the request and appears in the log - lines for that request. By default, the middleware configuration ensures - that the global request ID appears in the log files. - -**Response** - -.. list-table:: - :widths: 20 10 10 60 - :header-rows: 1 - - * - Name - - In - - Type - - Description - * - X-Openstack-Request-Id - - header - - string - - The local request ID, which is a unique ID generated automatically for - tracking each request to nova. It is associated with the request and - appears in the log lines for that request. By default, the middleware - configuration ensures that the local request ID appears in the log files. diff --git a/placement-api-ref/source/reshaper.inc b/placement-api-ref/source/reshaper.inc deleted file mode 100644 index ee68bce03347..000000000000 --- a/placement-api-ref/source/reshaper.inc +++ /dev/null @@ -1,46 +0,0 @@ -======== -Reshaper -======== - -.. note:: Reshaper requests are available starting from version 1.30. - -Reshaper -======== - -Atomically migrate resource provider inventories and associated allocations. -This is used when some of the inventory needs to move from one resource -provider to another, such as when a class of inventory moves from a parent -provider to a new child provider. - -.. note:: This is a special operation that should only be used in rare cases - of resource provider topology changing when inventory is in use. - Only use this if you are really sure of what you are doing. - -.. rest_method:: POST /reshaper - -Normal Response Codes: 204 - -Error Response Codes: badRequest(400), conflict(409) - -Request -------- - -.. rest_parameters:: parameters.yaml - - - inventories: reshaper_inventories - - inventories.{resource_provider_uuid}.resource_provider_generation: resource_provider_generation - - inventories.{resource_provider_uuid}.inventories: inventories - - allocations: reshaper_allocations - - allocations.{consumer_uuid}.allocations: allocations_dict_empty - - allocations.{consumer_uuid}.allocations.{resource_provider_uuid}.resources: resources - - allocations.{consumer_uuid}.project_id: project_id_body - - allocations.{consumer_uuid}.user_id: user_id_body - - allocations.{consumer_uuid}.consumer_generation: consumer_generation - -Request Example ---------------- - -.. literalinclude:: ./samples/reshaper/post-reshaper-1.30.json - :language: javascript - -No body content is returned on a successful POST. diff --git a/placement-api-ref/source/resource_class.inc b/placement-api-ref/source/resource_class.inc deleted file mode 100644 index 47c42ffc97c3..000000000000 --- a/placement-api-ref/source/resource_class.inc +++ /dev/null @@ -1,149 +0,0 @@ -============== -Resource Class -============== - -See `resource classes`_ for a description. -This group of API calls works with a single resource class -identified by `name`. One resource class can be listed, updated and -deleted. - -.. note:: Resource class API calls are availiable starting from version 1.2. - -Show resource class -=================== - -.. rest_method:: GET /resource_classes/{name} - -Return a representation of the resource class identified by `{name}`. - -Normal Response Codes: 200 - -Error response codes: itemNotFound(404) - -Request -------- - -.. rest_parameters:: parameters.yaml - - - name: resource_class_path - -Response --------- - -.. rest_parameters:: parameters.yaml - - - name: resource_class - - links: resource_class_links - -Response Example ----------------- - -.. literalinclude:: ./samples/resource_classes/get-resource_class.json - :language: javascript - -Update resource class -===================== - -.. rest_method:: PUT /resource_classes/{name} - -Create or validate the existence of single resource class identified by `{name}`. - -.. note:: Method is available starting from version 1.7. - -Normal Response Codes: 201, 204 - -A `201 Created` response code will be returned if the new resource class -is successfully created. -A `204 No Content` response code will be returned if the resource class -already exists. - -Error response codes: badRequest(400) - -Request -------- - -.. rest_parameters:: parameters.yaml - - - name: resource_class_path_custom - -Response --------- - -.. rest_parameters:: parameters.yaml - - - Location: location - -No body content is returned on a successful PUT. - -Update resource class (microversions 1.2 - 1.6) -=============================================== - -.. warning:: Changing resource class names using the <1.7 microversion is strongly discouraged. - -.. rest_method:: PUT /resource_classes/{name} - -Update the name of the resource class identified by `{name}`. - -Normal Response Codes: 200 - -Error response codes: badRequest(400), itemNotFound(404), conflict(409) - -A `409 Conflict` response code will be returned if another resource -class exists with the provided name. - -Request -------- - -.. rest_parameters:: parameters.yaml - - - name: resource_class_path - - name: resource_class_custom - -Request example ---------------- - -.. literalinclude:: ./samples/resource_classes/update-resource_class-request.json - :language: javascript - -Response --------- - -.. rest_parameters:: parameters.yaml - - - name: resource_class - - links: resource_class_links - -Response Example ----------------- - -.. literalinclude:: ./samples/resource_classes/update-resource_class.json - :language: javascript - -Delete resource class -===================== - -.. rest_method:: DELETE /resource_classes/{name} - -Delete the resource class identified by `{name}`. - -Normal Response Codes: 204 - -Error response codes: badRequest(400), itemNotFound(404), conflict(409) - -A `400 BadRequest` response code will be returned if trying -to delete a standard resource class. - -A `409 Conflict` response code will be returned if there exist -inventories for the resource class. - -Request -------- - -.. rest_parameters:: parameters.yaml - - - name: resource_class_path - -Response --------- - -No body content is returned on a successful DELETE. diff --git a/placement-api-ref/source/resource_classes.inc b/placement-api-ref/source/resource_classes.inc deleted file mode 100644 index 7712efed42de..000000000000 --- a/placement-api-ref/source/resource_classes.inc +++ /dev/null @@ -1,73 +0,0 @@ -================ -Resource Classes -================ - -Resource classes are entities that indicate standard or -deployer-specific resources that can be provided by a resource -provider. - -.. note:: Resource class API calls are available starting from version 1.2. - -List resource classes -===================== - -.. rest_method:: GET /resource_classes - -Return a list of all resource classes. - -Normal Response Codes: 200 - -Response --------- - -.. rest_parameters:: parameters.yaml - - - resource_classes: resource_classes - - links: resource_class_links - - name: resource_class - -Response Example ----------------- - -.. literalinclude:: ./samples/resource_classes/get-resource_classes.json - :language: javascript - -Create resource class -===================== - -.. rest_method:: POST /resource_classes - -Create a new resource class. The new class must be a *custom* resource class, -prefixed with `CUSTOM_` and distinct from the standard resource classes. - -Normal Response Codes: 201 - -Error response codes: badRequest(400), conflict(409) - -A `400 BadRequest` response code will be returned if the resource class -does not have prefix `CUSTOM_`. - -A `409 Conflict` response code will -be returned if another resource class exists with the provided name. - -Request -------- - -.. rest_parameters:: parameters.yaml - - - name: resource_class_custom - -Request example ---------------- - -.. literalinclude:: ./samples/resource_classes/create-resource_classes-request.json - :language: javascript - -Response --------- - -.. rest_parameters:: parameters.yaml - - - Location: location - -No body content is returned on a successful POST. diff --git a/placement-api-ref/source/resource_provider.inc b/placement-api-ref/source/resource_provider.inc deleted file mode 100644 index 6b957caa0703..000000000000 --- a/placement-api-ref/source/resource_provider.inc +++ /dev/null @@ -1,122 +0,0 @@ -================= -Resource Provider -================= - -See `Resource providers`_ for a description. -This group of API calls works with a single resource provider -identified by `uuid`. One resource provider can be listed, updated and -deleted. - -Show resource provider -====================== - -.. rest_method:: GET /resource_providers/{uuid} - -Return a representation of the resource provider identified by `{uuid}`. - -Normal Response Codes: 200 - -Error response codes: itemNotFound(404) - -Request -------- - -.. rest_parameters:: parameters.yaml - - - uuid: resource_provider_uuid_path - -Response --------- - -.. rest_parameters:: parameters.yaml - - - generation: resource_provider_generation - - uuid: resource_provider_uuid - - links: resource_provider_links - - name: resource_provider_name - - parent_provider_uuid: resource_provider_parent_provider_uuid_response_1_14 - - root_provider_uuid: resource_provider_root_provider_uuid_required - -Response Example ----------------- - -.. literalinclude:: ./samples/resource_providers/get-resource_provider.json - :language: javascript - -Update resource provider -======================== - -.. rest_method:: PUT /resource_providers/{uuid} - -Update the name of the resource provider identified by `{uuid}`. - -Normal Response Codes: 200 - -Error response codes: badRequest(400), itemNotFound(404), conflict(409) - -A `409 Conflict` response code will be returned if another resource -provider exists with the provided name. - -Request -------- - -.. rest_parameters:: parameters.yaml - - - uuid: resource_provider_uuid_path - - name: resource_provider_name - - parent_provider_uuid: resource_provider_parent_provider_uuid_request - -Request example ---------------- - -.. literalinclude:: ./samples/resource_providers/update-resource_provider-request.json - :language: javascript - -Response --------- - -.. rest_parameters:: parameters.yaml - - - generation: resource_provider_generation - - uuid: resource_provider_uuid - - links: resource_provider_links - - name: resource_provider_name - - parent_provider_uuid: resource_provider_parent_provider_uuid_response_1_14 - - root_provider_uuid: resource_provider_root_provider_uuid_required - -Response Example ----------------- - -.. literalinclude:: ./samples/resource_providers/update-resource_provider.json - :language: javascript - -Delete resource provider -======================== - -.. rest_method:: DELETE /resource_providers/{uuid} - -Delete the resource provider identified by `{uuid}`. -This will also disassociate aggregates and delete inventories. - -Normal Response Codes: 204 - -Error response codes: itemNotFound(404), conflict(409) - -A `409 Conflict` response code will be returned if there exist -allocations records for any of the inventories that would be deleted -as a result of removing the resource provider. - -This error code will be also returned if there are existing child resource -providers under the parent resource provider being deleted. - -Request -------- - -.. rest_parameters:: parameters.yaml - - - uuid: resource_provider_uuid_path - -Response --------- - -No body content is returned on a successful DELETE. diff --git a/placement-api-ref/source/resource_provider_allocations.inc b/placement-api-ref/source/resource_provider_allocations.inc deleted file mode 100644 index 6c116ea80a0a..000000000000 --- a/placement-api-ref/source/resource_provider_allocations.inc +++ /dev/null @@ -1,40 +0,0 @@ -============================= -Resource provider allocations -============================= - -See `Allocations`_ for a description. - -List resource provider allocations -================================== - -Return a representation of all allocations made against this resource -provider, keyed by consumer uuid. Each allocation includes one or more -classes of resource and the amount consumed. - -.. rest_method:: GET /resource_providers/{uuid}/allocations - -Normal Response Codes: 200 - -Error response codes: itemNotFound(404) - -Request -------- - -.. rest_parameters:: parameters.yaml - - - uuid: resource_provider_uuid_path - -Response --------- - -.. rest_parameters:: parameters.yaml - - - allocations: resource_provider_allocations - - resources: resources - - resource_provider_generation: resource_provider_generation - -Response Example ----------------- - -.. literalinclude:: ./samples/resource_provider_allocations/get-resource_provider_allocations.json - :language: javascript diff --git a/placement-api-ref/source/resource_provider_traits.inc b/placement-api-ref/source/resource_provider_traits.inc deleted file mode 100644 index 49d9f9521170..000000000000 --- a/placement-api-ref/source/resource_provider_traits.inc +++ /dev/null @@ -1,121 +0,0 @@ -======================== -Resource provider traits -======================== - -See `Traits`_ for a description. -This group of API requests queries/edits the association between -traits and resource providers. - -.. note:: Traits API requests are availiable starting from version 1.6. - -List resource provider traits -============================= - -Return a list of traits for the resource provider identified by `{uuid}`. - -.. rest_method:: GET /resource_providers/{uuid}/traits - -Normal Response Codes: 200 - -Error response codes: itemNotFound(404) - -Request -------- - -.. rest_parameters:: parameters.yaml - - - uuid: resource_provider_uuid_path - -Response --------- - -.. rest_parameters:: parameters.yaml - - - traits: traits - - resource_provider_generation: resource_provider_generation - -Response Example ----------------- - -.. literalinclude:: ./samples/resource_provider_traits/get-resource_provider-traits.json - :language: javascript - -Update resource provider traits -=============================== - -Associate traits with the resource provider identified by `{uuid}`. -All the associated traits will be replaced by the traits specified in -the request body. - -.. rest_method:: PUT /resource_providers/{uuid}/traits - -Normal Response Codes: 200 - -Error response codes: badRequest(400), itemNotFound(404), conflict(409) - -* `400 Bad Request` if any of the specified traits are not valid. The valid - traits can be queried by `GET /traits`. -* `409 Conflict` if the `resource_provider_generation` doesn't match with the - server side. - -Request -------- - -.. rest_parameters:: parameters.yaml - - - uuid: resource_provider_uuid_path - - traits: traits - - resource_provider_generation: resource_provider_generation - -Request example ---------------- - -.. literalinclude:: ./samples/resource_provider_traits/update-resource_provider-traits-request.json - :language: javascript - -Response --------- - -.. rest_parameters:: parameters.yaml - - - traits: traits - - resource_provider_generation: resource_provider_generation - -Response Example ----------------- - -.. literalinclude:: ./samples/resource_provider_traits/update-resource_provider-traits.json - :language: javascript - - -Delete resource provider traits -=============================== - -Dissociate all the traits from the resource provider identified by `{uuid}`. - -.. rest_method:: DELETE /resource_providers/{uuid}/traits - -Normal Response Codes: 204 - -Error response codes: itemNotFound(404), conflict(409) - -* `409 Conflict` if the provider's traits are updated by another - thread while attempting the operation. - -.. note:: Since this request does not accept the resource provider generation, - it is not safe to use when multiple threads are managing traits for - a single provider. In such situations, use the - ``PUT /resource_providers/{uuid}/traits`` API with an empty - ``traits`` list. - -Request -------- - -.. rest_parameters:: parameters.yaml - - - uuid: resource_provider_uuid_path - -Response --------- - -No body content is returned on a successful DELETE. diff --git a/placement-api-ref/source/resource_provider_usages.inc b/placement-api-ref/source/resource_provider_usages.inc deleted file mode 100644 index 43d387a3ae28..000000000000 --- a/placement-api-ref/source/resource_provider_usages.inc +++ /dev/null @@ -1,42 +0,0 @@ -======================== -Resource provider usages -======================== - -Show the consumption of resources for a resource provider -in an aggregated form, i.e. without information for a particular consumer. -See `Resource provider allocations`_. - -List resource provider usages -============================= - -Return a report of usage information for resources associated with -the resource provider identified by `{uuid}`. The value is a dictionary -of resource classes paired with the sum of the allocations of that -resource class for this resource provider. - -.. rest_method:: GET /resource_providers/{uuid}/usages - -Normal Response Codes: 200 - -Error response codes: itemNotFound(404) - -Request -------- - -.. rest_parameters:: parameters.yaml - - - uuid: resource_provider_uuid_path - -Response --------- - -.. rest_parameters:: parameters.yaml - - - resource_provider_generation: resource_provider_generation - - usages: resource_provider_usages - -Response Example ----------------- - -.. literalinclude:: ./samples/resource_provider_usages/get-resource_provider_usages.json - :language: javascript diff --git a/placement-api-ref/source/resource_providers.inc b/placement-api-ref/source/resource_providers.inc deleted file mode 100644 index 8dfaad7b9df8..000000000000 --- a/placement-api-ref/source/resource_providers.inc +++ /dev/null @@ -1,116 +0,0 @@ -================== -Resource Providers -================== - -Resource providers are entities which provide consumable inventory of one or -more classes of resource (such as disk or memory). They can be listed (with -filters), created, updated and deleted. - -List resource providers -======================= - -.. rest_method:: GET /resource_providers - -List an optionally filtered collection of resource providers. - -Normal Response Codes: 200 - -Error response codes: badRequest(400) - -A `400 BadRequest` response code will be returned -if a resource class specified in ``resources`` request parameter -does not exist. - -Request -------- - -Several query parameters are available to filter the returned list of -resource providers. If multiple different parameters are provided, the results -of all filters are merged with a boolean `AND`. - -.. rest_parameters:: parameters.yaml - - - name: resource_provider_name_query - - uuid: resource_provider_uuid_query - - member_of: member_of - - resources: resources_query_1_4 - - in_tree: resource_provider_tree_query - - required: resource_provider_required_query - -Response --------- - -.. rest_parameters:: parameters.yaml - - - resource_providers: resource_providers - - generation: resource_provider_generation - - uuid: resource_provider_uuid - - links: resource_provider_links - - name: resource_provider_name - - parent_provider_uuid: resource_provider_parent_provider_uuid_response_1_14 - - root_provider_uuid: resource_provider_root_provider_uuid_required - -Response Example ----------------- - -.. literalinclude:: ./samples/resource_providers/get-resource_providers.json - :language: javascript - -Create resource provider -======================== - -.. rest_method:: POST /resource_providers - -Create a new resource provider. - -Normal Response Codes: 201 (microversions 1.0 - 1.19), 200 (microversions -1.20 - ) - -Error response codes: conflict(409) - -A `409 Conflict` response code will -be returned if another resource provider exists with the provided name -or uuid. - -Request -------- - -.. rest_parameters:: parameters.yaml - - - name: resource_provider_name - - uuid: resource_provider_uuid_opt - - parent_provider_uuid: resource_provider_parent_provider_uuid_request - -Request example ---------------- - -.. literalinclude:: ./samples/resource_providers/create-resource_providers-request.json - :language: javascript - -Response (microversions 1.0 - 1.19) ------------------------------------ - -.. rest_parameters:: parameters.yaml - - - Location: location - -No body content is returned on a successful POST. - -Response (microversions 1.20 - ) --------------------------------- - -.. rest_parameters:: parameters.yaml - - - Location: location - - generation: resource_provider_generation - - uuid: resource_provider_uuid - - links: resource_provider_links_v1_20 - - name: resource_provider_name - - parent_provider_uuid: resource_provider_parent_provider_uuid_required_no_min - - root_provider_uuid: resource_provider_root_provider_uuid_no_min - -Response Example (microversions 1.20 - ) ----------------------------------------- - -.. literalinclude:: ./samples/resource_providers/create-resource_provider.json - :language: javascript diff --git a/placement-api-ref/source/root.inc b/placement-api-ref/source/root.inc deleted file mode 100644 index 92532b051137..000000000000 --- a/placement-api-ref/source/root.inc +++ /dev/null @@ -1,51 +0,0 @@ -============ -API Versions -============ - -In order to bring new features to users over time, the Placement API -supports microversioning. Microversions allow use of certain features on a -per-request basis via the ``OpenStack-API-Version`` header. For example, to -request microversion 1.10, specify the header:: - - OpenStack-API-Version: placement 1.10 - -For more details about Microversions, please reference: -`Microversions -`_ - -.. note:: The maximum microversion supported by each release varies. - Please reference: - `REST API Version History - `__ - for API microversion history details. - -List Versions -============= - -.. rest_method:: GET / - -Fetch information about all known major versions of the placement API, -including information about the minimum and maximum microversions. - -.. note:: At this time there is only one major version of the placement API: - version 1.0. - -Normal Response Codes: 200 - -Response --------- - -.. rest_parameters:: parameters.yaml - - - versions: versions - - id: version_id - - min_version: version_min - - max_version: version_max - - status: version_status - - links: version_links - -Response Example ----------------- - -.. literalinclude:: ./samples/root/get-root.json - :language: javascript diff --git a/placement-api-ref/source/samples/aggregates/get-aggregates-1.19.json b/placement-api-ref/source/samples/aggregates/get-aggregates-1.19.json deleted file mode 100644 index fd1d7433d33b..000000000000 --- a/placement-api-ref/source/samples/aggregates/get-aggregates-1.19.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "aggregates": [ - "42896e0d-205d-4fe3-bd1e-100924931787", - "5e08ea53-c4c6-448e-9334-ac4953de3cfa" - ], - "resource_provider_generation": 8 -} diff --git a/placement-api-ref/source/samples/aggregates/get-aggregates.json b/placement-api-ref/source/samples/aggregates/get-aggregates.json deleted file mode 100644 index 6871048a7da8..000000000000 --- a/placement-api-ref/source/samples/aggregates/get-aggregates.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "aggregates": [ - "42896e0d-205d-4fe3-bd1e-100924931787", - "5e08ea53-c4c6-448e-9334-ac4953de3cfa" - ] -} diff --git a/placement-api-ref/source/samples/aggregates/update-aggregates-1.19.json b/placement-api-ref/source/samples/aggregates/update-aggregates-1.19.json deleted file mode 100644 index 2980c426c742..000000000000 --- a/placement-api-ref/source/samples/aggregates/update-aggregates-1.19.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "aggregates": [ - "42896e0d-205d-4fe3-bd1e-100924931787", - "5e08ea53-c4c6-448e-9334-ac4953de3cfa" - ], - "resource_provider_generation": 9 -} diff --git a/placement-api-ref/source/samples/aggregates/update-aggregates-request-1.19.json b/placement-api-ref/source/samples/aggregates/update-aggregates-request-1.19.json deleted file mode 100644 index 2980c426c742..000000000000 --- a/placement-api-ref/source/samples/aggregates/update-aggregates-request-1.19.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "aggregates": [ - "42896e0d-205d-4fe3-bd1e-100924931787", - "5e08ea53-c4c6-448e-9334-ac4953de3cfa" - ], - "resource_provider_generation": 9 -} diff --git a/placement-api-ref/source/samples/aggregates/update-aggregates-request.json b/placement-api-ref/source/samples/aggregates/update-aggregates-request.json deleted file mode 100644 index 502a73638487..000000000000 --- a/placement-api-ref/source/samples/aggregates/update-aggregates-request.json +++ /dev/null @@ -1,4 +0,0 @@ -[ - "42896e0d-205d-4fe3-bd1e-100924931787", - "5e08ea53-c4c6-448e-9334-ac4953de3cfa" -] diff --git a/placement-api-ref/source/samples/aggregates/update-aggregates.json b/placement-api-ref/source/samples/aggregates/update-aggregates.json deleted file mode 100644 index 6871048a7da8..000000000000 --- a/placement-api-ref/source/samples/aggregates/update-aggregates.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "aggregates": [ - "42896e0d-205d-4fe3-bd1e-100924931787", - "5e08ea53-c4c6-448e-9334-ac4953de3cfa" - ] -} diff --git a/placement-api-ref/source/samples/allocation_candidates/get-allocation_candidates-1.12.json b/placement-api-ref/source/samples/allocation_candidates/get-allocation_candidates-1.12.json deleted file mode 100644 index 0264a2d26fbf..000000000000 --- a/placement-api-ref/source/samples/allocation_candidates/get-allocation_candidates-1.12.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "allocation_requests": [ - { - "allocations": { - "a99bad54-a275-4c4f-a8a3-ac00d57e5c64": { - "resources": { - "DISK_GB": 100 - } - }, - "35791f28-fb45-4717-9ea9-435b3ef7c3b3": { - "resources": { - "VCPU": 1, - "MEMORY_MB": 1024 - } - } - } - }, - { - "allocations": { - "a99bad54-a275-4c4f-a8a3-ac00d57e5c64": { - "resources": { - "DISK_GB": 100 - } - }, - "915ef8ed-9b91-4e38-8802-2e4224ad54cd": { - "resources": { - "VCPU": 1, - "MEMORY_MB": 1024 - } - } - } - } - ], - "provider_summaries": { - "a99bad54-a275-4c4f-a8a3-ac00d57e5c64": { - "resources": { - "DISK_GB": { - "used": 0, - "capacity": 1900 - } - } - }, - "915ef8ed-9b91-4e38-8802-2e4224ad54cd": { - "resources": { - "VCPU": { - "used": 0, - "capacity": 384 - }, - "MEMORY_MB": { - "used": 0, - "capacity": 196608 - } - } - }, - "35791f28-fb45-4717-9ea9-435b3ef7c3b3": { - "resources": { - "VCPU": { - "used": 0, - "capacity": 384 - }, - "MEMORY_MB": { - "used": 0, - "capacity": 196608 - } - } - } - } -} diff --git a/placement-api-ref/source/samples/allocation_candidates/get-allocation_candidates-1.17.json b/placement-api-ref/source/samples/allocation_candidates/get-allocation_candidates-1.17.json deleted file mode 100644 index f05a7a5fbf75..000000000000 --- a/placement-api-ref/source/samples/allocation_candidates/get-allocation_candidates-1.17.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "allocation_requests": [ - { - "allocations": { - "a99bad54-a275-4c4f-a8a3-ac00d57e5c64": { - "resources": { - "DISK_GB": 100 - } - }, - "35791f28-fb45-4717-9ea9-435b3ef7c3b3": { - "resources": { - "VCPU": 1, - "MEMORY_MB": 1024 - } - } - } - }, - { - "allocations": { - "a99bad54-a275-4c4f-a8a3-ac00d57e5c64": { - "resources": { - "DISK_GB": 100 - } - }, - "915ef8ed-9b91-4e38-8802-2e4224ad54cd": { - "resources": { - "VCPU": 1, - "MEMORY_MB": 1024 - } - } - } - } - ], - "provider_summaries": { - "a99bad54-a275-4c4f-a8a3-ac00d57e5c64": { - "resources": { - "DISK_GB": { - "used": 0, - "capacity": 1900 - } - }, - "traits": ["HW_CPU_X86_SSE2", "HW_CPU_X86_AVX2"] - }, - "915ef8ed-9b91-4e38-8802-2e4224ad54cd": { - "resources": { - "VCPU": { - "used": 0, - "capacity": 384 - }, - "MEMORY_MB": { - "used": 0, - "capacity": 196608 - } - }, - "traits": ["HW_NIC_SRIOV"] - }, - "35791f28-fb45-4717-9ea9-435b3ef7c3b3": { - "resources": { - "VCPU": { - "used": 0, - "capacity": 384 - }, - "MEMORY_MB": { - "used": 0, - "capacity": 196608 - } - }, - "traits": [] - } - } -} diff --git a/placement-api-ref/source/samples/allocation_candidates/get-allocation_candidates-1.29.json b/placement-api-ref/source/samples/allocation_candidates/get-allocation_candidates-1.29.json deleted file mode 100644 index cf41b2ebac29..000000000000 --- a/placement-api-ref/source/samples/allocation_candidates/get-allocation_candidates-1.29.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "allocation_requests": [ - { - "allocations": { - "a99bad54-a275-4c4f-a8a3-ac00d57e5c64": { - "resources": { - "DISK_GB": 100 - } - }, - "35791f28-fb45-4717-9ea9-435b3ef7c3b3": { - "resources": { - "VCPU": 1, - "MEMORY_MB": 1024 - } - } - } - }, - { - "allocations": { - "a99bad54-a275-4c4f-a8a3-ac00d57e5c64": { - "resources": { - "DISK_GB": 100 - } - }, - "915ef8ed-9b91-4e38-8802-2e4224ad54cd": { - "resources": { - "VCPU": 1, - "MEMORY_MB": 1024 - } - } - } - } - ], - "provider_summaries": { - "a99bad54-a275-4c4f-a8a3-ac00d57e5c64": { - "resources": { - "DISK_GB": { - "used": 0, - "capacity": 1900 - } - }, - "traits": ["MISC_SHARES_VIA_AGGREGATE"], - "parent_provider_uuid": null, - "root_provider_uuid": "a99bad54-a275-4c4f-a8a3-ac00d57e5c64" - }, - "35791f28-fb45-4717-9ea9-435b3ef7c3b3": { - "resources": { - "VCPU": { - "used": 0, - "capacity": 384 - }, - "MEMORY_MB": { - "used": 0, - "capacity": 196608 - } - }, - "traits": ["HW_CPU_X86_SSE2", "HW_CPU_X86_AVX2"], - "parent_provider_uuid": null, - "root_provider_uuid": "35791f28-fb45-4717-9ea9-435b3ef7c3b3" - }, - "915ef8ed-9b91-4e38-8802-2e4224ad54cd": { - "resources": { - "VCPU": { - "used": 0, - "capacity": 384 - }, - "MEMORY_MB": { - "used": 0, - "capacity": 196608 - } - }, - "traits": ["HW_NIC_SRIOV"], - "parent_provider_uuid": null, - "root_provider_uuid": "915ef8ed-9b91-4e38-8802-2e4224ad54cd" - }, - "f5120cad-67d9-4f20-9210-3092a79a28cf": { - "resources": { - "SRIOV_NET_VF": { - "used": 0, - "capacity": 8 - } - }, - "traits": [], - "parent_provider_uuid": "915ef8ed-9b91-4e38-8802-2e4224ad54cd", - "root_provider_uuid": "915ef8ed-9b91-4e38-8802-2e4224ad54cd" - } - } -} diff --git a/placement-api-ref/source/samples/allocation_candidates/get-allocation_candidates.json b/placement-api-ref/source/samples/allocation_candidates/get-allocation_candidates.json deleted file mode 100644 index 71188ad67069..000000000000 --- a/placement-api-ref/source/samples/allocation_candidates/get-allocation_candidates.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "allocation_requests": [ - { - "allocations": [ - { - "resource_provider": { - "uuid": "30742363-f65e-4012-a60a-43e0bec38f0e" - }, - "resources": { - "MEMORY_MB": 512 - } - } - ] - } - ], - "provider_summaries": { - "30742363-f65e-4012-a60a-43e0bec38f0e": { - "resources": { - "DISK_GB": { - "capacity": 77, - "used": 0 - }, - "MEMORY_MB": { - "capacity": 11206, - "used": 256 - }, - "VCPU": { - "capacity": 64, - "used": 0 - } - } - } - } -} diff --git a/placement-api-ref/source/samples/allocations/get-allocations-1.28.json b/placement-api-ref/source/samples/allocations/get-allocations-1.28.json deleted file mode 100644 index 355142991c6e..000000000000 --- a/placement-api-ref/source/samples/allocations/get-allocations-1.28.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "allocations": { - "92637880-2d79-43c6-afab-d860886c6391": { - "generation": 2, - "resources": { - "DISK_GB": 5 - } - }, - "ba8e1ef8-7fa3-41a4-9bb4-d7cb2019899b": { - "generation": 8, - "resources": { - "MEMORY_MB": 512, - "VCPU": 2 - } - } - }, - "consumer_generation": 1, - "project_id": "7e67cbf7-7c38-4a32-b85b-0739c690991a", - "user_id": "067f691e-725a-451a-83e2-5c3d13e1dffc" -} diff --git a/placement-api-ref/source/samples/allocations/get-allocations.json b/placement-api-ref/source/samples/allocations/get-allocations.json deleted file mode 100644 index 04b79a65f474..000000000000 --- a/placement-api-ref/source/samples/allocations/get-allocations.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "allocations": { - "92637880-2d79-43c6-afab-d860886c6391": { - "generation": 2, - "resources": { - "DISK_GB": 5 - } - }, - "ba8e1ef8-7fa3-41a4-9bb4-d7cb2019899b": { - "generation": 8, - "resources": { - "MEMORY_MB": 512, - "VCPU": 2 - } - } - }, - "project_id": "7e67cbf7-7c38-4a32-b85b-0739c690991a", - "user_id": "067f691e-725a-451a-83e2-5c3d13e1dffc" -} diff --git a/placement-api-ref/source/samples/allocations/manage-allocations-request-1.28.json b/placement-api-ref/source/samples/allocations/manage-allocations-request-1.28.json deleted file mode 100644 index b6116902e0bc..000000000000 --- a/placement-api-ref/source/samples/allocations/manage-allocations-request-1.28.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "30328d13-e299-4a93-a102-61e4ccabe474": { - "consumer_generation": 1, - "project_id": "131d4efb-abc0-4872-9b92-8c8b9dc4320f", - "user_id": "131d4efb-abc0-4872-9b92-8c8b9dc4320f", - "allocations": { - "e10927c4-8bc9-465d-ac60-d2f79f7e4a00": { - "resources": { - "VCPU": 2, - "MEMORY_MB": 3 - }, - "generation": 4 - } - } - }, - "71921e4e-1629-4c5b-bf8d-338d915d2ef3": { - "consumer_generation": 1, - "project_id": "131d4efb-abc0-4872-9b92-8c8b9dc4320f", - "user_id": "131d4efb-abc0-4872-9b92-8c8b9dc4320f", - "allocations": {} - }, - "48c1d40f-45d8-4947-8d46-52b4e1326df8": { - "consumer_generation": 1, - "project_id": "131d4efb-abc0-4872-9b92-8c8b9dc4320f", - "user_id": "131d4efb-abc0-4872-9b92-8c8b9dc4320f", - "allocations": { - "e10927c4-8bc9-465d-ac60-d2f79f7e4a00": { - "resources": { - "VCPU": 4, - "MEMORY_MB": 5 - }, - "generation": 12 - } - } - } -} - diff --git a/placement-api-ref/source/samples/allocations/manage-allocations-request.json b/placement-api-ref/source/samples/allocations/manage-allocations-request.json deleted file mode 100644 index 8bdcb2151d5d..000000000000 --- a/placement-api-ref/source/samples/allocations/manage-allocations-request.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "30328d13-e299-4a93-a102-61e4ccabe474": { - "project_id": "131d4efb-abc0-4872-9b92-8c8b9dc4320f", - "user_id": "131d4efb-abc0-4872-9b92-8c8b9dc4320f", - "allocations": { - "e10927c4-8bc9-465d-ac60-d2f79f7e4a00": { - "resources": { - "VCPU": 2, - "MEMORY_MB": 3 - } - } - } - }, - "71921e4e-1629-4c5b-bf8d-338d915d2ef3": { - "project_id": "131d4efb-abc0-4872-9b92-8c8b9dc4320f", - "user_id": "131d4efb-abc0-4872-9b92-8c8b9dc4320f", - "allocations": {} - }, - "48c1d40f-45d8-4947-8d46-52b4e1326df8": { - "project_id": "131d4efb-abc0-4872-9b92-8c8b9dc4320f", - "user_id": "131d4efb-abc0-4872-9b92-8c8b9dc4320f", - "allocations": { - "e10927c4-8bc9-465d-ac60-d2f79f7e4a00": { - "resources": { - "VCPU": 4, - "MEMORY_MB": 5 - } - } - } - } -} diff --git a/placement-api-ref/source/samples/allocations/update-allocations-request-1.12.json b/placement-api-ref/source/samples/allocations/update-allocations-request-1.12.json deleted file mode 100644 index 5cf6a05cbde7..000000000000 --- a/placement-api-ref/source/samples/allocations/update-allocations-request-1.12.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "allocations": { - "4e061c03-611e-4caa-bf26-999dcff4284e": { - "resources": { - "DISK_GB": 20 - } - }, - "89873422-1373-46e5-b467-f0c5e6acf08f": { - "resources": { - "MEMORY_MB": 1024, - "VCPU": 1 - } - } - }, - "user_id": "66cb2f29-c86d-47c3-8af5-69ae7b778c70", - "project_id": "42a32c07-3eeb-4401-9373-68a8cdca6784" -} diff --git a/placement-api-ref/source/samples/allocations/update-allocations-request-1.28.json b/placement-api-ref/source/samples/allocations/update-allocations-request-1.28.json deleted file mode 100644 index 9b38373f1fe0..000000000000 --- a/placement-api-ref/source/samples/allocations/update-allocations-request-1.28.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "allocations": { - "4e061c03-611e-4caa-bf26-999dcff4284e": { - "resources": { - "DISK_GB": 20 - } - }, - "89873422-1373-46e5-b467-f0c5e6acf08f": { - "resources": { - "MEMORY_MB": 1024, - "VCPU": 1 - } - } - }, - "consumer_generation": 1, - "user_id": "66cb2f29-c86d-47c3-8af5-69ae7b778c70", - "project_id": "42a32c07-3eeb-4401-9373-68a8cdca6784" -} diff --git a/placement-api-ref/source/samples/allocations/update-allocations-request.json b/placement-api-ref/source/samples/allocations/update-allocations-request.json deleted file mode 100644 index 49d7eb39fd86..000000000000 --- a/placement-api-ref/source/samples/allocations/update-allocations-request.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "allocations": [ - { - "resource_provider": { - "uuid": "844ac34d-620e-474c-833c-4c9921251353" - }, - "resources": { - "MEMORY_MB": 512, - "VCPU": 2 - } - }, - { - "resource_provider": { - "uuid": "92637880-2d79-43c6-afab-d860886c6391" - }, - "resources": { - "DISK_GB": 5 - } - } - ], - "project_id": "6e3b2ce9-9175-4830-a862-b9de690bdceb", - "user_id": "81c516e3-5e0e-4dcb-9a38-4473d229a950" -} diff --git a/placement-api-ref/source/samples/inventories/get-inventories.json b/placement-api-ref/source/samples/inventories/get-inventories.json deleted file mode 100644 index 7bf856d0002c..000000000000 --- a/placement-api-ref/source/samples/inventories/get-inventories.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "inventories": { - "DISK_GB": { - "allocation_ratio": 1.0, - "max_unit": 35, - "min_unit": 1, - "reserved": 0, - "step_size": 1, - "total": 35 - }, - "MEMORY_MB": { - "allocation_ratio": 1.5, - "max_unit": 5825, - "min_unit": 1, - "reserved": 512, - "step_size": 1, - "total": 5825 - }, - "VCPU": { - "allocation_ratio": 16.0, - "max_unit": 4, - "min_unit": 1, - "reserved": 0, - "step_size": 1, - "total": 4 - } - }, - "resource_provider_generation": 7 -} diff --git a/placement-api-ref/source/samples/inventories/get-inventory.json b/placement-api-ref/source/samples/inventories/get-inventory.json deleted file mode 100644 index 3db100d95be9..000000000000 --- a/placement-api-ref/source/samples/inventories/get-inventory.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "allocation_ratio": 16.0, - "max_unit": 4, - "min_unit": 1, - "reserved": 0, - "resource_provider_generation": 9, - "step_size": 1, - "total": 4 -} diff --git a/placement-api-ref/source/samples/inventories/update-inventories-request.json b/placement-api-ref/source/samples/inventories/update-inventories-request.json deleted file mode 100644 index cc336e974822..000000000000 --- a/placement-api-ref/source/samples/inventories/update-inventories-request.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "inventories": { - "MEMORY_MB": { - "allocation_ratio": 2.0, - "max_unit": 16, - "step_size": 4, - "total": 128 - }, - "VCPU": { - "allocation_ratio": 10.0, - "reserved": 2, - "total": 64 - } - }, - "resource_provider_generation": 1 -} diff --git a/placement-api-ref/source/samples/inventories/update-inventories.json b/placement-api-ref/source/samples/inventories/update-inventories.json deleted file mode 100644 index 9731eaee41ef..000000000000 --- a/placement-api-ref/source/samples/inventories/update-inventories.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "inventories": { - "MEMORY_MB": { - "allocation_ratio": 2.0, - "max_unit": 16, - "min_unit": 1, - "reserved": 0, - "step_size": 4, - "total": 128 - }, - "VCPU": { - "allocation_ratio": 10.0, - "max_unit": 2147483647, - "min_unit": 1, - "reserved": 2, - "step_size": 1, - "total": 64 - } - }, - "resource_provider_generation": 2 -} diff --git a/placement-api-ref/source/samples/inventories/update-inventory-request.json b/placement-api-ref/source/samples/inventories/update-inventory-request.json deleted file mode 100644 index cee9a2f58364..000000000000 --- a/placement-api-ref/source/samples/inventories/update-inventory-request.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "resource_provider_generation": 7, - "total": 50 -} diff --git a/placement-api-ref/source/samples/inventories/update-inventory.json b/placement-api-ref/source/samples/inventories/update-inventory.json deleted file mode 100644 index 690b5837a0fe..000000000000 --- a/placement-api-ref/source/samples/inventories/update-inventory.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "allocation_ratio": 1.0, - "max_unit": 2147483647, - "min_unit": 1, - "reserved": 0, - "resource_provider_generation": 8, - "step_size": 1, - "total": 50 -} diff --git a/placement-api-ref/source/samples/reshaper/post-reshaper-1.30.json b/placement-api-ref/source/samples/reshaper/post-reshaper-1.30.json deleted file mode 100644 index baeebe173844..000000000000 --- a/placement-api-ref/source/samples/reshaper/post-reshaper-1.30.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "allocations": { - "9ae60315-80c2-48a0-a168-ca4f27c307e1": { - "allocations": { - "a7466641-cd72-499b-b6c9-c208eacecb3d": { - "resources": { - "DISK_GB": 1000 - } - } - }, - "project_id": "2f0c4ffc-4c4d-407a-b334-56297b871b7f", - "user_id": "cc8a0fe0-2b7c-4392-ae51-747bc73cf473", - "consumer_generation": 1 - }, - "4a6444e5-10d6-43f6-9a0b-8acce9309ac9": { - "allocations": { - "c4ddddbb-01ee-4814-85c9-f57a962c22ba": { - "resources": { - "VCPU": 1 - } - }, - "a7466641-cd72-499b-b6c9-c208eacecb3d": { - "resources": { - "DISK_GB": 20 - } - } - }, - "project_id": "2f0c4ffc-4c4d-407a-b334-56297b871b7f", - "user_id": "406e1095-71cb-47b9-9b3c-aedb7f663f5a", - "consumer_generation": 1 - }, - "e10e7ca0-2ac5-4c98-bad9-51c95b1930ed": { - "allocations": { - "c4ddddbb-01ee-4814-85c9-f57a962c22ba": { - "resources": { - "VCPU": 8 - } - } - }, - "project_id": "2f0c4ffc-4c4d-407a-b334-56297b871b7f", - "user_id": "cc8a0fe0-2b7c-4392-ae51-747bc73cf473", - "consumer_generation": 1 - } - }, - "inventories": { - "c4ddddbb-01ee-4814-85c9-f57a962c22ba": { - "inventories": { - "VCPU": { - "max_unit": 8, - "total": 10 - } - }, - "resource_provider_generation": null - }, - "a7466641-cd72-499b-b6c9-c208eacecb3d": { - "inventories": { - "DISK_GB": { - "min_unit": 10, - "total": 2048, - "max_unit": 1200, - "step_size": 10 - } - }, - "resource_provider_generation": 5 - } - } -} diff --git a/placement-api-ref/source/samples/resource_classes/create-resource_classes-request.json b/placement-api-ref/source/samples/resource_classes/create-resource_classes-request.json deleted file mode 100644 index 6a025e8735fa..000000000000 --- a/placement-api-ref/source/samples/resource_classes/create-resource_classes-request.json +++ /dev/null @@ -1 +0,0 @@ -{"name": "CUSTOM_FPGA"} diff --git a/placement-api-ref/source/samples/resource_classes/get-resource_class.json b/placement-api-ref/source/samples/resource_classes/get-resource_class.json deleted file mode 100644 index 4b0b155cd533..000000000000 --- a/placement-api-ref/source/samples/resource_classes/get-resource_class.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "links": [ - { - "href": "/placement/resource_classes/CUSTOM_FPGA", - "rel": "self" - } - ], - "name": "CUSTOM_FPGA" -} diff --git a/placement-api-ref/source/samples/resource_classes/get-resource_classes.json b/placement-api-ref/source/samples/resource_classes/get-resource_classes.json deleted file mode 100644 index b18c5b9538c5..000000000000 --- a/placement-api-ref/source/samples/resource_classes/get-resource_classes.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "resource_classes": [ - { - "links": [ - { - "href": "/placement/resource_classes/VCPU", - "rel": "self" - } - ], - "name": "VCPU" - }, - { - "links": [ - { - "href": "/placement/resource_classes/MEMORY_MB", - "rel": "self" - } - ], - "name": "MEMORY_MB" - }, - { - "links": [ - { - "href": "/placement/resource_classes/DISK_GB", - "rel": "self" - } - ], - "name": "DISK_GB" - }, - { - "links": [ - { - "href": "/placement/resource_classes/PCI_DEVICE", - "rel": "self" - } - ], - "name": "PCI_DEVICE" - }, - { - "links": [ - { - "href": "/placement/resource_classes/SRIOV_NET_VF", - "rel": "self" - } - ], - "name": "SRIOV_NET_VF" - }, - { - "links": [ - { - "href": "/placement/resource_classes/NUMA_SOCKET", - "rel": "self" - } - ], - "name": "NUMA_SOCKET" - }, - { - "links": [ - { - "href": "/placement/resource_classes/NUMA_CORE", - "rel": "self" - } - ], - "name": "NUMA_CORE" - }, - { - "links": [ - { - "href": "/placement/resource_classes/NUMA_THREAD", - "rel": "self" - } - ], - "name": "NUMA_THREAD" - }, - { - "links": [ - { - "href": "/placement/resource_classes/NUMA_MEMORY_MB", - "rel": "self" - } - ], - "name": "NUMA_MEMORY_MB" - }, - { - "links": [ - { - "href": "/placement/resource_classes/IPV4_ADDRESS", - "rel": "self" - } - ], - "name": "IPV4_ADDRESS" - } - ] -} diff --git a/placement-api-ref/source/samples/resource_classes/update-resource_class-request.json b/placement-api-ref/source/samples/resource_classes/update-resource_class-request.json deleted file mode 100644 index 122920276960..000000000000 --- a/placement-api-ref/source/samples/resource_classes/update-resource_class-request.json +++ /dev/null @@ -1 +0,0 @@ -{"name": "CUSTOM_FPGA_V2"} diff --git a/placement-api-ref/source/samples/resource_classes/update-resource_class.json b/placement-api-ref/source/samples/resource_classes/update-resource_class.json deleted file mode 100644 index 58ed1b29ae87..000000000000 --- a/placement-api-ref/source/samples/resource_classes/update-resource_class.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "links": [ - { - "href": "/placement/resource_classes/CUSTOM_FPGA_V2", - "rel": "self" - } - ], - "name": "CUSTOM_FPGA_V2" -} diff --git a/placement-api-ref/source/samples/resource_provider_allocations/get-resource_provider_allocations.json b/placement-api-ref/source/samples/resource_provider_allocations/get-resource_provider_allocations.json deleted file mode 100644 index 2a636d64f08e..000000000000 --- a/placement-api-ref/source/samples/resource_provider_allocations/get-resource_provider_allocations.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "allocations": { - "56785a3f-6f1c-4fec-af0b-0faf075b1fcb": { - "resources": { - "MEMORY_MB": 256, - "VCPU": 1 - } - }, - "9afd5aeb-d6b9-4dea-a588-1e6327a91834": { - "resources": { - "MEMORY_MB": 512, - "VCPU": 2 - } - }, - "9d16a611-e7f9-4ef3-be26-c61ed01ecefb": { - "resources": { - "MEMORY_MB": 1024, - "VCPU": 1 - } - } - }, - "resource_provider_generation": 12 -} diff --git a/placement-api-ref/source/samples/resource_provider_traits/get-resource_provider-traits.json b/placement-api-ref/source/samples/resource_provider_traits/get-resource_provider-traits.json deleted file mode 100644 index 7f0b461f266a..000000000000 --- a/placement-api-ref/source/samples/resource_provider_traits/get-resource_provider-traits.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "resource_provider_generation": 1, - "traits": [ - "CUSTOM_HW_FPGA_CLASS1", - "CUSTOM_HW_FPGA_CLASS3" - ] -} diff --git a/placement-api-ref/source/samples/resource_provider_traits/update-resource_provider-traits-request.json b/placement-api-ref/source/samples/resource_provider_traits/update-resource_provider-traits-request.json deleted file mode 100644 index ca2e2af0089b..000000000000 --- a/placement-api-ref/source/samples/resource_provider_traits/update-resource_provider-traits-request.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "resource_provider_generation": 0, - "traits": [ - "CUSTOM_HW_FPGA_CLASS1", - "CUSTOM_HW_FPGA_CLASS3" - ] -} diff --git a/placement-api-ref/source/samples/resource_provider_traits/update-resource_provider-traits.json b/placement-api-ref/source/samples/resource_provider_traits/update-resource_provider-traits.json deleted file mode 100644 index 7f0b461f266a..000000000000 --- a/placement-api-ref/source/samples/resource_provider_traits/update-resource_provider-traits.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "resource_provider_generation": 1, - "traits": [ - "CUSTOM_HW_FPGA_CLASS1", - "CUSTOM_HW_FPGA_CLASS3" - ] -} diff --git a/placement-api-ref/source/samples/resource_provider_usages/get-resource_provider_usages.json b/placement-api-ref/source/samples/resource_provider_usages/get-resource_provider_usages.json deleted file mode 100644 index c8fa81f9dac4..000000000000 --- a/placement-api-ref/source/samples/resource_provider_usages/get-resource_provider_usages.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "resource_provider_generation": 1, - "usages": { - "DISK_GB": 1, - "MEMORY_MB": 512, - "VCPU": 1 - } -} diff --git a/placement-api-ref/source/samples/resource_providers/create-resource_provider.json b/placement-api-ref/source/samples/resource_providers/create-resource_provider.json deleted file mode 100644 index 80ced75c6e96..000000000000 --- a/placement-api-ref/source/samples/resource_providers/create-resource_provider.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "generation": 0, - "links": [ - { - "href": "/placement/resource_providers/7d2590ae-fb85-4080-9306-058b4c915e3f", - "rel": "self" - }, - { - "href": "/placement/resource_providers/7d2590ae-fb85-4080-9306-058b4c915e3f/aggregates", - "rel": "aggregates" - }, - { - "href": "/placement/resource_providers/7d2590ae-fb85-4080-9306-058b4c915e3f/inventories", - "rel": "inventories" - }, - { - "href": "/placement/resource_providers/7d2590ae-fb85-4080-9306-058b4c915e3f/usages", - "rel": "usages" - }, - { - "href": "/placement/resource_providers/7d2590ae-fb85-4080-9306-058b4c915e3f/traits", - "rel": "traits" - }, - { - "href": "/placement/resource_providers/7d2590ae-fb85-4080-9306-058b4c915e3f/allocations", - "rel": "allocations" - } - ], - "name": "NFS Share", - "uuid": "7d2590ae-fb85-4080-9306-058b4c915e3f", - "parent_provider_uuid": "542df8ed-9be2-49b9-b4db-6d3183ff8ec8", - "root_provider_uuid": "542df8ed-9be2-49b9-b4db-6d3183ff8ec8" -} diff --git a/placement-api-ref/source/samples/resource_providers/create-resource_providers-request.json b/placement-api-ref/source/samples/resource_providers/create-resource_providers-request.json deleted file mode 100644 index 4b3dcd871c2f..000000000000 --- a/placement-api-ref/source/samples/resource_providers/create-resource_providers-request.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "NFS Share", - "uuid": "7d2590ae-fb85-4080-9306-058b4c915e3f", - "parent_provider_uuid": "542df8ed-9be2-49b9-b4db-6d3183ff8ec8" -} diff --git a/placement-api-ref/source/samples/resource_providers/get-resource_provider.json b/placement-api-ref/source/samples/resource_providers/get-resource_provider.json deleted file mode 100644 index 9a79680eb365..000000000000 --- a/placement-api-ref/source/samples/resource_providers/get-resource_provider.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "generation": 0, - "links": [ - { - "href": "/placement/resource_providers/3b4005be-d64b-456f-ba36-0ffd02718868", - "rel": "self" - }, - { - "href": "/placement/resource_providers/3b4005be-d64b-456f-ba36-0ffd02718868/aggregates", - "rel": "aggregates" - }, - { - "href": "/placement/resource_providers/3b4005be-d64b-456f-ba36-0ffd02718868/inventories", - "rel": "inventories" - }, - { - "href": "/placement/resource_providers/3b4005be-d64b-456f-ba36-0ffd02718868/usages", - "rel": "usages" - }, - { - "href": "/placement/resource_providers/3b4005be-d64b-456f-ba36-0ffd02718868/traits", - "rel": "traits" - }, - { - "href": "/placement/resource_providers/3b4005be-d64b-456f-ba36-0ffd02718868/allocations", - "rel": "allocations" - } - ], - "name": "Ceph Storage Pool", - "uuid": "3b4005be-d64b-456f-ba36-0ffd02718868", - "parent_provider_uuid": "542df8ed-9be2-49b9-b4db-6d3183ff8ec8", - "root_provider_uuid": "542df8ed-9be2-49b9-b4db-6d3183ff8ec8" -} diff --git a/placement-api-ref/source/samples/resource_providers/get-resource_providers.json b/placement-api-ref/source/samples/resource_providers/get-resource_providers.json deleted file mode 100644 index 33509c977df5..000000000000 --- a/placement-api-ref/source/samples/resource_providers/get-resource_providers.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "resource_providers": [ - { - "generation": 1, - "uuid": "99c09379-6e52-4ef8-9a95-b9ce6f68452e", - "links": [ - { - "href": "/resource_providers/99c09379-6e52-4ef8-9a95-b9ce6f68452e", - "rel": "self" - }, - { - "href": "/resource_providers/99c09379-6e52-4ef8-9a95-b9ce6f68452e/aggregates", - "rel": "aggregates" - }, - { - "href": "/resource_providers/99c09379-6e52-4ef8-9a95-b9ce6f68452e/inventories", - "rel": "inventories" - }, - { - "href": "/resource_providers/99c09379-6e52-4ef8-9a95-b9ce6f68452e/usages", - "rel": "usages" - }, - { - "href": "/resource_providers/99c09379-6e52-4ef8-9a95-b9ce6f68452e/traits", - "rel": "traits" - }, - { - "href": "/resource_providers/99c09379-6e52-4ef8-9a95-b9ce6f68452e/allocations", - "rel": "allocations" - } - ], - "name": "vgr.localdomain", - "parent_provider_uuid": "542df8ed-9be2-49b9-b4db-6d3183ff8ec8", - "root_provider_uuid": "542df8ed-9be2-49b9-b4db-6d3183ff8ec8" - }, - { - "generation": 2, - "uuid": "d0b381e9-8761-42de-8e6c-bba99a96d5f5", - "links": [ - { - "href": "/resource_providers/d0b381e9-8761-42de-8e6c-bba99a96d5f5", - "rel": "self" - }, - { - "href": "/resource_providers/d0b381e9-8761-42de-8e6c-bba99a96d5f5/aggregates", - "rel": "aggregates" - }, - { - "href": "/resource_providers/d0b381e9-8761-42de-8e6c-bba99a96d5f5/inventories", - "rel": "inventories" - }, - { - "href": "/resource_providers/d0b381e9-8761-42de-8e6c-bba99a96d5f5/usages", - "rel": "usages" - }, - { - "href": "/resource_providers/d0b381e9-8761-42de-8e6c-bba99a96d5f5/traits", - "rel": "traits" - }, - { - "href": "/resource_providers/d0b381e9-8761-42de-8e6c-bba99a96d5f5/allocations", - "rel": "allocations" - } - ], - "name": "pony1", - "parent_provider_uuid": null, - "root_provider_uuid": "d0b381e9-8761-42de-8e6c-bba99a96d5f5" - } - ] -} diff --git a/placement-api-ref/source/samples/resource_providers/update-resource_provider-request.json b/placement-api-ref/source/samples/resource_providers/update-resource_provider-request.json deleted file mode 100644 index e3df4d590aa3..000000000000 --- a/placement-api-ref/source/samples/resource_providers/update-resource_provider-request.json +++ /dev/null @@ -1,4 +0,0 @@ - { - "name": "Shared storage", - "parent_provider_uuid": "542df8ed-9be2-49b9-b4db-6d3183ff8ec8" - } diff --git a/placement-api-ref/source/samples/resource_providers/update-resource_provider.json b/placement-api-ref/source/samples/resource_providers/update-resource_provider.json deleted file mode 100644 index b159a3b12324..000000000000 --- a/placement-api-ref/source/samples/resource_providers/update-resource_provider.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "generation": 0, - "links": [ - { - "href": "/placement/resource_providers/33f26ae0-dbf2-485b-a24a-244d8280e29f", - "rel": "self" - }, - { - "href": "/placement/resource_providers/33f26ae0-dbf2-485b-a24a-244d8280e29f/aggregates", - "rel": "aggregates" - }, - { - "href": "/placement/resource_providers/33f26ae0-dbf2-485b-a24a-244d8280e29f/inventories", - "rel": "inventories" - }, - { - "href": "/placement/resource_providers/33f26ae0-dbf2-485b-a24a-244d8280e29f/usages", - "rel": "usages" - }, - { - "href": "/placement/resource_providers/33f26ae0-dbf2-485b-a24a-244d8280e29f/traits", - "rel": "traits" - }, - { - "href": "/placement/resource_providers/33f26ae0-dbf2-485b-a24a-244d8280e29f/allocations", - "rel": "allocations" - } - ], - "name": "Shared storage", - "uuid": "33f26ae0-dbf2-485b-a24a-244d8280e29f", - "parent_provider_uuid": "542df8ed-9be2-49b9-b4db-6d3183ff8ec8", - "root_provider_uuid": "d0b381e9-8761-42de-8e6c-bba99a96d5f5" -} diff --git a/placement-api-ref/source/samples/root/get-root.json b/placement-api-ref/source/samples/root/get-root.json deleted file mode 100644 index 513aceefac35..000000000000 --- a/placement-api-ref/source/samples/root/get-root.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "versions" : [ - { - "min_version" : "1.0", - "id" : "v1.0", - "max_version" : "1.28", - "status": "CURRENT", - "links": [ - { - "href": "", - "rel": "self" - } - ] - } - ] -} diff --git a/placement-api-ref/source/samples/traits/get-traits.json b/placement-api-ref/source/samples/traits/get-traits.json deleted file mode 100644 index bf81909ca220..000000000000 --- a/placement-api-ref/source/samples/traits/get-traits.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "traits": [ - "CUSTOM_HW_FPGA_CLASS1", - "CUSTOM_HW_FPGA_CLASS2", - "CUSTOM_HW_FPGA_CLASS3" - ] -} diff --git a/placement-api-ref/source/samples/usages/get-usages.json b/placement-api-ref/source/samples/usages/get-usages.json deleted file mode 100644 index 397cba688284..000000000000 --- a/placement-api-ref/source/samples/usages/get-usages.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "usages": { - "DISK_GB": 5, - "MEMORY_MB": 512, - "VCPU": 2 - } -} diff --git a/placement-api-ref/source/traits.inc b/placement-api-ref/source/traits.inc deleted file mode 100644 index f7111360ea08..000000000000 --- a/placement-api-ref/source/traits.inc +++ /dev/null @@ -1,135 +0,0 @@ -====== -Traits -====== - -Traits are *qualitative* characteristics of resource providers. -The classic example for traits can be requesting disk from different -providers: a user may request 80GiB of disk space for an instance -(quantitative), but may also expect that the disk be SSD instead of -spinning disk (qualitative). Traits provide a way to mark that a -storage provider is SSD or spinning. - -.. note:: Traits API requests are availiable starting from version 1.6. - -List traits -=========== - -Return a list of valid trait strings according to parameters specified. - -.. rest_method:: GET /traits - -Normal Response Codes: 200 - -Request -------- - -Several query parameters are available to filter the returned list of -traits. If multiple different parameters are provided, the results -of all filters are merged with a boolean `AND`. - -.. rest_parameters:: parameters.yaml - - - name: trait_name_query - - associated: trait_associated - -Response --------- - -.. rest_parameters:: parameters.yaml - - - traits: traits - -Response Example ----------------- - -.. literalinclude:: ./samples/traits/get-traits.json - :language: javascript - -Show traits -=========== - -Check if a trait name exists in this cloud. - -.. rest_method:: GET /traits/{name} - -Normal Response Codes: 204 - -Error response codes: itemNotFound(404) - -Request -------- - -.. rest_parameters:: parameters.yaml - - - name: trait_name - -Response --------- - -No body content is returned on a successful GET. - -Update traits -============= - -Insert a new custom trait. If traits already exists 204 will be returned. - -There are two kinds of traits: the standard traits and the custom traits. -The standard traits are interoperable across different OpenStack cloud -deployments. The definition of standard traits comes from the `os-traits` -library. The standard traits are read-only in the placement API which means -that the user can't modify any standard traits through API. -The custom traits are used by admin users to manage the non-standard -qualitative information of resource providers. - -.. rest_method:: PUT /traits/{name} - -Normal Response Codes: 201, 204 - -Error response codes: badRequest(400) - -* `400 BadRequest` if trait name is not prefixed with `CUSTOM_` prefix. - -Request -------- - -.. rest_parameters:: parameters.yaml - - - name: trait_name - -Response --------- - -.. rest_parameters:: parameters.yaml - - - Location: location - -No body content is returned on a successful PUT. - -Delete traits -============= - -Delete the trait specified be `{name}`. Note that only custom traits can be -deleted. - -.. rest_method:: DELETE /traits/{name} - -Normal Response Codes: 204 - -Error response codes: badRequest(400), itemNotFound(404), conflict(409) - -* `400 BadRequest` if the name to delete is standard trait. -* `404 Not Found` if no such trait exists. -* `409 Conflict` if the name to delete has associations with any - ResourceProvider. - -Request -------- - -.. rest_parameters:: parameters.yaml - - - name: trait_name - -Response --------- - -No body content is returned on a successful DELETE. diff --git a/placement-api-ref/source/usages.inc b/placement-api-ref/source/usages.inc deleted file mode 100644 index 7d320c0ec01b..000000000000 --- a/placement-api-ref/source/usages.inc +++ /dev/null @@ -1,43 +0,0 @@ -====== -Usages -====== - -Represent the consumption of resources for a project and user. - -.. note:: Usages API requests are available starting from version 1.9. - -List usages -=========== - -Return a report of usage information for resources associated with the -project identified by `project_id` and user identified by -`user_id`. The value is a dictionary of resource classes paired with -the sum of the allocations of that resource class for provided -parameters. - -.. rest_method:: GET /usages - -Normal Response Codes: 200 - -Error response codes: badRequest(400) - -Request -------- - -.. rest_parameters:: parameters.yaml - - - project_id: project_id - - user_id: user_id - -Response --------- - -.. rest_parameters:: parameters.yaml - - - usages: resources - -Response Example ----------------- - -.. literalinclude:: ./samples/usages/get-usages.json - :language: javascript diff --git a/tox.ini b/tox.ini index f48fc6d410c6..e3e88f6ab7df 100644 --- a/tox.ini +++ b/tox.ini @@ -195,15 +195,6 @@ commands = rm -rf api-ref/build sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html -[testenv:placement-api-ref] -description = - Generate the Placement API ref. Called from CI scripts to test and publish to developer.openstack.org. -envdir = {toxworkdir}/docs -deps = {[testenv:docs]deps} -commands = - rm -rf placement-api-ref/build - sphinx-build -W -b html -d placement-api-ref/build/doctrees placement-api-ref/source placement-api-ref/build/html - [testenv:releasenotes] description = Generate release notes. @@ -222,7 +213,6 @@ commands = {[testenv:docs]commands} {[testenv:api-guide]commands} {[testenv:api-ref]commands} - {[testenv:placement-api-ref]commands} {[testenv:releasenotes]commands} [testenv:bandit]