diff options
author | Bin Yang <bin.yang@windriver.com> | 2017-09-21 17:09:03 +0800 |
---|---|---|
committer | Bin Yang <bin.yang@windriver.com> | 2017-09-21 17:09:03 +0800 |
commit | 2de8e160c31f3ecf951fb4e85a96aa1e814b0a33 (patch) | |
tree | 61cdb3cb53ceb5372e832d6c3951115fa669ebb5 /newton | |
parent | cecc352b211aa4d93751067b063bf9ea90021ca5 (diff) |
Fix url pattern error
Change-Id: Ic7aa3c1791482be38ee9debcedb52bbf57add96e
Issue-Id: MULTICLOUD-89
Signed-off-by: Bin Yang <bin.yang@windriver.com>
Diffstat (limited to 'newton')
-rw-r--r-- | newton/newton/proxy/urls.py | 2 | ||||
-rw-r--r-- | newton/newton/requests/views/util.py | 2 | ||||
-rw-r--r-- | newton/newton/urls.py | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/newton/newton/proxy/urls.py b/newton/newton/proxy/urls.py index ae63c052..f9584635 100644 --- a/newton/newton/proxy/urls.py +++ b/newton/newton/proxy/urls.py @@ -25,7 +25,7 @@ urlpatterns = [ identityV3.Tokens.as_view()), url(r'^identity/(?:v2.0/|)tenants$', services.GetTenants.as_view()), - url(r'^(?P<servicetype>[0-9a-zA-Z_-]+)/(?P<requri>[0-9a-zA-Z./_-]*)$', + url(r'^(?P<servicetype>[0-9a-zA-Z_-]{,18})/(?P<requri>[0-9a-zA-Z./_-]*)$', services.Services.as_view()), ] diff --git a/newton/newton/requests/views/util.py b/newton/newton/requests/views/util.py index f2c62896..a65ec3ee 100644 --- a/newton/newton/requests/views/util.py +++ b/newton/newton/requests/views/util.py @@ -70,11 +70,13 @@ class VimDriverUtils(object): auth = keystone_v3.Password(auth_url=vim["url"], username=vim["userName"], password=vim["password"], + user_domain_name=vim["domain"], project_id=tenantid) elif '/identity' in vim["url"]: auth = keystone_v3.Password(auth_url=vim["url"]+"/v3", username=vim["userName"], password=vim["password"], + user_domain_name=vim["domain"], project_id=tenantid) elif tenant_name: if '/v2' in vim["url"]: diff --git a/newton/newton/urls.py b/newton/newton/urls.py index 3c740a06..77ec5ab0 100644 --- a/newton/newton/urls.py +++ b/newton/newton/urls.py @@ -28,7 +28,7 @@ urlpatterns = [ url(r'^api/multicloud-newton/v0/(?P<vimid>[0-9a-zA-Z_-]+)/tenants$', tenants.Tenants.as_view()), url(r'^api/multicloud-newton/v0/(?P<vimid>[0-9a-zA-Z_-]+)/' - '(?P<tenantid>[0-9a-zA-Z_-]{8,})/', include('newton.requests.urls')), + '(?P<tenantid>[0-9a-zA-Z_-]{20,})/', include('newton.requests.urls')), ] |