Add documentation for BIOS settings

Update api-ref documentation, to add the BIOS
settings.

Change-Id: Ic592b5fa39f0d19d5676906ecd5c8fcbebf8e25f
This commit is contained in:
Yolanda Robla 2018-07-24 13:40:44 +02:00
parent 40af9848ac
commit 95a449357c
6 changed files with 157 additions and 0 deletions

View File

@ -15,6 +15,7 @@ IRONIC_API_VERSION="1.37"
export OS_AUTH_TOKEN IRONIC_URL
DOC_BIOS_UUID="dff29d23-1ded-43b4-8ae1-5eebb3e30de1"
DOC_CHASSIS_UUID="dff29d23-1ded-43b4-8ae1-5eebb3e30de1"
DOC_NODE_UUID="6d85703a-565d-469a-96ce-30b6de53079d"
DOC_DYNAMIC_NODE_UUID="2b045129-a906-46af-bc1a-092b294b3428"
@ -303,6 +304,7 @@ GET v1/nodes/$NID/volume/targets?detail=True > node-volume-target-detail-respons
#####################
# Replace automatically generated UUIDs by already used in documentation
sed -i "s/$BID/$DOC_BIOS_UUID/" *.json
sed -i "s/$CID/$DOC_CHASSIS_UUID/" *.json
sed -i "s/$NID/$DOC_NODE_UUID/" *.json
sed -i "s/$DNID/$DOC_DYNAMIC_NODE_UUID/" *.json

View File

@ -0,0 +1,84 @@
.. -*- rst -*-
=================
Node Bios (nodes)
=================
.. versionadded:: 1.40
Given a Node identifier (``uuid`` or ``name``), the API exposes the list of
all Bios settings associated with that Node.
These endpoints do not allow modification of the Bios settings; that should be
done by using ``clean steps``.
List all Bios settings by Node
==============================
.. rest_method:: GET /v1/nodes/{node_ident}/bios
Return a list of Bios settings associated with ``node_ident``.
Normal response code: 200
Error codes: 404
Request
-------
.. rest_parameters:: parameters.yaml
- node_ident: node_ident
Response
--------
.. rest_parameters:: parameters.yaml
- bios: bios_settings
- created_at: created_at
- updated_at: updated_at
- links: links
- name: bios_setting_name
- value: bios_setting_value
**Example list of a Node's Bios settings:**
.. literalinclude:: samples/node-bios-list-response.json
Show single Bios setting of a Node
==================================
.. rest_method:: GET /v1/nodes/{node_ident}/bios/{bios_setting}
Return the content of the specific bios ``bios_setting`` associated with
``node_ident``.
Normal response code: 200
Error codes: 404
Request
-------
.. rest_parameters:: parameters.yaml
- node_ident: node_ident
- bios_setting: bios_setting
Response
--------
.. rest_parameters:: parameters.yaml
- <key>: d_bios_setting
- created_at: created_at
- updated_at: updated_at
- links: links
- name: bios_setting_name
- value: bios_setting_value
**Example details of a Node's Bios setting details:**
.. literalinclude:: samples/node-bios-detail-response.json

View File

@ -23,4 +23,5 @@
.. include:: baremetal-api-v1-driver-passthru.inc
.. include:: baremetal-api-v1-chassis.inc
.. include:: baremetal-api-v1-misc.inc
.. include:: baremetal-api-v1-nodes-bios.inc

View File

@ -38,6 +38,12 @@ x-openstack-ironic-api-version:
type: string
# variables in path
bios_setting:
description: |
The name of the Bios setting.
in: path
required: true
type: string
chassis_ident:
description: |
The UUID of the chassis.
@ -343,6 +349,25 @@ agent_node:
type: JSON
# variables in the API body
bios_setting_name:
description: |
The name of a Bios setting for a Node, eg. "virtualization".
in: body
required: true
type: string
bios_setting_value:
description: |
The value of a Bios setting for a Node, eg. "on".
in: body
required: true
type: string
bios_settings:
description: |
Optional list of one or more Bios settings. It includes following fields
"created_at", "updated_at", "links", "name", "value".
in: body
required: true
type: array
boot_device:
description: |
The boot device for a Node, eg. "pxe" or "disk".
@ -409,6 +434,13 @@ created_at:
in: body
required: true
type: string
d_bios_setting:
description: |
Dictionary containing the definition of a Bios setting. It includes the
following fields "created_at", "updated_at", "links", "name", "value".
in: body
required: true
type: dictionary
default_boot_interface:
description: |
The default boot interface used for a node with a dynamic driver, if no

View File

@ -0,0 +1,18 @@
{
"virtualization": {
"created_at": "2016-08-18T22:28:49.653974+00:00",
"updated_at": "2016-08-18T22:28:49.653974+00:00",
"links": [
{
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/bios/virtualization",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/bios/virtualization",
"rel": "bookmark"
}
],
"name": "virtualization",
"value": "on"
}
}

View File

@ -0,0 +1,20 @@
{
"bios": [
{
"created_at": "2016-08-18T22:28:49.653974+00:00",
"updated_at": "2016-08-18T22:28:49.653974+00:00",
"links": [
{
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/bios/virtualization",
"rel": "self"
},
{
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/bios/virtualization",
"rel": "bookmark"
}
],
"name": "virtualization",
"value": "on"
}
]
}