diff --git a/zaqar/storage/swift/driver.py b/zaqar/storage/swift/driver.py index c42c46aed..120e31cdb 100644 --- a/zaqar/storage/swift/driver.py +++ b/zaqar/storage/swift/driver.py @@ -98,8 +98,10 @@ class _ClientWrapper(object): username=self.parsed_url.username, password=self.parsed_url.password, project_name=self.parsed_url.path[1:], - user_domain_id='default', - project_domain_id='default', + user_domain_id=self.conf.user_domain_id, + user_domain_name=self.conf.user_domain_name, + project_domain_id=self.conf.project_domain_id, + project_domain_name=self.conf.project_domain_name, auth_url=self.conf.auth_url) self.session = keystone_session.Session(auth=self.auth) self.url = self.session.get_endpoint(service_type='object-store') @@ -113,5 +115,6 @@ class _ClientWrapper(object): self._refresh_auth() client = swiftclient.Connection( preauthurl=self.url, - preauthtoken=self.token) + preauthtoken=self.token, + insecure=self.conf.insecure) return getattr(client, attr) diff --git a/zaqar/storage/swift/options.py b/zaqar/storage/swift/options.py index e31a3dba8..4b57d0634 100644 --- a/zaqar/storage/swift/options.py +++ b/zaqar/storage/swift/options.py @@ -15,12 +15,17 @@ from oslo_config import cfg MESSAGE_SWIFT_OPTIONS = ( - cfg.StrOpt('auth_url', default="http://127.0.0.1:5000/v3/", + cfg.StrOpt("auth_url", default="http://127.0.0.1:5000/v3/", help="URI of Keystone endpoint to discover Swift"), - cfg.StrOpt('uri', + cfg.StrOpt("uri", default="swift://demo:nomoresecrete@/demo", help="Custom URI describing the swift connection."), - cfg.StrOpt('insecure', default=False, help="Don't check SSL certificate"), + cfg.StrOpt("insecure", default=False, help="Don't check SSL certificate"), + cfg.StrOpt("project_domain_id", default="default", + help="Domain ID containing project"), + cfg.StrOpt("project_domain_name", help="Domain name containing project"), + cfg.StrOpt("user_domain_id", default="default", help="User's domain id"), + cfg.StrOpt("user_domain_name", help="User's domain name"), )