From 5b545086ac06a58ce0f114840050be52c3e7eda0 Mon Sep 17 00:00:00 2001 From: Cenne Date: Tue, 24 Aug 2021 14:29:53 +0200 Subject: [PATCH] Minor formatting and doc changes to change boot mode feature commit. Story: 2008567 Task: 41709 depends-on: https://review.opendev.org/c/openstack/ironic/+/800084 Change-Id: I44e41dc3d8abcb99a2248d7b9c7ac5e9d786bb98 --- .../source/baremetal-api-v1-node-management.inc | 4 ++-- ironic/api/controllers/v1/node.py | 15 +++++++-------- ironic/conductor/rpcapi.py | 4 ++-- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/api-ref/source/baremetal-api-v1-node-management.inc b/api-ref/source/baremetal-api-v1-node-management.inc index 60986be712..6ff275e2cb 100644 --- a/api-ref/source/baremetal-api-v1-node-management.inc +++ b/api-ref/source/baremetal-api-v1-node-management.inc @@ -312,9 +312,9 @@ Request a change to the Node's boot mode. Normal response code: 202 (Accepted) Error codes: - - 409 (Conflict, NodeLocked, ClientError) - 400 (Invalid, InvalidStateRequested, InvalidParameterValue) - 404 (NotFound) + - 409 (Conflict, NodeLocked, ClientError) - 503 (NoFreeConductorWorkers) Request @@ -347,9 +347,9 @@ Request a change to the Node's secure boot state. Normal response code: 202 (Accepted) Error codes: - - 409 (Conflict, NodeLocked, ClientError) - 400 (Invalid, InvalidStateRequested, InvalidParameterValue) - 404 (NotFound) + - 409 (Conflict, NodeLocked, ClientError) - 503 (NoFreeConductorWorkers) Request diff --git a/ironic/api/controllers/v1/node.py b/ironic/api/controllers/v1/node.py index e40743617f..bf3191efa9 100644 --- a/ironic/api/controllers/v1/node.py +++ b/ironic/api/controllers/v1/node.py @@ -835,11 +835,11 @@ class NodeStatesController(rest.RestController): """Asynchronous set the boot mode of the node. :param node_ident: the UUID or logical name of a node. - :param target: The desired boot_mode for the node. (uefi/bios) - :raises: NotFound (HTTP 404) if requested version of the API - is less than 1.76. + :param target: The desired boot_mode for the node (uefi/bios). :raises: InvalidParameterValue (HTTP 400) if the requested target state is not valid. + :raises: NotFound (HTTP 404) if requested version of the API + is less than 1.76. :raises: Conflict (HTTP 409) if a node is in adopting state or another transient state. @@ -871,8 +871,7 @@ class NodeStatesController(rest.RestController): ". Try again later.") raise exception.Conflict(msg, action=target, node=node_ident, - state=rpc_node.provision_state - ) + state=rpc_node.provision_state) api.request.rpcapi.change_node_boot_mode(api.request.context, rpc_node.uuid, target, topic=topic) @@ -887,11 +886,11 @@ class NodeStatesController(rest.RestController): """Asynchronous set the secure_boot state of the node. :param node_ident: the UUID or logical name of a node. - :param target: The desired secure_boot for the node. (True/False) - :raises: NotFound (HTTP 404) if requested version of the API - is less than 1.76. + :param target: Should secure_boot be enabled on node (True/False). :raises: InvalidParameterValue (HTTP 400) if the requested target state is not valid. + :raises: NotFound (HTTP 404) if requested version of the API + is less than 1.76. :raises: Conflict (HTTP 409) if a node is in adopting state. """ diff --git a/ironic/conductor/rpcapi.py b/ironic/conductor/rpcapi.py index ec1cf05891..7d753b90e5 100644 --- a/ironic/conductor/rpcapi.py +++ b/ironic/conductor/rpcapi.py @@ -292,7 +292,7 @@ class ConductorAPI(object): :param context: request context. :param node_id: node id or uuid. :param new_state: one of ironic.common.boot_modes values - ('bios' / 'uefi') + ('bios' or 'uefi') :param topic: RPC topic. Defaults to self.topic. :raises: NoFreeConductorWorker when there is no free worker to start async task. @@ -312,7 +312,7 @@ class ConductorAPI(object): :param context: request context. :param node_id: node id or uuid. :param new_state: Target secure boot state - (True => 'on' / False => 'off') + (True => 'on' or False => 'off') :param topic: RPC topic. Defaults to self.topic. :raises: NoFreeConductorWorker when there is no free worker to start async task.