diff options
author | Fu Jinhua <fu.jinhua@zte.com.cn> | 2019-07-11 00:26:10 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-07-11 00:26:10 +0000 |
commit | 0e1fd96cd9ad2b1697a3a47bf534eca329fb9a93 (patch) | |
tree | 8283612abf9c4ff0cd32277e81448415e0e7f946 | |
parent | b0a05961ea9bc959a675615d19c0f234b161c679 (diff) | |
parent | a151abfd0b63e75612ad4d5ad486c6aeed07f1db (diff) |
Merge "Add inst ns result"
-rw-r--r-- | lcm/ns/tests/test_sol_ns_instantiate_api.py | 2 | ||||
-rw-r--r-- | lcm/ns/views/sol/instantiate_ns_views.py | 2 |
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) |