diff options
Diffstat (limited to 'lcm')
-rw-r--r-- | lcm/lcm/nf/tests/test_create_vnf.py | 6 | ||||
-rw-r--r-- | lcm/lcm/nf/views/curd_vnf_views.py | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/lcm/lcm/nf/tests/test_create_vnf.py b/lcm/lcm/nf/tests/test_create_vnf.py index 240ed17f..1272d381 100644 --- a/lcm/lcm/nf/tests/test_create_vnf.py +++ b/lcm/lcm/nf/tests/test_create_vnf.py @@ -106,9 +106,13 @@ class TestNFInstantiate(TestCase): expect_data = { "id": "1", "vnfProvider": "huawei", + 'vnfInstanceDescription': 'vFW in Nanjing TIC Edge', + 'vnfInstanceName': 'vFW_01', "vnfdVersion": "1.0", "vnfPkgId": "111", - "instantiationState": "NOT_INSTANTIATED" + "instantiationState": "NOT_INSTANTIATED", + 'vnfSoftwareVersion': '1.0', + 'vnfdId': '111' } self.assertEqual(status.HTTP_201_CREATED, response.status_code) self.assertEqual(expect_data, response.data) diff --git a/lcm/lcm/nf/views/curd_vnf_views.py b/lcm/lcm/nf/views/curd_vnf_views.py index fa57f2ed..37e46ff3 100644 --- a/lcm/lcm/nf/views/curd_vnf_views.py +++ b/lcm/lcm/nf/views/curd_vnf_views.py @@ -74,10 +74,15 @@ class CreateVnfAndQueryVnfs(APIView): nf_inst = CreateVnf(request.data).do_biz() rsp_data = {"id": nf_inst.nfinstid, + "vnfInstanceName": nf_inst.nf_name, + "vnfdId": nf_inst.vnfdid, "vnfProvider": nf_inst.vendor, + "vnfSoftwareVersion": nf_inst.vnfSoftwareVersion, "vnfdVersion": nf_inst.version, "vnfPkgId": nf_inst.package_id, - "instantiationState": nf_inst.status} + "instantiationState": nf_inst.status, + "vnfInstanceDescription": nf_inst.nf_desc + } create_vnf_resp_serializer = VnfInstanceSerializer(data=rsp_data) if not create_vnf_resp_serializer.is_valid(): raise NFLCMException(create_vnf_resp_serializer.errors) |