summaryrefslogtreecommitdiff
path: root/ironic/conf/redfish.py
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2018-09-19 16:24:51 +0200
committerIlya Etingof <etingof@gmail.com>2018-12-04 09:07:06 +0100
commit59b5b66c8ed95a509223c834b271ecbe21e42e2f (patch)
tree5460a8babcaac878d5166f44058ef06c26c6f6ed /ironic/conf/redfish.py
parent6ca73361dba35c37b1a74b45e36d421826b490f5 (diff)
downloadironic-59b5b66c8ed95a509223c834b271ecbe21e42e2f.tar.gz
Add configurable Redfish client authentication
Adds 'driver_info/redfish_auth_type' option for Redfish HTTP client to chose one of the following authentication methods - 'basic', 'session' and 'auto'. The latter first tries 'session' and falls back to 'basic' if session authentication is not supported by the Redfish BMC. Default is set in ironic config (defaulted to 'auto'). Also bumped sushy requirement to 1.3.0+ Change-Id: I11bf8413bdb3f2d7f632495bb20a71a165554b27 Story: 2003813 Task: 26565
Diffstat (limited to 'ironic/conf/redfish.py')
-rw-r--r--ironic/conf/redfish.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/ironic/conf/redfish.py b/ironic/conf/redfish.py
index aa5751414..a49f2e5d1 100644
--- a/ironic/conf/redfish.py
+++ b/ironic/conf/redfish.py
@@ -36,7 +36,14 @@ opts = [
'BMC connections (obtained through Redfish Session '
'Service). This option caps the maximum number of '
'connections to maintain. The value of `0` disables '
- 'client connection caching completely.'))
+ 'client connection caching completely.')),
+ cfg.StrOpt('auth_type',
+ choices=[('basic', _('Use HTTP basic authentication')),
+ ('session', _('Use HTTP session authentication')),
+ ('auto', _('Try HTTP session authentication first, '
+ 'fall back to basic HTTP authentication'))],
+ default='auto',
+ help=_('Redfish HTTP client authentication method.'))
]