From efa064b96d7043a2c08d557c37eb07d626bdf050 Mon Sep 17 00:00:00 2001 From: Zenghui Shi Date: Thu, 21 Jun 2018 14:39:31 +0800 Subject: [PATCH] BIOS Settings: update admin doc Change-Id: I86a8515e8b0461c10e395c99a993fd553a11f843 --- doc/source/admin/bios.rst | 32 ++++++++++++------------- doc/source/contributor/bios_develop.rst | 27 ++++++++++++++------- doc/source/install/enabling-drivers.rst | 2 +- 3 files changed, 35 insertions(+), 26 deletions(-) diff --git a/doc/source/admin/bios.rst b/doc/source/admin/bios.rst index 9e6f433a0c..183e248426 100644 --- a/doc/source/admin/bios.rst +++ b/doc/source/admin/bios.rst @@ -15,7 +15,7 @@ cleaning. 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. 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 have been applied successfully via BIOS cleaning steps. The return of above 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:: [ { - "": + "setting name": { - "name": , - "value": + "name": "setting name", + "value": "value" } }, { - "": + "setting name": { - "name": , - "value": + "name": "setting name", + "value": "value" } }, ... @@ -81,14 +81,14 @@ To get a specified BIOS setting for a node:: $ openstack baremetal node bios setting show -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:: { - "": + "setting name": { - "name": , - "value": + "name": "setting name", + "value": "value" } } @@ -131,12 +131,12 @@ This cleaning step applies a set of BIOS settings for a node:: "args": { "settings": [ { - "name": , - "value": + "name": "name", + "value": "value" }, { - "name": , - "value": + "name": "name", + "value": "value" } ] } diff --git a/doc/source/contributor/bios_develop.rst b/doc/source/contributor/bios_develop.rst index 383aeb105d..42392ba18c 100644 --- a/doc/source/contributor/bios_develop.rst +++ b/doc/source/contributor/bios_develop.rst @@ -47,7 +47,7 @@ the following three methods: node_id = task.node.id node_info = driver_common.parse_driver_info(task.node) 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)) if len(create_list) > 0: @@ -57,9 +57,12 @@ the following three methods: objects.BIOSSettingList.save( task.context, node_id, update_list) if len(delete_list) > 0: + delete_names = [] for setting in delete_list: - objects.BIOSSetting.delete( - task.context, node_id, setting.name) + delete_names.append(setting.name) + objects.BIOSSettingList.delete( + task.context, node_id, delete_names) + .. note:: ``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 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 - existing bios_settings table after successfully applying given settings on - the node. + existing ``bios_settings`` table after successfully applying given settings + on the node. .. code-block:: python @@ -106,12 +109,18 @@ the following three methods: [ { - 'name': String, - 'value': String, + "setting name": + { + "name": "String", + "value": "String" + } }, { - 'name': String, - 'value': String, + "setting name": + { + "name": "String", + "value": "String" + } }, ... ] diff --git a/doc/source/install/enabling-drivers.rst b/doc/source/install/enabling-drivers.rst index 21245d7508..6b5c746eca 100644 --- a/doc/source/install/enabling-drivers.rst +++ b/doc/source/install/enabling-drivers.rst @@ -64,7 +64,7 @@ bios enabled_hardware_types = enabled_bios_interfaces = - See :doc:`/admin/bios` for details. This interface is vendor-specific. + See :doc:`/admin/bios` for details. boot manages booting of both the deploy ramdisk and the user instances on the bare metal node. See :doc:`/admin/interfaces/boot` for details.