summaryrefslogtreecommitdiff
path: root/ironic/drivers/modules/agent_client.py
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2021-07-20 08:25:42 +0000
committerGerrit Code Review <review@openstack.org>2021-07-20 08:25:42 +0000
commit59563e9581a874fb7d39815d1103127bd0b0cc7a (patch)
tree736ccc692be5da8fbf36a8605234a261e7fc90e5 /ironic/drivers/modules/agent_client.py
parent41a10cffce8bd85048d939f79fd64371b7382997 (diff)
parentce5baa38039fa8e84cd642f23ea1f085546dbf6b (diff)
downloadironic-59563e9581a874fb7d39815d1103127bd0b0cc7a.tar.gz
Merge "Fix handling driver_info[agent_verify_ca] == False"
Diffstat (limited to 'ironic/drivers/modules/agent_client.py')
-rw-r--r--ironic/drivers/modules/agent_client.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/ironic/drivers/modules/agent_client.py b/ironic/drivers/modules/agent_client.py
index b24d1812c..cd5e04471 100644
--- a/ironic/drivers/modules/agent_client.py
+++ b/ironic/drivers/modules/agent_client.py
@@ -98,9 +98,13 @@ class AgentClient(object):
})
def _get_verify(self, node):
- value = (node.driver_internal_info.get('agent_verify_ca')
- or node.driver_info.get('agent_verify_ca')
- or CONF.agent.verify_ca)
+ # False is a valid value, don't use 'or'
+ value = node.driver_internal_info.get('agent_verify_ca')
+ if value is None:
+ value = node.driver_info.get('agent_verify_ca')
+ if value is None:
+ value = CONF.agent.verify_ca
+
if isinstance(value, str):
try:
value = strutils.bool_from_string(value, strict=True)