aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhewei-cmss <hewei@cmss.chinamobile.com>2019-07-10 19:42:23 +0800
committerhewei-cmss <hewei@cmss.chinamobile.com>2019-07-10 20:01:36 +0800
commita151abfd0b63e75612ad4d5ad486c6aeed07f1db (patch)
tree177993c40a099191df0c26fdb704050de9abbcc1
parentac64bf8b7cad1b00f693ed8e3c3e04e2272d01b5 (diff)
Add inst ns result
Issue-ID: VFC-1444 Signed-off-by: hewei-cmss <hewei@cmss.chinamobile.com> Change-Id: I380d65e5a768785b76dea318149759287826f63f
-rw-r--r--lcm/ns/tests/test_sol_ns_instantiate_api.py2
-rw-r--r--lcm/ns/views/sol/instantiate_ns_views.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/lcm/ns/tests/test_sol_ns_instantiate_api.py b/lcm/ns/tests/test_sol_ns_instantiate_api.py
index c094a4f9..f13b7c41 100644
--- a/lcm/ns/tests/test_sol_ns_instantiate_api.py
+++ b/lcm/ns/tests/test_sol_ns_instantiate_api.py
@@ -64,7 +64,7 @@ class TestInstantiateNsApi(TestCase):
@mock.patch.object(InstantNSService, 'do_biz')
def test_ns_instantiate_normal(self, mock_do_biz):
- mock_do_biz.return_value = {'occ_id': "1"}
+ mock_do_biz.return_value = {'occ_id': "1", 'data': {}}
response = self.client.post(self.url % self.nsInstanceId, data=self.req_data, format='json')
self.assertEqual(status.HTTP_202_ACCEPTED, response.status_code)
diff --git a/lcm/ns/views/sol/instantiate_ns_views.py b/lcm/ns/views/sol/instantiate_ns_views.py
index ae8c51d4..08066be1 100644
--- a/lcm/ns/views/sol/instantiate_ns_views.py
+++ b/lcm/ns/views/sol/instantiate_ns_views.py
@@ -60,7 +60,7 @@ class InstantiateNsView(APIView):
nsLcmOpOccId = ack.get('occ_id')
if not nsLcmOpOccId:
return Response(data=ack['data'], status=ack['status'])
- response = Response(data={}, status=status.HTTP_202_ACCEPTED)
+ response = Response(data=ack['data'], status=status.HTTP_202_ACCEPTED)
logger.debug("Location: %s" % ack['occ_id'])
response["Location"] = NS_OCC_BASE_URI % nsLcmOpOccId
logger.debug("Leave InstantiateNsView::post::ack=%s", ack)