Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

vfc_svnfm_huawei container

Create VNF REST API

Code Block
POST /{vnfmtype}/v1/{vnfmid}/vnfs
Example: POST http://10.0.14.1:80/api/huaweivnfmdriver/v1/a0400010-11d7-4875-b4ae-5f42ed5d3a85/vnfs
Body: {"vnfInstanceName": "vnfe9f952fb-a766-4a10-9df8-bda", "extVirtualLink": [], "vnfPackageId": "e9f952fb-a766-4a10-9df8-bdad5895294c", "additionalParam": {"inputs": {"sdncontroller": "IP-WAN-Controller-1"}, "extVirtualLinks": [], "vimId": "pod25_RegionOne"}, "vnfDescriptorId": "e9f952fb-a766-4a10-9df8-bdad5895294c"}

Response: 200
{"vnfInstanceId":"fa3dca847b054f4eb9d3bc8bb9e5eec9","jobId":"fa3dca847b054f4eb9d3bc8bb9e5eec9_post"}

...

Code Block
POST /nslcm/v1/ns/{vnfmid}/vnfs/{vnfInstanceId}/Notify
ExampleExample1: POST http://10.0.14.1:80/api/nslcm/v1/ns/a0400010-11d7-4875-b4ae-5f42ed5d3a85/vnfs/fa3dca847b054f4eb9d3bc8bb9e5eec9/Notify

Response code: 202
Body: {u'status': u'Building', u'vnfInstanceId': u'fa3dca847b054f4eb9d3bc8bb9e5eec9', u'operation': u'Instantiate', u'affectedVnfc': []}

Example2: 
Body:
{"status":"Building","vnfInstanceId":"26ed2b57a6104b92b474dd76182d4d37","operation":"Instantiate","affectedVnfc":[{"vnfcInstanceId":"5376027132be4ba184ad55257a031a60","changeType":"added","vimid":"core-dc_RegionOne","vmid":"5376027132be4ba184ad55257a031a60","vmname":"vnfab40e6ba-df1f-458c-94c5-a45_OMU_1","vduid":"5376027132be4ba184ad55257a031a60"},{"vnfcInstanceId":"a40772541d5d405a85cce0013cf2afbd","changeType":"added","vimid":"core-dc_RegionOne","vmid":"a40772541d5d405a85cce0013cf2afbd","vmname":"vnfab40e6ba-df1f-458c-94c5-a45_OMU_0","vduid":"a40772541d5d405a85cce0013cf2afbd"},{"vnfcInstanceId":"9b5080d645684ba0b16a8eb38d12d136","changeType":"added","vimid":"core-dc_RegionOne","vmid":"9b5080d645684ba0b16a8eb38d12d136","vmname":"vnfab40e6ba-df1f-458c-94c5-a45_SPU_C_0067","vduid":"9b5080d645684ba0b16a8eb38d12d136"},{"vnfcInstanceId":"c91a54f15e654fde97895efe21b1b032","changeType":"added","vimid":"core-dc_RegionOne","vmid":"c91a54f15e654fde97895efe21b1b032","vmname":"vnfab40e6ba-df1f-458c-94c5-a45_SPU_C_0066","vduid":"c91a54f15e654fde97895efe21b1b032"},{"vnfcInstanceId":"c800312379d04243a64d361142fe366d","changeType":"added","vimid":"core-dc_RegionOne","vmid":"c800312379d04243a64d361142fe366d","vmname":"vnfab40e6ba-df1f-458c-94c5-a45_IPU_A_0065","vduid":"c800312379d04243a64d361142fe366d"},{"vnfcInstanceId":"e52ee6658768476084c7a97af26e39cf","changeType":"added","vimid":"core-dc_RegionOne","vmid":"e52ee6658768476084c7a97af26e39cf","vmname":"vnfab40e6ba-df1f-458c-94c5-a45_IPU_A_0064","vduid":"e52ee6658768476084c7a97af26e39cf"},{"vnfcInstanceId":"30adc3ab8698479c9acd9e532c9f0d5a","changeType":"added","vimid":"core-dc_RegionOne","vmid":"30adc3ab8698479c9acd9e532c9f0d5a","vmname":"vnfab40e6ba-df1f-458c-94c5-a45_SDU_A_0068","vduid":"30adc3ab8698479c9acd9e532c9f0d5a"},{"vnfcInstanceId":"5622630bfe3f41a2bac4f69e4baec0a3","changeType":"added","vimid":"core-dc_RegionOne","vmid":"5622630bfe3f41a2bac4f69e4baec0a3","vmname":"vnfab40e6ba-df1f-458c-94c5-a45_SDU_A_0069","vduid":"5622630bfe3f41a2bac4f69e4baec0a3"},{"vnfcInstanceId":"a82f9c5a22e748139bd0569e52048cb9","changeType":"added","vimid":"core-dc_RegionOne","vmid":"a82f9c5a22e748139bd0569e52048cb9","vmname":"vnfab40e6ba-df1f-458c-94c5-a45_SDU_A_0070","vduid":"a82f9c5a22e748139bd0569e52048cb9"}]}

