BIOS Settings: update admin doc

Change-Id: I86a8515e8b0461c10e395c99a993fd553a11f843
This commit is contained in:
Zenghui Shi
2018-06-21 14:39:31 +08:00
parent a794434098
commit efa064b96d
3 changed files with 35 additions and 26 deletions

View File

@@ -15,7 +15,7 @@ cleaning.
Prerequisites Prerequisites
============= =============
Bare metal servers shall be configured by the administrator to be managed Bare metal servers must be configured by the administrator to be managed
via ironic hardware type that supports BIOS configuration. via ironic hardware type that supports BIOS configuration.
Enabling hardware types Enabling hardware types
@@ -56,22 +56,22 @@ To retrieve the cached BIOS configuration from a specified node::
BIOS settings are cached on each node cleaning operation or when settings BIOS settings are cached on each node cleaning operation or when settings
have been applied successfully via BIOS cleaning steps. The return of above have been applied successfully via BIOS cleaning steps. The return of above
command is a table of last cached BIOS settings from specified node. command is a table of last cached BIOS settings from specified node.
If '-f json' is added as suffix to above command, it returns BIOS settings If ``-f json`` is added as suffix to above command, it returns BIOS settings
as following:: as following::
[ [
{ {
"<setting name>": "setting name":
{ {
"name": <setting name>, "name": "setting name",
"value": <value> "value": "value"
} }
}, },
{ {
"<setting name>": "setting name":
{ {
"name": <setting name>, "name": "setting name",
"value": <value> "value": "value"
} }
}, },
... ...
@@ -81,14 +81,14 @@ To get a specified BIOS setting for a node::
$ openstack baremetal node bios setting show <node-uuid> <setting-name> $ openstack baremetal node bios setting show <node-uuid> <setting-name>
If '-f json' is added as suffix to above command, it returns BIOS settings If ``-f json`` is added as suffix to above command, it returns BIOS settings
as following:: as following::
{ {
"<setting name>": "setting name":
{ {
"name": <setting name>, "name": "setting name",
"value": <value> "value": "value"
} }
} }
@@ -131,12 +131,12 @@ This cleaning step applies a set of BIOS settings for a node::
"args": { "args": {
"settings": [ "settings": [
{ {
"name": <name>, "name": "name",
"value": <value> "value": "value"
}, },
{ {
"name": <name>, "name": "name",
"value": <value> "value": "value"
} }
] ]
} }

View File

@@ -47,7 +47,7 @@ the following three methods:
node_id = task.node.id node_id = task.node.id
node_info = driver_common.parse_driver_info(task.node) node_info = driver_common.parse_driver_info(task.node)
settings = driver_client.get_bios_settings(node_info) settings = driver_client.get_bios_settings(node_info)
create_list, update_list, delete_list = ( create_list, update_list, delete_list, nochange_list = (
objects.BIOSSettingList.sync_node_setting(settings)) objects.BIOSSettingList.sync_node_setting(settings))
if len(create_list) > 0: if len(create_list) > 0:
@@ -57,9 +57,12 @@ the following three methods:
objects.BIOSSettingList.save( objects.BIOSSettingList.save(
task.context, node_id, update_list) task.context, node_id, update_list)
if len(delete_list) > 0: if len(delete_list) > 0:
delete_names = []
for setting in delete_list: for setting in delete_list:
objects.BIOSSetting.delete( delete_names.append(setting.name)
task.context, node_id, setting.name) objects.BIOSSettingList.delete(
task.context, node_id, delete_names)
.. note:: .. note::
``driver.client`` is vendor specific library to control and manage ``driver.client`` is vendor specific library to control and manage
@@ -82,8 +85,8 @@ the following three methods:
* Implement a method named ``apply_configuration``. This method needs to use * Implement a method named ``apply_configuration``. This method needs to use
the clean_step decorator. It takes the given BIOS settings and applies them the clean_step decorator. It takes the given BIOS settings and applies them
on the node. It also calls ``cache_bios_settings`` automatically to update on the node. It also calls ``cache_bios_settings`` automatically to update
existing bios_settings table after successfully applying given settings on existing ``bios_settings`` table after successfully applying given settings
the node. on the node.
.. code-block:: python .. code-block:: python
@@ -106,12 +109,18 @@ the following three methods:
[ [
{ {
'name': String, "setting name":
'value': String, {
"name": "String",
"value": "String"
}
}, },
{ {
'name': String, "setting name":
'value': String, {
"name": "String",
"value": "String"
}
}, },
... ...
] ]

View File

@@ -64,7 +64,7 @@ bios
enabled_hardware_types = <hardware_type_name> enabled_hardware_types = <hardware_type_name>
enabled_bios_interfaces = <bios_interface_name> enabled_bios_interfaces = <bios_interface_name>
See :doc:`/admin/bios` for details. This interface is vendor-specific. See :doc:`/admin/bios` for details.
boot boot
manages booting of both the deploy ramdisk and the user instances on the manages booting of both the deploy ramdisk and the user instances on the
bare metal node. See :doc:`/admin/interfaces/boot` for details. bare metal node. See :doc:`/admin/interfaces/boot` for details.