summaryrefslogtreecommitdiffstats
path: root/windriver
diff options
context:
space:
mode:
authorXiaohua Zhang <xiaohua.zhang@windriver.com>2019-04-10 08:51:19 +0000
committerXiaohua Zhang <xiaohua.zhang@windriver.com>2019-04-10 09:48:26 +0000
commit2024bb59b1d4ec20300304aed3a69132b9c082bc (patch)
tree349a90cd5fc0c64335142c09bd76db86e3d2d7e7 /windriver
parent14132a2c06bc6b6431f5be90cecf303132d94103 (diff)
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 <xiaohua.zhang@windriver.com>
Diffstat (limited to 'windriver')
-rw-r--r--windriver/titanium_cloud/resource/tests/test_capacity.py14
-rw-r--r--windriver/titanium_cloud/urls.py2
2 files changed, 8 insertions, 8 deletions
diff --git a/windriver/titanium_cloud/resource/tests/test_capacity.py b/windriver/titanium_cloud/resource/tests/test_capacity.py
index baca720f..82c453a2 100644
--- a/windriver/titanium_cloud/resource/tests/test_capacity.py
+++ b/windriver/titanium_cloud/resource/tests/test_capacity.py
@@ -144,7 +144,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')
@@ -165,7 +165,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')
@@ -187,7 +187,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')
@@ -209,7 +209,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')
@@ -231,7 +231,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')
@@ -253,7 +253,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')
@@ -275,4 +275,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/windriver/titanium_cloud/urls.py b/windriver/titanium_cloud/urls.py
index 7a9f6455..a0537ddc 100644
--- a/windriver/titanium_cloud/urls.py
+++ b/windriver/titanium_cloud/urls.py
@@ -16,7 +16,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 = [