diff options
author | Bin Yang <bin.yang@windriver.com> | 2018-09-03 08:46:12 +0000 |
---|---|---|
committer | Bin Yang <bin.yang@windriver.com> | 2018-09-03 08:46:12 +0000 |
commit | 0ac4f904fae7793a3909f6db34ad9b3c35a08c12 (patch) | |
tree | ac9239304a11abd8429f4f6e36ef407b51d012f5 /windriver/titanium_cloud/urls.py | |
parent | 1a4ae5657da11a59bd5cbde5240450f5db69e379 (diff) |
Add new namespace to workaround ISTIO hostname
ISTIO restrains the usage of _ in hostname
Issue-ID: MULTICLOUD-335
Change-Id: I54c712aea1a95c6aaac7d50c3b07472730608503
Signed-off-by: Bin Yang <bin.yang@windriver.com>
Diffstat (limited to 'windriver/titanium_cloud/urls.py')
-rw-r--r-- | windriver/titanium_cloud/urls.py | 51 |
1 files changed, 43 insertions, 8 deletions
diff --git a/windriver/titanium_cloud/urls.py b/windriver/titanium_cloud/urls.py index 3be252a6..da5f66a7 100644 --- a/windriver/titanium_cloud/urls.py +++ b/windriver/titanium_cloud/urls.py @@ -17,13 +17,14 @@ from django.conf.urls import include, url from titanium_cloud.registration.views import registration from newton_base.openoapi import tenants from titanium_cloud.resource.views import capacity -from titanium_cloud.resource.views import events from titanium_cloud.vesagent import vesagent_ctrl from titanium_cloud.resource.views import infra_workload urlpatterns = [ url(r'^', include('titanium_cloud.swagger.urls')), url(r'^', include('titanium_cloud.samples.urls')), + + # API v0, depreciated due to MULTICLOUD-335 url(r'^api/multicloud-titanium_cloud/v0/(?P<vimid>[0-9a-zA-Z_-]+)/registry/?$', registration.Registry.as_view()), url(r'^api/multicloud-titanium_cloud/v0/(?P<vimid>[0-9a-zA-Z_-]+)/?$', @@ -39,13 +40,10 @@ urlpatterns = [ # CapacityCheck url(r'^api/multicloud-titanium_cloud/v0/(?P<vimid>[0-9a-zA-Z_-]+)/capacity_check/?$', capacity.CapacityCheck.as_view()), - # events - url(r'^api/multicloud-titanium_cloud/v0/(?P<vimid>[0-9a-zA-Z_-]+)/events_check/?$', - events.EventsCheck.as_view()), url(r'^api/multicloud-titanium_cloud/v0/(?P<vimid>[0-9a-zA-Z_-]+)/vesagent/?$', vesagent_ctrl.VesAgentCtrl.as_view()), -#API upgrading + # API v1, depreciated due to MULTICLOUD-335 url(r'^api/multicloud-titanium_cloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)/(?P<cloud_region_id>[0-9a-zA-Z_-]+)/registry/?$', registration.APIv1Registry.as_view()), url(r'^api/multicloud-titanium_cloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)/(?P<cloud_region_id>[0-9a-zA-Z_-]+)/?$', @@ -61,13 +59,50 @@ urlpatterns = [ # CapacityCheck url(r'^api/multicloud-titanium_cloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)/(?P<cloud_region_id>[0-9a-zA-Z_-]+)/capacity_check/?$', capacity.APIv1CapacityCheck.as_view()), - # events -# url(r'^api/multicloud-titanium_cloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)/(?P<cloud_region_id>[0-9a-zA-Z_-]+)/events_check/?$', -# events.EventsCheck.as_view()), url(r'^api/multicloud-titanium_cloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)/(?P<cloud_region_id>[0-9a-zA-Z_-]+)/vesagent/?$', vesagent_ctrl.APIv1VesAgentCtrl.as_view()), url(r'^api/multicloud-titanium_cloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)/(?P<cloud_region_id>[0-9a-zA-Z_-]+)/infra_workload/?$', infra_workload.APIv1InfraWorkload.as_view()), + + # API v0, new namespace due to MULTICLOUD-335 + url(r'^api/multicloud-titaniumcloud/v0/(?P<vimid>[0-9a-zA-Z_-]+)/registry/?$', + registration.Registry.as_view()), + url(r'^api/multicloud-titaniumcloud/v0/(?P<vimid>[0-9a-zA-Z_-]+)/?$', + registration.Registry.as_view()), + url(r'^api/multicloud-titaniumcloud/v0/(?P<vimid>[0-9a-zA-Z_-]+)/exten', + include('titanium_cloud.extensions.urls')), + url(r'^api/multicloud-titaniumcloud/v0/(?P<vimid>[0-9a-zA-Z_-]+)/', + include('titanium_cloud.proxy.urls')), + url(r'^api/multicloud-titaniumcloud/v0/(?P<vimid>[0-9a-zA-Z_-]+)/tenants/?$', + tenants.Tenants.as_view()), + url(r'^api/multicloud-titaniumcloud/v0/(?P<vimid>[0-9a-zA-Z_-]+)/' + '(?P<tenantid>[0-9a-zA-Z_-]{20,})/', include('titanium_cloud.requests.urls')), + # CapacityCheck + url(r'^api/multicloud-titaniumcloud/v0/(?P<vimid>[0-9a-zA-Z_-]+)/capacity_check/?$', + capacity.CapacityCheck.as_view()), + url(r'^api/multicloud-titaniumcloud/v0/(?P<vimid>[0-9a-zA-Z_-]+)/vesagent/?$', + vesagent_ctrl.VesAgentCtrl.as_view()), + + # API v1, new namespace due to MULTICLOUD-335 + url(r'^api/multicloud-titaniumcloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)/(?P<cloud_region_id>[0-9a-zA-Z_-]+)/registry/?$', + registration.APIv1Registry.as_view()), + url(r'^api/multicloud-titaniumcloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)/(?P<cloud_region_id>[0-9a-zA-Z_-]+)/?$', + registration.APIv1Registry.as_view()), + url(r'^api/multicloud-titaniumcloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)/(?P<cloud_region_id>[0-9a-zA-Z_-]+)/exten', + include('titanium_cloud.extensions.urlsV1')), + url(r'^api/multicloud-titaniumcloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)/(?P<cloud_region_id>[0-9a-zA-Z_-]+)/', + include('titanium_cloud.proxy.urlsV1')), + url(r'^api/multicloud-titaniumcloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)/(?P<cloud_region_id>[0-9a-zA-Z_-]+)/tenants/?$', + tenants.APIv1Tenants.as_view()), + url(r'^api/multicloud-titaniumcloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)/(?P<cloud_region_id>[0-9a-zA-Z_-]+)/' + '(?P<tenantid>[0-9a-zA-Z_-]{20,})/', include('titanium_cloud.requests.urlsV1')), + # CapacityCheck + url(r'^api/multicloud-titaniumcloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)/(?P<cloud_region_id>[0-9a-zA-Z_-]+)/capacity_check/?$', + capacity.APIv1CapacityCheck.as_view()), + url(r'^api/multicloud-titaniumcloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)/(?P<cloud_region_id>[0-9a-zA-Z_-]+)/vesagent/?$', + vesagent_ctrl.APIv1VesAgentCtrl.as_view()), + url(r'^api/multicloud-titaniumcloud/v1/(?P<cloud_owner>[0-9a-zA-Z_-]+)/(?P<cloud_region_id>[0-9a-zA-Z_-]+)/infra_workload/?$', + infra_workload.APIv1InfraWorkload.as_view()), ] |