More fixes for 0.5.0 support

This commit is contained in:
Andreas Holmsten 2020-04-08 15:29:42 +02:00
parent b02dc735e3
commit 78e0ca9f70
2 changed files with 22 additions and 22 deletions

View File

@ -27,7 +27,7 @@ identity:
can_edit_users: True can_edit_users: True
username_is_email: True username_is_email: True
role_mapping: role_mapping:
{{ adjutant_role_mapping | to_nice_yaml(indent=2, width=140) | indent(2, True) }} {{ adjutant_role_mapping | to_nice_yaml(indent=2, width=140) | indent(4, True) }}
auth: auth:
username: {{ adjutant_service_user_name }} username: {{ adjutant_service_user_name }}
password: {{ adjutant_service_password }} password: {{ adjutant_service_password }}
@ -38,7 +38,7 @@ identity:
api: api:
active_delegate_apis: active_delegate_apis:
{{ adjutant_active_delegate_apis | to_nice_yaml(indent=2, width=140) | indent(2, True) }} {{ adjutant_active_delegate_apis | to_nice_yaml(indent=2, width=140) | indent(4, True) }}
delegate_apis: delegate_apis:
CreateProjectAndUser: CreateProjectAndUser:
default_region: {{ adjutant_service_region }} default_region: {{ adjutant_service_region }}
@ -102,15 +102,15 @@ workflow:
action_defaults: action_defaults:
NewProjectAction: NewProjectAction:
default_roles: default_roles:
{{ adjutant_role_mapping.project_admin | to_nice_yaml(indent=2, width=140) | indent(2, True) }} {{ adjutant_role_mapping.project_admin | to_nice_yaml(indent=2, width=140) | indent(8, True) }}
NewProjectWithUserAction: NewProjectWithUserAction:
default_roles: default_roles:
{{ adjutant_role_mapping.project_admin | to_nice_yaml(indent=2, width=140) | indent(2, True) }} {{ adjutant_role_mapping.project_admin | to_nice_yaml(indent=2, width=140) | indent(8, True) }}
AddDefaultUsersToProjectAction: AddDefaultUsersToProjectAction:
default_users: default_users:
{{ adjutant_default_users_to_project_action | to_nice_yaml(indent=2, width=140) | indent(2, True) }} {{ adjutant_default_users_to_project_action | to_nice_yaml(indent=2, width=140) | indent(8, True) }}
default_roles: default_roles:
{{ adjutant_default_roles_to_project_action | to_nice_yaml(indent=2, width=140) | indent(2, True) }} {{ adjutant_default_roles_to_project_action | to_nice_yaml(indent=2, width=140) | indent(8, True) }}
NewDefaultNetworkAction: NewDefaultNetworkAction:
region_defaults: region_defaults:
network_name: default_network network_name: default_network
@ -259,8 +259,8 @@ workflow:
quota: quota:
sizes: sizes:
{{ adjutant_quota_sizes | to_nice_yaml(indent=2, width=140) | indent(2, True) }} {{ adjutant_quota_sizes | to_nice_yaml(indent=2, width=140) | indent(4, True) }}
sizes_ascending: sizes_ascending:
{{ adjutant_quota_sizes_asc | to_nice_yaml(indent=2, width=140) | indent(2, True) }} {{ adjutant_quota_sizes_asc | to_nice_yaml(indent=2, width=140) | indent(4, True) }}
services: services:
{{ adjutant_quota_services | to_nice_yaml(indent=2, width=140) | indent(2, True) }} {{ adjutant_quota_services | to_nice_yaml(indent=2, width=140) | indent(4, True) }}

View File

@ -14,19 +14,19 @@
""" """
WSGI config for Adjutant. WSGI config for Adjutant.
It exposes the WSGI callable as a module-level variable named ``application``. It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see For more information on this file, see
https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/
""" """
import os import os
from django.core.wsgi import get_wsgi_application from django.core.wsgi import get_wsgi_application
from django.conf import settings
from urllib.parse import urlparse
from keystonemiddleware.auth_token import AuthProtocol from keystonemiddleware.auth_token import AuthProtocol
from adjutant.config import CONF
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "adjutant.settings") os.environ.setdefault("DJANGO_SETTINGS_MODULE", "adjutant.settings")
@ -34,16 +34,16 @@ application = get_wsgi_application()
# Here we replace the default application with one wrapped by # Here we replace the default application with one wrapped by
# the Keystone Auth Middleware. # the Keystone Auth Middleware.
identity_url = urlparse(settings.KEYSTONE['auth_url'])
conf = { conf = {
"auth_plugin": "password", "auth_plugin": "password",
'username': settings.KEYSTONE['username'], "username": CONF.identity.auth.username,
'password': settings.KEYSTONE['password'], "password": CONF.identity.auth.password,
'project_name': settings.KEYSTONE['project_name'], "project_name": CONF.identity.auth.project_name,
"project_domain_id": settings.KEYSTONE.get('domain_id', "default"), "project_domain_id": CONF.identity.auth.project_domain_id,
"user_domain_id": settings.KEYSTONE.get('domain_id', "default"), "user_domain_id": CONF.identity.auth.user_domain_id,
"auth_url": settings.KEYSTONE['auth_url'], "auth_url": CONF.identity.auth.auth_url,
'delay_auth_decision': True, "delay_auth_decision": True,
'include_service_catalog': False, "include_service_catalog": False,
"token_cache_time": CONF.identity.token_cache_time,
} }
application = AuthProtocol(application, conf) application = AuthProtocol(application, conf)