1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
4 NS LCM Guide Using VF-C
5 -----------------------
7 VF-C supports vCPE use case in R3, all VNFs are deployed through VF-C GVNFM .
8 This page describe how to use VF-C to instantiate NS
10 Before you try, please prepare two csar file:
14 If you don't have any csar, you can download the simple csar from https://wiki.onap.org/display/DW/VF-C+User+Guide
19 VF-C components can run as docker, docker service should be installed before installing VF-C components.
21 The following scripts show the docker service install commands in centos 7.
26 systemctl enable docker.service
27 systemctl start docker.service
34 If you want to try VF-C, the small project set should include: VF-C , Multicloud, MSB and A&AI.
36 VF-C components need to register to MSB when starting, so MSB components should be installed first,you can refer the following link to install MSB.
38 http://onap.readthedocs.io/en/latest/submodules/msb/apigateway.git/docs/platform/installation.html
40 Note: In the following steps, we use ${MSB_IP} as the IP of msb_apigateway component.
43 1. Install vfc-nfvo-lcm component.
47 docker run -d -p 8403:8403 --name vfc-nslcm -e MSB_ADDR=${MSB_IP}:80 -e MYSQL_ADDR=${VFC_DB_IP}:3306
48 nexus3.onap.org:10001/onap/vfc/nslcm
50 2. Install modeling-etsicatalog component.
54 docker run -d -p 8806:8806 --name modeling-etsicatalog -e MSB_ADDR=${MSB_IP}:80 -e MYSQL_ADDR=${VFC_DB_IP}:3306 nexus3.onap.org:10001/onap/modeling/etsicatalog
56 3. Install vfc-nfvo-gvnfmdriver component.
60 docker run -d -p 8484:8484 --name vfc-gvnfmdriver -e MSB_ADDR=${MSB_IP}:80 nexus3.onap.org:10001/onap/vfc/gvnfmdriver
62 4. Install vfc-gvnfm-vnflcm component.
66 docker run -d -p 8801:8801 --name vfc-vnflcm -e MSB_ADDR=${MSB_IP}:80 -e MYSQL_ADDR=${VFC_DB_IP}:3306 nexus3.onap.org:10001/onap/vfc/vnflcm
73 Before we instantiate a service, we need to register vim and vnfm which is used to deploy vnfs.
78 .. |image1| image:: vim.png
85 For VF-C, because we use GVNFM to deploy vnfs , so you can register GVNFM in esr gui as follows:
89 .. |image2| image:: gvnfm.png
94 Note: type should be gvnfmdriver which is the same with gvnfmdriver microservice
95 url is the msb-iag NodeIp:port
96 vim corresponds to cloudowner_cloudregionid which registered in step1
102 VF-C R3 support VNF/PNF/NS csar package upload from local csar file. VNF/PNF csar package should be uploaded first, then NS csar package can be uploaded.
103 Before onboarding a package, should create one record first.
106 1. Create VNF package record in etsicatalog DB
112 http://172.30.3.104:30280/api/vnfpkgm/v1/vnf_packages \
114 -H 'Postman-Token: f9c45dea-b7bb-4acd-89e1-b9b1c3d70d8a' \
115 -H 'accept: application/json' \
116 -H 'cache-control: no-cache' \
117 -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
118 -F 'userDefinedData= "key2": "value2"'
121 a. 172.30.3.104:30280 is the node IP and exposed port where the msb-iag pod is located.
122 b. userDefinedData is the key value pair which defined for the vnf package we created
124 2. Upload VNF package to modeling etsicatalog
129 http://172.30.3.104:30280/api/vnfpkgm/v1/vnf_packages/38037a12-a0d4-4aa4-ac50-cd6b05ce0b24/package_content \
130 -H 'Postman-Token: 88ada218-86fd-4cd7-a06e-cc462f5df651' \
131 -H 'cache-control: no-cache'
132 -H 'accept: application/json' \
133 -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
134 -F 'file=@C:\ONAP\Integration\R3\vCPE\vnf-vsn.csar'
137 a. 38037a12-a0d4-4aa4-ac50-cd6b05ce0b24 is the vnf_pkg_id which we get from the first step.
138 b. -F is used to specify the local vnf package file
140 3. Create NS package record in etsicatalog DB
146 http://172.30.3.104:30280/api/nsd/v1/ns_descriptors \
147 -H 'Postman-Token: 71b11910-1708-471c-84bb-5b0dd8d214a2' \
148 -H 'accept: application/json' \
149 -H 'cache-control: no-cache' \
150 -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
151 -F 'userDefinedData= "key1": "value1"'
154 a. userDefinedData is the key value pair which defined for the ns package we created
156 4. Upload NS package to modeling etsicatalog
161 http://172.30.3.104:30280/api/nsd/v1/ns_descriptors/79ca81ec-10e0-44e4-bc85-ba968f345711/nsd_content \
162 -H 'Postman-Token: f16e4a54-a514-4878-b307-9b80c630166e' \
163 -H 'cache-control: no-cache'
164 -H 'accept: application/json' \
165 -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
166 -F 'file=@C:\ONAP\Integration\R3\vCPE\ns.csar'
169 a. -F is used to specify the local ns package file
172 NS Life Cycle Management
173 ++++++++++++++++++++++++
176 Currently VF-C GVNFM support NS create/Instantiate/terminate/delete/heal.
178 VF-C R3 healing only suport restart a vm of an VNF.
185 http://172.30.3.104:30280/api/nslcm/v1/ns \
186 -H 'Postman-Token: 27e2c576-2d9b-4753-a6b0-6262a4a7ec86' \
187 -H 'accept: application/json' \
188 -H 'cache-control: no-cache' \
189 -H 'content-type: application/json' \
192 "globalCustomerId": "global-customer-id-test1",
193 "serviceType": "service-type-test1"
195 "csarId": "79ca81ec-10e0-44e4-bc85-ba968f345711",
197 "description": "description"
201 a. globalCustomerId and serviceType is defined in A&AI.
202 b. csar Id is the NS package id which is consistent with the etsicatalog ns package id.
203 c. nsName is the NS name
210 http://172.30.3.104:30280/api/nslcm/v1/ns/f0b4c09f-c653-438a-b091-5218b0f806ec/instantiate \
211 -H 'Postman-Token: 2a9542b2-3364-4a40-8513-45e10b8ca2ce' \
212 -H 'accept: application/json' \
213 -H 'cache-control: no-cache' \
214 -H 'content-type: application/json' \
216 "additionalParamForNs": {
217 "sdnControllerId": "2"
219 "locationConstraints": [{
220 "vnfProfileId": "45711f40-3f43-415b-bb45-46e5c6940735",
221 "locationConstraints": {
222 "vimId": "CPE-DC_RegionOne"
228 a. f0b4c09f-c653-438a-b091-5218b0f806ec is the ns instance id which create in step 1 : NS create.
229 b. locationConstraints is an array which contains all the vnfs included under NS locationConstraints is used to define the VIM( cloudOwner_cloudRegionId) that the VNF will be deployed vnfProfileId is the vnf descriptor id which defined in NS template under node_templates .
234 .. |image3| image:: image2018-12-10_12-1-36.png
238 c. before instantiate, you should create one volumntype which is called root.
245 http://172.30.3.104:30280/api/nslcm/v1/ns/f0b4c09f-c653-438a-b091-5218b0f806ec/heal \
246 -H 'Content-Type: application/json' \
247 -H 'Postman-Token: f18754b8-ed68-43b0-ae55-b8b8780e5c6a' \
248 -H 'accept: application/json' \
249 -H 'cache-control: no-cache' \
250 -d '{ "vnfInstanceId": "044b705c-e44d-4733-ab64-987f46d9b567",
251 "cause": "restartvm",
252 "additionalParams": {
253 "action": "restartvm",
255 "vmid": "1623cd25-ae6f-4880-8132-15914367e47b",
257 "vmname": "1623cd25-ae6f-4880-8132-15914367e47b"
262 a. f0b4c09f-c653-438a-b091-5218b0f806ec is the ns instance id which create in step 1 : NS create.
263 b. "vnfInstanceId": "044b705c-e44d-4733-ab64-987f46d9b567" is the VNF instanceId, we can get this from A&AI or VF-C DB.
264 c. action only support restartvm in Casablanca release.
265 d. actionvminfo only supports to include one vm , vmid is the vmid which is the same with the vmid in cloud.
272 http://172.30.3.104:30280/api/nslcm/v1/ns/f0b4c09f-c653-438a-b091-5218b0f806ec/terminate \
273 -H 'Postman-Token: 5190e46f-f612-432a-90d8-161ea67778b2' \
274 -H 'accept: application/json' \
275 -H 'cache-control: no-cache' \
276 -H 'content-type: application/json' \
277 -d 'gracefulTerminationTimeout: 600,
278 \terminationType: FORCEFUL'
281 a. f0b4c09f-c653-438a-b091-5218b0f806ec is the ns instance id which create in step 1 : NS create.
282 b. terminateType supports FORCEFUL and GRACEFULLc. gracefulTerminationTimeout is the wait time before execute terminate.
289 http://172.30.3.104:30280/api/nslcm/v1/ns/f0b4c09f-c653-438a-b091-5218b0f806ec \
290 -H 'Postman-Token: 62b35de6-1785-40ed-8026-06d73f9770d8' \
291 -H 'cache-control: no-cache'
294 a. f0b4c09f-c653-438a-b091-5218b0f806ec is the ns instance id which create in step 1 : NS create