From 6f2be60f795d0641534f65f3bc9fb0511247b833 Mon Sep 17 00:00:00 2001 From: Ethan Lynn Date: Thu, 29 Mar 2018 01:47:42 -0700 Subject: Add capacity_check for fake_cloud Add capacity_check for fake_cloud Change-Id: I949e75d349665f03bd6cb38f64bb29a2ff472cf8 Issue-ID: MULTICLOUD-167 Signed-off-by: Ethan Lynn --- vio/vio/swagger/urls.py | 4 ++++ vio/vio/swagger/views/fakeplugin/nova/views.py | 10 ++++++++++ 2 files changed, 14 insertions(+) (limited to 'vio') diff --git a/vio/vio/swagger/urls.py b/vio/vio/swagger/urls.py index e0195fc..c68c297 100644 --- a/vio/vio/swagger/urls.py +++ b/vio/vio/swagger/urls.py @@ -67,6 +67,7 @@ from vio.swagger.views.fakeplugin.image.views import FakeImageDetail from vio.swagger.views.fakeplugin.image.views import FakeImageSchema from vio.swagger.views.fakeplugin.image.views import FakeImageDownload from vio.swagger.views.fakeplugin.image.views import FakeImageUpload +from vio.swagger.views.fakeplugin.nova.views import FakeCapacity from vio.swagger.views.fakeplugin.nova.views import FakeNovaServer from vio.swagger.views.fakeplugin.nova.views import FakeNovaHypervisors from vio.swagger.views.fakeplugin.nova.views import FakeNovaAggregate @@ -93,6 +94,9 @@ urlpatterns = [ r'(?P[0-9a-z-A-Z]+)$', FakeNeutronDetail.as_view()), + url(r'^api/multicloud-vio/v0/vmware_fake/capacity_check$', + FakeCapacity.as_view()), + # vio url(r'^api/multicloud-vio/v0/(?P[0-9a-zA-Z_-]+)/' r'tenants$', ListTenantsView.as_view()), diff --git a/vio/vio/swagger/views/fakeplugin/nova/views.py b/vio/vio/swagger/views/fakeplugin/nova/views.py index 279b95c..ae1f771 100644 --- a/vio/vio/swagger/views/fakeplugin/nova/views.py +++ b/vio/vio/swagger/views/fakeplugin/nova/views.py @@ -140,3 +140,13 @@ class FakeFlavorList(APIView): data = list_flavors() return Response(data=data, status=status.HTTP_200_OK) + + +class FakeCapacity(APIView): + + def post(self, request): + + data = { + "result": True + } + return Response(data=data, status=status.HTTP_200_OK) -- cgit 1.2.3-korg