Example3:
{"status":"Active","vnfInstanceId":"26ed2b57a6104b92b474dd76182d4d37","operation":"Instantiate","affectedVnfc":[{"vnfcInstanceId":"5376027132be4ba184ad55257a031a60","changeType":"added","vimid":"core-dc_RegionOne","vmid":"5376027132be4ba184ad55257a031a60","vmname":"vnfab40e6ba-df1f-458c-94c5-a45_OMU_1","vduid":"5376027132be4ba184ad55257a031a60"},{"vnfcInstanceId":"a40772541d5d405a85cce0013cf2afbd","changeType":"added","vimid":"core-dc_RegionOne","vmid":"a40772541d5d405a85cce0013cf2afbd","vmname":"vnfab40e6ba-df1f-458c-94c5-a45_OMU_0","vduid":"a40772541d5d405a85cce0013cf2afbd"},{"vnfcInstanceId":"9b5080d645684ba0b16a8eb38d12d136","changeType":"added","vimid":"core-dc_RegionOne","vmid":"9b5080d645684ba0b16a8eb38d12d136","vmname":"vnfab40e6ba-df1f-458c-94c5-a45_SPU_C_0067","vduid":"9b5080d645684ba0b16a8eb38d12d136"},{"vnfcInstanceId":"c91a54f15e654fde97895efe21b1b032","changeType":"added","vimid":"core-dc_RegionOne","vmid":"c91a54f15e654fde97895efe21b1b032","vmname":"vnfab40e6ba-df1f-458c-94c5-a45_SPU_C_0066","vduid":"c91a54f15e654fde97895efe21b1b032"},{"vnfcInstanceId":"c800312379d04243a64d361142fe366d","changeType":"added","vimid":"core-dc_RegionOne","vmid":"c800312379d04243a64d361142fe366d","vmname":"vnfab40e6ba-df1f-458c-94c5-a45_IPU_A_0065","vduid":"c800312379d04243a64d361142fe366d"},{"vnfcInstanceId":"e52ee6658768476084c7a97af26e39cf","changeType":"added","vimid":"core-dc_RegionOne","vmid":"e52ee6658768476084c7a97af26e39cf","vmname":"vnfab40e6ba-df1f-458c-94c5-a45_IPU_A_0064","vduid":"e52ee6658768476084c7a97af26e39cf"},{"vnfcInstanceId":"30adc3ab8698479c9acd9e532c9f0d5a","changeType":"added","vimid":"core-dc_RegionOne","vmid":"30adc3ab8698479c9acd9e532c9f0d5a","vmname":"vnfab40e6ba-df1f-458c-94c5-a45_SDU_A_0068","vduid":"30adc3ab8698479c9acd9e532c9f0d5a"},{"vnfcInstanceId":"5622630bfe3f41a2bac4f69e4baec0a3","changeType":"added","vimid":"core-dc_RegionOne","vmid":"5622630bfe3f41a2bac4f69e4baec0a3","vmname":"vnfab40e6ba-df1f-458c-94c5-a45_SDU_A_0069","vduid":"5622630bfe3f41a2bac4f69e4baec0a3"},{"vnfcInstanceId":"8a6c8c808f6549be824375c33639a7bb","changeType":"added","vimid":"core-dc_RegionOne","vmid":"8a6c8c808f6549be824375c33639a7bb","vmname":"vnfab40e6ba-df1f-458c-94c5-a45_SDU_A_0071","vduid":"8a6c8c808f6549be824375c33639a7bb"},{"vnfcInstanceId":"a82f9c5a22e748139bd0569e52048cb9","changeType":"added","vimid":"core-dc_RegionOne","vmid":"a82f9c5a22e748139bd0569e52048cb9","vmname":"vnfab40e6ba-df1f-458c-94c5-a45_SDU_A_0070","vduid":"a82f9c5a22e748139bd0569e52048cb9"}]}


Job status (responseId in request matches reponseId in response)

Code Block
GET /{vnfmtype}/v1/{vnfmid}/jobs/{jobid}

ExampleExample1: 
Request GET http://10.0.14.1:80/api/huaweivnfmdriver/v1/4a1626f6-e754-4bf9-83f4-14c11bd59d45/jobs/bfb74ec8ef8a4e5b983d0c4dc2571191_post?responseId=0
Response code: 200
Response body: {"jobId":"bfb74ec8ef8a4e5b983d0c4dc2571191","responsedescriptor":{"progress":"50","status":"processing","errorCode":null,"responseId":"0"}}


Example2:
GET http://10.0.14.1:80/api/huaweivnfmdriver/v1/4a1626f6-e754-4bf9-83f4-14c11bd59d45/jobs/bfb74ec8ef8a4e5b983d0c4dc2571191_post?responseId=2
Response code: 200
Reponse Body: {"jobId":"bfb74ec8ef8a4e5b983d0c4dc2571191","responsedescriptor":{"progress":"50","status":"processing","errorCode":null,"responseId":"2"}}

Example3:
GET http://10.0.14.1:80/api/huaweivnfmdriver/v1/4a1626f6-e754-4bf9-83f4-14c11bd59d45/jobs/bfb74ec8ef8a4e5b983d0c4dc2571191_post?responseId=50
Body: {"jobId":"bfb74ec8ef8a4e5b983d0c4dc2571191","responsedescriptor":{"progress":"100","status":"finished","errorCode":null,"responseId":"50"}}

...