From 5bae09a23e2b225cf15f6a3bf501f0ca699505d5 Mon Sep 17 00:00:00 2001 From: Ethan Lynn Date: Wed, 19 Sep 2018 14:31:16 +0800 Subject: Fix vio CSIT test Reorg url regex Change-Id: I7e84dc2bbc7f6a29890da6de8c603689043b3fbc Issue-ID: MULTICLOUD-360 Signed-off-by: Ethan Lynn --- vio/vio/swagger/urls.py | 181 ++++++++++++++++++++++++------------------------ 1 file changed, 91 insertions(+), 90 deletions(-) (limited to 'vio') diff --git a/vio/vio/swagger/urls.py b/vio/vio/swagger/urls.py index bae4d15..c509a42 100644 --- a/vio/vio/swagger/urls.py +++ b/vio/vio/swagger/urls.py @@ -125,6 +125,97 @@ urlpatterns = [ # swagger url(r'^api/multicloud-vio/v0/swagger.json$', SwaggerJsonView.as_view()), + + # fake urls + url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/neutron/networks$', + FakeNeutronNetwork.as_view()), + url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/neutron/networks/' + r'(?P[0-9a-z-A-Z]+)$', + FakeNeutronDetail.as_view()), + url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/capacity_check$', + FakeCapacity.as_view()), + url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/identity/v3', + FakeToken.as_view()), + url(r'api/multicloud-vio/v[01]/vmware[_/]fake/identity/v2.0', + FakeTokenV2.as_view()), + url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/identity/projects$', + FakeProjects.as_view()), + url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/identity/projects/' + r'(?P[0-9a-z-A-Z]+)$', + FakeProjects.as_view()), + url(r'api/multicloud-vio/v[01]/vmware[_/]fake/identity/tenants', + FakeTenants.as_view()), + url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/nova/' + r'(?P[0-9a-z-A-Z\-\_]+)' + r'/os-hypervisors/detail$', + FakeNovaHypervisors.as_view()), + url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/nova/' + r'(?P[0-9a-z-A-Z\-\_]+)/os-hypervisors/' + r'(?P[0-9a-z-A-Z]+)$', + FakeNovaHypervisors.as_view()), + url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/nova/' + r'(?P[0-9a-z-A-Z\-\_]+)/os-hypervisors/' + r'(?P[0-9a-z-A-Z]+)/uptime$', + FakeNovaHypervisorsUptime.as_view()), + url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/nova/' + r'(?P[0-9a-z-A-Z\-\_]+)/os-aggregates$', + FakeNovaAggregate.as_view()), + url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/nova/' + r'(?P[0-9a-z-A-Z\-\_]+)/servers$', + FakeNovaServer.as_view()), + url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/nova/' + r'(?P[0-9a-z-A-Z\-\_]+)/servers/detail$', + FakeNovaServerDetail.as_view()), + url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/nova/' + r'(?P[0-9a-z-A-Z\-\_]+)/servers/' + r'(?P[0-9a-z-A-Z]+)$', + FakeNovaServer.as_view()), + url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/nova/' + r'(?P[0-9a-z-A-Z\-\_]+)/servers/' + r'(?P[0-9a-z-A-Z]+)/action$', + FakeNovaServer.as_view()), + url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/nova/' + r'(?P[0-9a-z-A-Z\-\_]+)/flavors$', + FakeFlavorList.as_view()), + url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/nova/' + r'(?P[0-9a-z-A-Z\-\_]+)/flavors/' + r'(?P[0-9a-z-A-Z]+)$', + FakeFlavorDetail.as_view()), + url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/glance/v2/schemas/image$', + FakeImageSchema.as_view()), + url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/glance/v2/images/' + r'(?P[0-9a-z-A-Z\-\_]+)$', + FakeImageDetail.as_view()), + url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/glance/v2/images', + FakeImage.as_view()), + url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/glance/v2/image/file/' + r'(?P[0-9a-z-A-Z\-\_]+)$', + FakeImageDownload.as_view()), + url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/glance/v2/image/file$', + FakeImageUpload.as_view()), + url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/glance/version', + FakeImageVersion.as_view()), + url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/neutron$', + FakeNeutron.as_view()), + url(r'api/multicloud-vio/v[01]/vmware[_/]fake/heat/' + r'(?P[0-9a-z-A-Z\-\_]+)' + r'/stacks/(?P[0-9a-z-A-Z\-\_]+)/resources$', + FakeHeatResources.as_view()), + url(r'api/multicloud-vio/v[01]/vmware[_/]fake/heat/' + r'(?P[0-9a-z-A-Z\-\_]+)' + r'/stacks$', FakeHeatService.as_view()), + url(r'api/multicloud-vio/v[01]/vmware[_/]fake/heat/' + r'(?P[0-9a-z-A-Z\-\_]+)' + r'/stacks/preview$', FakeHeatServicePreview.as_view()), + url(r'api/multicloud-vio/v[01]/vmware[_/]fake/heat/' + r'(?P[0-9a-z-A-Z\-\_]+)' + r'/stacks/(?P[0-9a-z-A-Z\-\_]+)', + FakeHeatService.as_view()), + url(r'api/multicloud-vio/v[01]/vmware[_/]fake/heat/' + r'(?P[0-9a-z-A-Z\-\_]+)' + r'/stacks/(?P[0-9a-z-A-Z\-\_]+)' + r'/(?P[0-9a-z-A-Z\-\_]+)$', FakeHeatService.as_view()), + # vio url(r'^api/multicloud-vio/v0/(?P[0-9a-zA-Z_-]+)/' r'tenants$', ListTenantsView.as_view()), @@ -285,96 +376,6 @@ urlpatterns = [ r'(?P[0-9a-zA-Z\-\_]+)$', GetDelStackViewV1.as_view()), - # fake urls - url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/neutron/networks$', - FakeNeutronNetwork.as_view()), - url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/neutron/networks/' - r'(?P[0-9a-z-A-Z]+)$', - FakeNeutronDetail.as_view()), - url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/capacity_check$', - FakeCapacity.as_view()), - url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/identity/v3', - FakeToken.as_view()), - url(r'api/multicloud-vio/v[01]/vmware[_/]fake/identity/v2.0', - FakeTokenV2.as_view()), - url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/identity/projects$', - FakeProjects.as_view()), - url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/identity/projects/' - r'(?P[0-9a-z-A-Z]+)$', - FakeProjects.as_view()), - url(r'api/multicloud-vio/v[01]/vmware[_/]fake/identity/tenants', - FakeTenants.as_view()), - url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/nova/' - r'(?P[0-9a-z-A-Z\-\_]+)' - r'/os-hypervisors/detail$', - FakeNovaHypervisors.as_view()), - url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/nova/' - r'(?P[0-9a-z-A-Z\-\_]+)/os-hypervisors/' - r'(?P[0-9a-z-A-Z]+)$', - FakeNovaHypervisors.as_view()), - url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/nova/' - r'(?P[0-9a-z-A-Z\-\_]+)/os-hypervisors/' - r'(?P[0-9a-z-A-Z]+)/uptime$', - FakeNovaHypervisorsUptime.as_view()), - url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/nova/' - r'(?P[0-9a-z-A-Z\-\_]+)/os-aggregates$', - FakeNovaAggregate.as_view()), - url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/nova/' - r'(?P[0-9a-z-A-Z\-\_]+)/servers$', - FakeNovaServer.as_view()), - url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/nova/' - r'(?P[0-9a-z-A-Z\-\_]+)/servers/detail$', - FakeNovaServerDetail.as_view()), - url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/nova/' - r'(?P[0-9a-z-A-Z\-\_]+)/servers/' - r'(?P[0-9a-z-A-Z]+)$', - FakeNovaServer.as_view()), - url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/nova/' - r'(?P[0-9a-z-A-Z\-\_]+)/servers/' - r'(?P[0-9a-z-A-Z]+)/action$', - FakeNovaServer.as_view()), - url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/nova/' - r'(?P[0-9a-z-A-Z\-\_]+)/flavors$', - FakeFlavorList.as_view()), - url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/nova/' - r'(?P[0-9a-z-A-Z\-\_]+)/flavors/' - r'(?P[0-9a-z-A-Z]+)$', - FakeFlavorDetail.as_view()), - url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/glance/v2/schemas/image$', - FakeImageSchema.as_view()), - url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/glance/v2/images/' - r'(?P[0-9a-z-A-Z\-\_]+)$', - FakeImageDetail.as_view()), - url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/glance/v2/images', - FakeImage.as_view()), - url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/glance/v2/image/file/' - r'(?P[0-9a-z-A-Z\-\_]+)$', - FakeImageDownload.as_view()), - url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/glance/v2/image/file$', - FakeImageUpload.as_view()), - url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/glance/version', - FakeImageVersion.as_view()), - url(r'^api/multicloud-vio/v[01]/vmware[_/]fake/neutron$', - FakeNeutron.as_view()), - url(r'api/multicloud-vio/v[01]/vmware[_/]fake/heat/' - r'(?P[0-9a-z-A-Z\-\_]+)' - r'/stacks/(?P[0-9a-z-A-Z\-\_]+)/resources$', - FakeHeatResources.as_view()), - url(r'api/multicloud-vio/v[01]/vmware[_/]fake/heat/' - r'(?P[0-9a-z-A-Z\-\_]+)' - r'/stacks$', FakeHeatService.as_view()), - url(r'api/multicloud-vio/v[01]/vmware[_/]fake/heat/' - r'(?P[0-9a-z-A-Z\-\_]+)' - r'/stacks/preview$', FakeHeatServicePreview.as_view()), - url(r'api/multicloud-vio/v[01]/vmware[_/]fake/heat/' - r'(?P[0-9a-z-A-Z\-\_]+)' - r'/stacks/(?P[0-9a-z-A-Z\-\_]+)', - FakeHeatService.as_view()), - url(r'api/multicloud-vio/v[01]/vmware[_/]fake/heat/' - r'(?P[0-9a-z-A-Z\-\_]+)' - r'/stacks/(?P[0-9a-z-A-Z\-\_]+)' - r'/(?P[0-9a-z-A-Z\-\_]+)$', FakeHeatService.as_view()), - # Registry url(r'^api/multicloud-vio/v0/(?P[0-9a-z-A-Z\-\_]+)/registry$', Registry.as_view()), -- cgit 1.2.3-korg