diff options
author | xinhuili <lxinhui@vmware.com> | 2018-03-29 13:52:30 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-03-29 13:52:30 +0000 |
commit | c0a677738bc2a1fe0364f976525a121a805a9838 (patch) | |
tree | ebf2d3f5dea869b40bfc0a7fbe37967c5a747671 | |
parent | 0f1d8b698315524b7f4607302f66a81470dc7e32 (diff) | |
parent | 6f2be60f795d0641534f65f3bc9fb0511247b833 (diff) |
Merge "Add capacity_check for fake_cloud"
-rw-r--r-- | vio/vio/swagger/urls.py | 4 | ||||
-rw-r--r-- | vio/vio/swagger/views/fakeplugin/nova/views.py | 10 |
2 files changed, 14 insertions, 0 deletions
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<netid>[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<vimid>[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) |