From 2024bb59b1d4ec20300304aed3a69132b9c082bc Mon Sep 17 00:00:00 2001 From: Xiaohua Zhang Date: Wed, 10 Apr 2019 08:51:19 +0000 Subject: Fix bug of AZ cap check Fix bugs in restcall module update the status code of workload api Remove unused event api from lenovo Change-Id: Iaa16bc3aca42c4583408384c73802ff4debe1b19 Issue-ID: MULTICLOUD-542 Signed-off-by: Xiaohua Zhang --- starlingx/starlingx/resource/tests/test_capacity.py | 14 +++++++------- starlingx/starlingx/urls.py | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'starlingx') diff --git a/starlingx/starlingx/resource/tests/test_capacity.py b/starlingx/starlingx/resource/tests/test_capacity.py index c48f0eff..ee30985f 100644 --- a/starlingx/starlingx/resource/tests/test_capacity.py +++ b/starlingx/starlingx/resource/tests/test_capacity.py @@ -143,7 +143,7 @@ class TestCapacity(test_base.TestRequest): HTTP_X_AUTH_TOKEN=mock_info.MOCK_TOKEN_ID) self.assertEquals(status.HTTP_200_OK, response.status_code) - self.assertEqual({"result": True}, response.data) + self.assertEqual({'AZs': [], "result": True}, response.data) @mock.patch.object(VimDriverUtils, 'get_session') @mock.patch.object(VimDriverUtils, 'get_vim_info') @@ -164,7 +164,7 @@ class TestCapacity(test_base.TestRequest): HTTP_X_AUTH_TOKEN=mock_info.MOCK_TOKEN_ID) self.assertEquals(status.HTTP_200_OK, response.status_code) - self.assertEqual({"result": False}, response.data) + self.assertEqual({'AZs': [], "result": False}, response.data) @mock.patch.object(VimDriverUtils, 'get_session') @mock.patch.object(VimDriverUtils, 'get_vim_info') @@ -186,7 +186,7 @@ class TestCapacity(test_base.TestRequest): HTTP_X_AUTH_TOKEN=mock_info.MOCK_TOKEN_ID) self.assertEquals(status.HTTP_200_OK, response.status_code) - self.assertEqual({"result": False}, response.data) + self.assertEqual({'AZs': [], "result": False}, response.data) @mock.patch.object(VimDriverUtils, 'get_session') @mock.patch.object(VimDriverUtils, 'get_vim_info') @@ -208,7 +208,7 @@ class TestCapacity(test_base.TestRequest): HTTP_X_AUTH_TOKEN=mock_info.MOCK_TOKEN_ID) self.assertEquals(status.HTTP_200_OK, response.status_code) - self.assertEqual({"result": False}, response.data) + self.assertEqual({'AZs': [], "result": False}, response.data) @mock.patch.object(VimDriverUtils, 'get_session') @mock.patch.object(VimDriverUtils, 'get_vim_info') @@ -230,7 +230,7 @@ class TestCapacity(test_base.TestRequest): HTTP_X_AUTH_TOKEN=mock_info.MOCK_TOKEN_ID) self.assertEquals(status.HTTP_200_OK, response.status_code) - self.assertEqual({"result": False}, response.data) + self.assertEqual({'AZs': [], "result": False}, response.data) @mock.patch.object(VimDriverUtils, 'get_session') @mock.patch.object(VimDriverUtils, 'get_vim_info') @@ -252,7 +252,7 @@ class TestCapacity(test_base.TestRequest): HTTP_X_AUTH_TOKEN=mock_info.MOCK_TOKEN_ID) self.assertEquals(status.HTTP_200_OK, response.status_code) - self.assertEqual({"result": False}, response.data) + self.assertEqual({'AZs': [], "result": False}, response.data) @mock.patch.object(VimDriverUtils, 'get_session') @mock.patch.object(VimDriverUtils, 'get_vim_info') @@ -274,4 +274,4 @@ class TestCapacity(test_base.TestRequest): HTTP_X_AUTH_TOKEN=mock_info.MOCK_TOKEN_ID) self.assertEquals(status.HTTP_200_OK, response.status_code) - self.assertEqual({"result": False}, response.data) + self.assertEqual({'AZs': [], "result": False}, response.data) diff --git a/starlingx/starlingx/urls.py b/starlingx/starlingx/urls.py index ca9ef240..f340b7fd 100644 --- a/starlingx/starlingx/urls.py +++ b/starlingx/starlingx/urls.py @@ -15,7 +15,7 @@ from django.conf.urls import include, url from starlingx_base.registration import registration from newton_base.openoapi import tenants -from newton_base.resource import capacity +from starlingx_base.resource import capacity from starlingx_base.resource import infra_workload urlpatterns = [ -- cgit 1.2.3-korg