summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBin Yang <bin.yang@windriver.com>2017-09-21 17:09:03 +0800
committerBin Yang <bin.yang@windriver.com>2017-09-21 17:09:03 +0800
commit2de8e160c31f3ecf951fb4e85a96aa1e814b0a33 (patch)
tree61cdb3cb53ceb5372e832d6c3951115fa669ebb5
parentcecc352b211aa4d93751067b063bf9ea90021ca5 (diff)
Fix url pattern error
Change-Id: Ic7aa3c1791482be38ee9debcedb52bbf57add96e Issue-Id: MULTICLOUD-89 Signed-off-by: Bin Yang <bin.yang@windriver.com>
-rw-r--r--newton/newton/proxy/urls.py2
-rw-r--r--newton/newton/requests/views/util.py2
-rw-r--r--newton/newton/urls.py2
-rw-r--r--ocata/ocata/proxy/urls.py2
-rw-r--r--ocata/ocata/swagger/views.py2
-rw-r--r--ocata/ocata/urls.py2
-rw-r--r--windriver/titanium_cloud/proxy/urls.py2
-rw-r--r--windriver/titanium_cloud/swagger/views.py2
-rw-r--r--windriver/titanium_cloud/urls.py2
9 files changed, 10 insertions, 8 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')),
]
diff --git a/ocata/ocata/proxy/urls.py b/ocata/ocata/proxy/urls.py
index e32702f5..6f41d080 100644
--- a/ocata/ocata/proxy/urls.py
+++ b/ocata/ocata/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/ocata/ocata/swagger/views.py b/ocata/ocata/swagger/views.py
index e2f97e73..fbcac6e5 100644
--- a/ocata/ocata/swagger/views.py
+++ b/ocata/ocata/swagger/views.py
@@ -37,7 +37,7 @@ class SwaggerJsonView(newton_json_view.SwaggerJsonView):
json_data = resp.data if resp else None
if json_data:
json_data["basePath"] = "/api/multicloud-ocata/v0/"
- json_data["info"]["title"] = "Service NBI of MultiCloud plugin for OpenStack Newton"
+ json_data["info"]["title"] = "Service NBI of MultiCloud plugin for OpenStack Ocata"
return Response(data=json_data, status=200)
else:
return Response(data={'error':'internal error'}, status=500)
diff --git a/ocata/ocata/urls.py b/ocata/ocata/urls.py
index cc553ed6..f15790f5 100644
--- a/ocata/ocata/urls.py
+++ b/ocata/ocata/urls.py
@@ -28,7 +28,7 @@ urlpatterns = [
url(r'^api/multicloud-ocata/v0/(?P<vimid>[0-9a-zA-Z_-]+)/tenants$',
tenants.Tenants.as_view()),
url(r'^api/multicloud-ocata/v0/(?P<vimid>[0-9a-zA-Z_-]+)/'
- '(?P<tenantid>[0-9a-zA-Z_-]{8,})/', include('ocata.requests.urls')),
+ '(?P<tenantid>[0-9a-zA-Z_-]{20,})/', include('ocata.requests.urls')),
]
diff --git a/windriver/titanium_cloud/proxy/urls.py b/windriver/titanium_cloud/proxy/urls.py
index f848e76c..dbad26fa 100644
--- a/windriver/titanium_cloud/proxy/urls.py
+++ b/windriver/titanium_cloud/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/windriver/titanium_cloud/swagger/views.py b/windriver/titanium_cloud/swagger/views.py
index 01f9374e..8268fa84 100644
--- a/windriver/titanium_cloud/swagger/views.py
+++ b/windriver/titanium_cloud/swagger/views.py
@@ -37,7 +37,7 @@ class SwaggerJsonView(newton_json_view.SwaggerJsonView):
json_data = resp.data if resp else None
if json_data:
json_data["basePath"] = "/api/multicloud-titanium_cloud/v0/"
- json_data["info"]["title"] = "Service NBI of MultiCloud plugin for OpenStack Newton"
+ json_data["info"]["title"] = "Service NBI of MultiCloud plugin for Titanium Cloud"
return Response(data=json_data, status=200)
else:
return Response(data={'error':'internal error'}, status=500)
diff --git a/windriver/titanium_cloud/urls.py b/windriver/titanium_cloud/urls.py
index 664d8b3e..adff5524 100644
--- a/windriver/titanium_cloud/urls.py
+++ b/windriver/titanium_cloud/urls.py
@@ -28,7 +28,7 @@ urlpatterns = [
url(r'^api/multicloud-titanium_cloud/v0/(?P<vimid>[0-9a-zA-Z_-]+)/tenants/?$',
tenants.Tenants.as_view()),
url(r'^api/multicloud-titanium_cloud/v0/(?P<vimid>[0-9a-zA-Z_-]+)/'
- '(?P<tenantid>[0-9a-zA-Z_-]{8,})/', include('titanium_cloud.requests.urls')),
+ '(?P<tenantid>[0-9a-zA-Z_-]{20,})/', include('titanium_cloud.requests.urls')),
]