Merge "swift: Respect the OPENSTACK_SSL_NO_VERIFY setting"
This commit is contained in:
commit
2c02f7c11e
@ -107,6 +107,7 @@ def _metadata_to_header(metadata):
|
||||
def swift_api(request):
|
||||
endpoint = base.url_for(request, 'object-store')
|
||||
cacert = getattr(settings, 'OPENSTACK_SSL_CACERT', None)
|
||||
insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
|
||||
LOG.debug('Swift connection created using token "%s" and url "%s"'
|
||||
% (request.user.token.id, endpoint))
|
||||
return swiftclient.client.Connection(None,
|
||||
@ -115,6 +116,7 @@ def swift_api(request):
|
||||
preauthtoken=request.user.token.id,
|
||||
preauthurl=endpoint,
|
||||
cacert=cacert,
|
||||
insecure=insecure,
|
||||
auth_version="2.0")
|
||||
|
||||
|
||||
|
@ -347,6 +347,7 @@ class APITestCase(TestCase):
|
||||
preauthtoken=mox.IgnoreArg(),
|
||||
preauthurl=mox.IgnoreArg(),
|
||||
cacert=None,
|
||||
insecure=False,
|
||||
auth_version="2.0") \
|
||||
.AndReturn(self.swiftclient)
|
||||
expected_calls -= 1
|
||||
|
Loading…
Reference in New Issue
Block a user