diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-03-25 07:22:06 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-03-25 07:22:06 +0000 |
commit | 526b8f5a616d7f0445d3b83e9c591c1b70b9a7c9 (patch) | |
tree | 23a5774af07d42ae0198e82978d26c2883a100fd | |
parent | 8f48d74466990ed38ec1323ff1dac64ef838d977 (diff) | |
parent | d404492aed582fd275495a860ef1d153623ce3fa (diff) | |
download | ironic-526b8f5a616d7f0445d3b83e9c591c1b70b9a7c9.tar.gz |
Merge "Ironic doesn't use cacert while talking to Swift" into stable/kilo
-rw-r--r-- | ironic/common/swift.py | 3 | ||||
-rw-r--r-- | ironic/tests/test_swift.py | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/ironic/common/swift.py b/ironic/common/swift.py index a4444e29f..a0adcc73d 100644 --- a/ironic/common/swift.py +++ b/ironic/common/swift.py @@ -48,6 +48,8 @@ CONF.import_opt('auth_version', 'keystonemiddleware.auth_token', group='keystone_authtoken') CONF.import_opt('insecure', 'keystonemiddleware.auth_token', group='keystone_authtoken') +CONF.import_opt('cafile', 'keystonemiddleware.auth_token', + group='keystone_authtoken') LOG = logging.getLogger(__name__) @@ -72,6 +74,7 @@ class SwiftAPI(object): auth_url = keystone.get_keystone_url(auth_url, auth_version) params = {'retries': CONF.swift.swift_max_retries, 'insecure': CONF.keystone_authtoken.insecure, + 'cacert': CONF.keystone_authtoken.cafile, 'user': user, 'tenant_name': tenant_name, 'key': key, diff --git a/ironic/tests/test_swift.py b/ironic/tests/test_swift.py index 9daa06ead..26aa8e91f 100644 --- a/ironic/tests/test_swift.py +++ b/ironic/tests/test_swift.py @@ -42,6 +42,7 @@ class SwiftTestCase(base.TestCase): self.config(auth_version='2', group='keystone_authtoken') self.config(swift_max_retries=2, group='swift') self.config(insecure=0, group='keystone_authtoken') + self.config(cafile='/path/to/ca/file', group='keystone_authtoken') # The constructor of SwiftAPI accepts arguments whose # default values are values of some config options above. So reload @@ -56,6 +57,7 @@ class SwiftTestCase(base.TestCase): 'tenant_name': 'tenant', 'key': 'password', 'authurl': 'http://authurl/v2.0', + 'cacert': '/path/to/ca/file', 'auth_version': '2'} connection_mock.assert_called_once_with(**params) |