diff options
author | Arun S A G <sagarun@gmail.com> | 2021-03-01 00:09:34 -0800 |
---|---|---|
committer | Jay Faulkner <jay.faulkner@verizonmedia.com> | 2021-03-31 14:20:39 -0700 |
commit | 288b8fd88351afcb4cd254a208dc75e18cb20cb9 (patch) | |
tree | 8178d6b1eabefefbc88e25e87c8bedc0b81256c9 /ironic/api/controllers/v1/utils.py | |
parent | 34b2183862fe6efdcd08ff9a56c49dd4a9ae4d40 (diff) | |
download | ironic-288b8fd88351afcb4cd254a208dc75e18cb20cb9.tar.gz |
Add agent_status and agent_status_message params to heartbeat
agent_status is used by anaconda ramdisk to inform the
conductor about state of the deployment. Valid agent
states are 'start', 'end' and 'error'. The agent_status_message
is used to describe the why the agent_status is set to a
particular state. Use of these parameters require API
version 1.72 or greater.
When anaconda finishes deployment the agent_status is
set to 'end'. When anaconda ramdisk is unable to deploy
the OS for some reason the agent_status is set to 'error'.
PXEAnacondaDeploy is implemented to handle the 'anaconda'
deploy interface. PXEAnacondaDeploy ties to together pieces
needed to deploy a node using anaconda ramdisk.
Co-Authored-By: Jay Faulkner <jay@jvf.cc>
Change-Id: Ieb452149730510b001c4712bbb2e0f28acfc3c2e
Diffstat (limited to 'ironic/api/controllers/v1/utils.py')
-rw-r--r-- | ironic/api/controllers/v1/utils.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ironic/api/controllers/v1/utils.py b/ironic/api/controllers/v1/utils.py index 0e4b77ec2..65ce7fda5 100644 --- a/ironic/api/controllers/v1/utils.py +++ b/ironic/api/controllers/v1/utils.py @@ -1884,6 +1884,11 @@ def allow_deploy_steps(): return api.request.version.minor >= versions.MINOR_69_DEPLOY_STEPS +def allow_status_in_heartbeat(): + """Check if heartbeat accepts agent_status and agent_status_message.""" + return api.request.version.minor >= versions.MINOR_72_HEARTBEAT_STATUS + + def check_allow_deploy_steps(target, deploy_steps): """Check if deploy steps are allowed""" |