diff options
author | Bin Yang <bin.yang@windriver.com> | 2017-03-01 16:36:05 +0800 |
---|---|---|
committer | Bin Yang <bin.yang@windriver.com> | 2017-03-01 16:36:05 +0800 |
commit | b16354feba617e67e7bb9488214d87f3096fca37 (patch) | |
tree | 362e638e1a1a5a385f536feed5746a6ea39acf75 /newton/newton/urls.py | |
parent | d33303311ab0eee7b64ed0ca4535ca21c2465ff2 (diff) |
Implement tenants API for newton
Change-Id: Ic2060927803b0d34dbf54c95430ab558bc4f076d
Issue-Id: MULTIVIM-19
Signed-off-by: Bin Yang <bin.yang@windriver.com>
Diffstat (limited to 'newton/newton/urls.py')
-rw-r--r-- | newton/newton/urls.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/newton/newton/urls.py b/newton/newton/urls.py index ad2979ff..e831feb6 100644 --- a/newton/newton/urls.py +++ b/newton/newton/urls.py @@ -13,13 +13,18 @@ from django.conf.urls import include, url from newton.pub.config.config \ import REG_TO_MSB_WHEN_START, REG_TO_MSB_REG_URL, REG_TO_MSB_REG_PARAM +from newton.requests.views import tenants + urlpatterns = [ url(r'^', include('newton.swagger.urls')), url(r'^', include('newton.samples.urls')), + url(r'^openoapi/multivim-newton/v1/(?P<vimid>[0-9a-zA-Z_-]+)/tenants$', + tenants.Tenants.as_view()), url(r'^openoapi/multivim-newton/v1/(?P<vimid>[0-9a-zA-Z_-]+)/' - '(?P<tenantid>[0-9a-zA-Z_-]+)/', include('newton.requests.urls')), + '(?P<tenantid>[0-9a-zA-Z_-]{8,})/', include('newton.requests.urls')), ] + # regist to MSB when startup if REG_TO_MSB_WHEN_START: import json |