1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. Copyright 2018 Huawei Technologies Co., Ltd.
5 .. Step to import VNF/PNF:
9 ==============================================
11 This document describe how to insert existing PNF/VNF to AAI with CLI project.
13 The main step will include:
14 1. create customer and service instance in AAI. This step could be done by UUI or VID, OR user can insert customer/service instance node by CLI cmd.
16 3. create relation-ship between service-instance and created PNF/VNFs
17 4. check the Topology graph through AAI portal
22 optional,since the customer/subscription/service-instance may already exist
29 onap>customer-create -u AAI -p AAI -m https://172.19.44.123:8443 --customer-name testCustomer --subscriber-name EC
31 Check if customer created successfully:
32 -------------------------------------------
36 onap>customer-list -u AAI -p AAI -m https://172.19.44.123:8443
38 +--------------+------------------+
39 |name |resource-version |
40 +--------------+------------------+
41 |testCustomer |1521772326346 |
42 +--------------+------------------+
43 |Orange1 |1521771120855 |
44 +--------------+------------------+
45 |Orange |1520304126184 |
46 +--------------+------------------+
47 |test |1521098144163 |
48 +--------------+------------------+
51 -------------------------------------------
55 onap>customer-delete -u AAI -p AAI -m https://172.19.44.123:8443 --customer-name testCustomer --resource-version 1521772326346
58 create subscription (optional)
59 ==============================
61 create subscription cmd:
62 -------------------------
67 onap>subscription-create-with-template -u AAI -p AAI -m https://172.19.44.123:8443 --customer-name testCustomer --service-type EC --template /opt/oclip/template/sub-create.json
69 content of /opt/oclip/template/sub-create.json:
71 "service-subscription": [
80 Check if subscription created successfully:
81 --------------------------------------------
85 onap>subscription-list -u AAI -p AAI -m https://172.19.44.123:8443 --customer-name testCustomer
88 +--------------+------------------+
89 |service-type |resource-version |
90 +--------------+------------------+
92 +--------------+------------------+
94 +--------------+------------------+
96 delete subscription cmd:
97 --------------------------------------------
101 onap>subscription-delete -u AAI -p AAI -m https://172.19.44.123:8443 --customer-name testCustomer --service-type EC --resource-version 1521772326346
103 create service instance(optional)
104 =================================
106 create service instance with template cmd:
107 ------------------------------------------
112 onap>service-instance-create-with-template -u AAI -p AAI -m https://172.19.44.123:8443 --service-instance-id 176d9eba-1662-4289-8396-0097b50fd486 --template /opt/oclip/open-cli-schema/service-instance-template.json --global-customer-id testCustomer --service-type EC
114 content of /opt/oclip/open-cli-schema/service-instance-template.json:
117 "global-customer-id": "testCustomer",
118 "subscriber-name": "EC",
119 "subscriber-type": "INFRA",
120 "service-subscriptions": {
121 "service-subscription": [
123 "service-type": "EC",
124 "service-instances": {
125 "service-instance": [
127 "service-instance-id": "176d9eba-1662-4289-8396-0097b50fd486",
128 "service-instance-name": "template-service",
129 "service-type": "NetworkService",
130 "relationship-list": {
144 there are many ways to create PNF, cmd:
146 A: create pnf with pnf name:
147 ----------------------------
151 onap>pnf-create -u AAI -p AAI -m https://172.19.44.123:8443 -n testcmdpnfname
153 B: create pnf with all option (including relationship json):
154 ------------------------------------------------------------
159 onap>pnf-create -u AAI -p AAI -m https://172.19.44.123:8443 -n testcmdpnfname -q MME -x generic --in-maint false --prov-status PROV --relationship /opt/oclip/open-cli-schema/pnf-sub-relation.json
161 Sample content of /opt/oclip/open-cli-schema/pnf-sub-relation.json:
166 "related-to": "logical-link",
167 "related-link": "/aai/v11/network/logical-links/logical-link/S11-00001",
168 "relationship-data": [
170 "relationship-key": "logical-link.link-name",
171 "relationship-value": "S11-00001"
178 C: create pnf with template
179 ----------------------------
180 since pnf contains logs of parameters , user can put all the parameters in a json file.e.g to create a PNF with p-interface,user should use this cmd:
185 onap>pnf-create-with-template -u AAI -p AAI -m https://172.19.44.123:8443 -n pnf_template -r /opt/oclip/open-cli-schema/pnf-template.json
187 Sample content of /opt/oclip/open-cli-schema/pnf-template.json
190 "pnf-name" : "pnf_template",
191 "equip-type" : "pnf_template",
192 "equip-vendor" : "Generic",
193 "in-maint" : "false",
194 "prov-status" : "PROV",
198 "interface-name" : "pnf_template-p-interface",
200 "speed-units" : "Gbps",
201 "port-description" : "downstream port 1",
202 "interface-type" : "port",
203 "prov-status" : "PROV",
204 "in-maint" : "false",
208 "interface-name" : "pnf_template-i-interface",
209 "interface-role" : "Eth logical interface",
210 "is-port-mirrored" : "false",
211 "prov-status" : "PROV",
221 List Created PNF cmd:
222 -----------------------
227 onap>pnf-list -u AAI -p AAI -m https://172.19.44.123:8443
229 +----------------+--------------------------------------+------------------+
230 |pnf-name |pnf-id |resource-version |
231 +----------------+--------------------------------------+------------------+
232 |batch-name-2 |176d9eba-1662-4289-8396-0097b50fd470 |1521790894608 |
233 +----------------+--------------------------------------+------------------+
234 |pnf_template |176d9eba-1662-4289-8396-0097b50fd467 |1521702068121 |
235 +----------------+--------------------------------------+------------------+
236 |testcmdpnfname |176d9eba-1662-4289-8396-0097b50fd466 |1521687589914 |
237 +----------------+--------------------------------------+------------------+
238 |batch-name-1 |176d9eba-1662-4289-8396-0097b50fd470 |1521790894391 |
239 +----------------+--------------------------------------+------------------+
240 |SPGW-0001 | |1520304310122 |
241 +----------------+--------------------------------------+------------------+
242 |test | |1520417818047 |
243 +----------------+--------------------------------------+------------------+
244 |MME-000111 | |1520417147010 |
245 +----------------+--------------------------------------+------------------+
246 |MME-0001 | |1520303982165 |
247 +----------------+--------------------------------------+------------------+
248 |SP GW-0001 | |1520304000840 |
249 +----------------+--------------------------------------+------------------+
256 onap>pnf-delete -n testname -b 1521685031379 -u AAI -p AAI -m https://172.19.44.123:8443
261 there are many ways to create VNF, cmd:
263 A: create VNF with VNF id:
264 ---------------------------
267 onap>vnf-create -u AAI -p AAI -m https://172.19.44.123:8443 --name vn1 --vnf-id d9b1b05f-44c8-45ef-89aa-d27ad060ceb8 --vnf-type t1 --debug
269 B: create VNF with template:
270 -----------------------------
274 onap>vnf-create-with-template -u AAI -p AAI -m https://172.19.44.123:8443 --vnf-id d9b1b05f-44c8-45ef-89aa-d27ad060ceb9 --template /opt/oclip/open-cli-schema/vnf-template.json
276 Sample content of /opt/oclip/open-cli-schema/vnf-template.json
278 "vnf-id": "d9b1b05f-44c8-45ef-89aa-d27ad060ceb9",
279 "vnf-name": "vvnf-name",
280 "vnf-type": "vnf-type-1",
282 "is-closed-loop-disabled": false
285 Create relationship between service instance and PNF/VNF:
286 =========================================================
290 onap>service-instance-relationship-create -u AAI -p AAI -m https://172.19.44.123:8443 -g Orange -z EC -i 176d9eba-1662-4289-8396-0097b50fd485 -r /opt/oclip/open-cli-schema/relation.json
292 Sample content of /opt/oclip/open-cli-schema/relation.json:
296 "related-link": "/aai/v11/network/pnfs/pnf/pnf_template",
297 "relationship-data": [
299 "relationship-key": "pnf.pnf-name",
300 "relationship-value": "pnf_template"
305 List Service-instance relationship:
306 ------------------------------------
310 onap>service-instance-relationship-list -u AAI -p AAI -m https://172.19.44.123:8443 -g Orange -z EPC -i 176d9eba-1662-4289-8396-0097b50fd485
314 +--------------+----------------------------------------------------+
315 |related-to |related-link |
316 +--------------+----------------------------------------------------+
317 |pnf |/aai/v11/network/pnfs/pnf/pnf_template |
318 +--------------+----------------------------------------------------+
319 |pnf |/aai/v11/network/pnfs/pnf/testcmdpnfname |
320 +--------------+----------------------------------------------------+
321 |logical-link |/aai/v11/network/logical-links/logical-link/S11-00 |
323 +--------------+----------------------------------------------------+
324 |pnf |/aai/v11/network/pnfs/pnf/MME-0001 |
325 +--------------+----------------------------------------------------+
326 |pnf |/aai/v11/network/pnfs/pnf/SP%20GW-0001 |
327 +--------------+----------------------------------------------------+
329 Delete Service-instance relationship:
330 --------------------------------------
334 onap>service-instance-relationship-delete -u AAI -p AAI -m https://172.19.44.123:8443 -g Orange -z EPC -i 176d9eba-1662-4289-8396-0097b50fd485 -r /opt/oclip/open-cli-schema/relation.json
336 Sample content of /opt/oclip/open-cli-schema/relation.json is same as the one used to create relation.
338 batch import PNF/VNF:
339 =====================
340 Since all the cmd support batch model, user can import multi-PNF/VNF one time:
341 This CMD should be run on system terminal:
348 onap>oclip -p create-batch.yaml pnf-create
350 Sample content of create-batch.yaml:
356 - host-url: https://172.19.44.123:8443
362 - host-url: https://172.19.44.123:8443
367 "related-to": "logical-link",
368 "related-link": "/aai/v11/network/logical-links/logical-link/S11-00001",
369 "relationship-data": [
371 "relationship-key": "logical-link.link-name",
372 "relationship-value": "S11-00001"
379 User can also use create with template cmd for batch execute:
386 oclip -p create-batch.yaml pnf-create-with-template
388 Checke AAI topology through portal:
389 ====================================
391 Typing the key word, (service,PNF,generic-vnf,customer),the search text box will pup up auto suggestion of the search key word.
395 service-instance called 176d9eba-1662-4289-8396-0097b50fd485
398 generic-vnf called d9b1b05f-44c8-45ef-89aa-d27ad060ceb4