28a399a13c
This commit does several things, which were just easier to do together. - Adds a new "misc" page describing the /v1/lookup and /v1/heartbeat resources. - Adds descriptions of the node.resource_class and node.network_interface fields that were introduced into the API but not into the documentation. - Introduces a new script, api-ref/regenerate-samples.sh, which can be used with Ironic to automate the generation of most of the sample files used in the api-ref documententation. - Corrects several errors in the sample JSON files that rendered errors when using them with curl for POST, PUT, or PATCH. - Uses the aforementioned regenerate-samples.sh script to regenerate most of the JSON result samples, ensuring that they are all up to date with the v1.22 API microversion. - Removes a few old/incorrect "Error Code" listings. - Updates the index page to remove extraneous wording. Change-Id: I764cbb43be15f05ba681de6ce1be1ae7c022173d
231 lines
3.9 KiB
ReStructuredText
231 lines
3.9 KiB
ReStructuredText
.. -*- rst -*-
|
|
|
|
=================
|
|
Chassis (chassis)
|
|
=================
|
|
|
|
The Chassis resource type was originally conceived as a means to group Node
|
|
resources. Support for this continues to exist in the REST API, however, it is
|
|
very minimal. The Chassis object does not provide any functionality today
|
|
aside from a means to list a group of Nodes.
|
|
|
|
Use of this resource is discouraged, and may be deprecated and removed in a
|
|
future release.
|
|
|
|
|
|
List chassis with details
|
|
=========================
|
|
|
|
.. rest_method:: GET /v1/chassis/detail
|
|
|
|
Lists all chassis with details.
|
|
|
|
Normal response codes: 200
|
|
|
|
.. TODO: add error codes
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- limit: limit
|
|
- marker: marker
|
|
- sort_dir: sort_dir
|
|
- sort_key: sort_key
|
|
|
|
Response Parameters
|
|
-------------------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- uuid: uuid
|
|
- chassis: chassis
|
|
- description: description
|
|
- extra: extra
|
|
|
|
Response Example
|
|
----------------
|
|
|
|
.. literalinclude:: samples/chassis-list-details-response.json
|
|
:language: javascript
|
|
|
|
|
|
Show chassis details
|
|
====================
|
|
|
|
.. rest_method:: GET /v1/chassis/{chassis_id}
|
|
|
|
Shows details for a chassis.
|
|
|
|
Normal response codes: 200
|
|
|
|
.. TODO: add error codes
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- fields: fields
|
|
|
|
Response Parameters
|
|
-------------------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- uuid: uuid
|
|
- chassis: chassis
|
|
- description: description
|
|
- extra: extra
|
|
|
|
Response Example
|
|
----------------
|
|
|
|
.. literalinclude:: samples/chassis-show-response.json
|
|
:language: javascript
|
|
|
|
|
|
Update chassis
|
|
==============
|
|
|
|
.. rest_method:: PATCH /v1/chassis/{chassis_id}
|
|
|
|
Updates a chassis.
|
|
|
|
Normal response codes: 200
|
|
|
|
.. TODO: add error codes
|
|
|
|
Request
|
|
-------
|
|
|
|
The BODY of the PATCH request must be a JSON PATCH document, adhering to
|
|
`RFC 6902 <https://tools.ietf.org/html/rfc6902>`_.
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- chassis: chassis
|
|
- description: description
|
|
- extra: extra
|
|
|
|
Request Example
|
|
---------------
|
|
|
|
.. literalinclude:: samples/chassis-update-request.json
|
|
:language: javascript
|
|
|
|
Response Parameters
|
|
-------------------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- description: description
|
|
- links: links
|
|
- extra: extra
|
|
- created_at: created_at
|
|
- updated_at: updated_at
|
|
- chassis: chassis
|
|
- nodes: nodes
|
|
- uuid: uuid
|
|
|
|
Response Example
|
|
----------------
|
|
|
|
.. literalinclude:: samples/chassis-update-response.json
|
|
:language: javascript
|
|
|
|
|
|
Delete chassis
|
|
==============
|
|
|
|
.. rest_method:: DELETE /v1/chassis/{chassis_id}
|
|
|
|
Deletes a chassis.
|
|
|
|
.. TODO: add error codes
|
|
|
|
Request
|
|
-------
|
|
|
|
Create chassis
|
|
==============
|
|
|
|
.. rest_method:: POST /v1/chassis
|
|
|
|
Creates a chassis.
|
|
|
|
Error response codes:201,413,415,405,404,403,401,400,503,409,
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- chassis: chassis
|
|
- description: description
|
|
- extra: extra
|
|
|
|
Request Example
|
|
---------------
|
|
|
|
.. literalinclude:: samples/chassis-create-request.json
|
|
:language: javascript
|
|
|
|
Response Parameters
|
|
-------------------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- description: description
|
|
- links: links
|
|
- extra: extra
|
|
- created_at: created_at
|
|
- updated_at: updated_at
|
|
- nodes: nodes
|
|
- uuid: uuid
|
|
|
|
Response Example
|
|
----------------
|
|
|
|
.. literalinclude:: samples/chassis-show-response.json
|
|
:language: javascript
|
|
|
|
List chassis
|
|
============
|
|
|
|
.. rest_method:: GET /v1/chassis
|
|
|
|
Lists all chassis.
|
|
|
|
Normal response codes: 200
|
|
|
|
.. TODO: add error codes
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- limit: limit
|
|
- marker: marker
|
|
- sort_dir: sort_dir
|
|
- sort_key: sort_key
|
|
- fields: fields
|
|
|
|
Response Parameters
|
|
-------------------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- uuid: uuid
|
|
- chassis: chassis
|
|
- description: description
|
|
- extra: extra
|
|
|
|
Response Example
|
|
----------------
|
|
|
|
.. literalinclude:: samples/chassis-list-response.json
|
|
:language: javascript
|