Pass configured endpoint type to sahara client

Change-Id: I8136409020a7251ae1015129236b0e3d2d20a51b
Story: 2009735
Task: 44157
(cherry picked from commit 693624c9af)
This commit is contained in:
Pierre Riteau 2021-12-09 12:40:38 +01:00
parent 211f92dc45
commit 03547d5ce7
1 changed files with 3 additions and 1 deletions

View File

@ -95,6 +95,7 @@ def safe_call(func, *args, **kwargs):
def client(request):
insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
cacert = getattr(settings, 'OPENSTACK_SSL_CACERT', None)
endpoint_type = getattr(settings, 'OPENSTACK_ENDPOINT_TYPE', 'publicURL')
auth = identity.Token(auth_url=request.user.endpoint,
token=request.user.token.id,
project_id=request.user.project_id)
@ -106,7 +107,8 @@ def client(request):
sess = session.Session(auth=auth, verify=verify)
return api_client.Client(VERSIONS.get_active_version()["version"],
service_type=SAHARA_SERVICE,
session=sess)
session=sess,
endpoint_type=endpoint_type)
def prepare_acl_update_dict(is_public=None, is_protected=None):