summaryrefslogtreecommitdiff
path: root/ironic/drivers/modules/agent.py
diff options
context:
space:
mode:
authorRiccardo Pittau <elfosardo@gmail.com>2019-03-21 12:42:26 +0100
committerRiccardo Pittau <elfosardo@gmail.com>2019-03-21 15:13:34 +0100
commit93a40e3fc7a8187c0444c1aae93a52beb5c68b4b (patch)
tree61479a0cc44054a39dbf438265e59057d72a08bc /ironic/drivers/modules/agent.py
parent7c0083ba7c785c4a26448c8ae9d09bdac8f6b03e (diff)
downloadironic-93a40e3fc7a8187c0444c1aae93a52beb5c68b4b.tar.gz
Fix capabilities passed as string in agent prepare
The value of capabilities can be either a string or a dict. There is a function to parse its value and provide a correct output as expected and it should always be used when reading node capabilities. Change-Id: I789fffd5f67eddbe5058581f13d75320ca712897 Story: 2005280 Task: 30133
Diffstat (limited to 'ironic/drivers/modules/agent.py')
-rw-r--r--ironic/drivers/modules/agent.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ironic/drivers/modules/agent.py b/ironic/drivers/modules/agent.py
index 1d3d552e7..b4f640e30 100644
--- a/ironic/drivers/modules/agent.py
+++ b/ironic/drivers/modules/agent.py
@@ -550,7 +550,7 @@ class AgentDeploy(AgentDeployMixin, base.DeployInterface):
# option is local.
with excutils.save_and_reraise_exception(reraise=False) as ctx:
instance_info = node.instance_info
- capabilities = instance_info.get('capabilities', {})
+ capabilities = utils.parse_instance_info_capabilities(node)
if 'boot_option' not in capabilities:
capabilities['boot_option'] = 'local'
instance_info['capabilities'] = capabilities