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 describes how to insert existing PNF/VNF to AAI with CLI project.
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.
18 3. create relation-ship between service-instance and created PNF/VNFs
20 4. check the Topology graph through AAI portal
25 optional,since the customer/subscription/service-instance may already exist
32 onap>customer-create -u AAI -p AAI -m https://172.19.44.123:8443 --customer-name testCustomer --subscriber-name EC
34 Check if customer created successfully:
35 -------------------------------------------
39 onap>customer-list -u AAI -p AAI -m https://172.19.44.123:8443
41 +--------------+------------------+
42 |name |resource-version |
43 +--------------+------------------+
44 |testCustomer |1521772326346 |
45 +--------------+------------------+
46 |Orange1 |1521771120855 |
47 +--------------+------------------+
48 |Orange |1520304126184 |
49 +--------------+------------------+
50 |test |1521098144163 |
51 +--------------+------------------+
54 -------------------------------------------
58 onap>customer-delete -u AAI -p AAI -m https://172.19.44.123:8443 --customer-name testCustomer --resource-version 1521772326346
61 create subscription (optional)
62 ==============================
64 create subscription cmd:
65 -------------------------
70 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
72 content of /opt/oclip/template/sub-create.json:
74 "service-subscription": [
83 Check if subscription created successfully:
84 --------------------------------------------
88 onap>subscription-list -u AAI -p AAI -m https://172.19.44.123:8443 --customer-name testCustomer
91 +--------------+------------------+
92 |service-type |resource-version |
93 +--------------+------------------+
95 +--------------+------------------+
97 +--------------+------------------+
99 delete subscription cmd:
100 --------------------------------------------
104 onap>subscription-delete -u AAI -p AAI -m https://172.19.44.123:8443 --customer-name testCustomer --service-type EC --resource-version 1521772326346
106 create service instance(optional)
107 =================================
109 create service instance with template cmd:
110 ------------------------------------------
115 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
117 content of /opt/oclip/open-cli-schema/service-instance-template.json:
120 "global-customer-id": "testCustomer",
121 "subscriber-name": "EC",
122 "subscriber-type": "INFRA",
123 "service-subscriptions": {
124 "service-subscription": [
126 "service-type": "EC",
127 "service-instances": {
128 "service-instance": [
130 "service-instance-id": "176d9eba-1662-4289-8396-0097b50fd486",
131 "service-instance-name": "template-service",
132 "service-type": "NetworkService",
133 "relationship-list": {
147 there are many ways to create PNF, cmd:
149 A: create pnf with pnf name:
150 ----------------------------
154 onap>pnf-create -u AAI -p AAI -m https://172.19.44.123:8443 -n testcmdpnfname
156 B: create pnf with all option (including relationship json):
157 ------------------------------------------------------------
162 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
164 Sample content of /opt/oclip/open-cli-schema/pnf-sub-relation.json:
169 "related-to": "logical-link",
170 "related-link": "/aai/v11/network/logical-links/logical-link/S11-00001",
171 "relationship-data": [
173 "relationship-key": "logical-link.link-name",
174 "relationship-value": "S11-00001"
181 C: create pnf with template
182 ----------------------------
183 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:
188 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
190 Sample content of /opt/oclip/open-cli-schema/pnf-template.json
193 "pnf-name" : "pnf_template",
194 "equip-type" : "pnf_template",
195 "equip-vendor" : "Generic",
196 "in-maint" : "false",
197 "prov-status" : "PROV",
201 "interface-name" : "pnf_template-p-interface",
203 "speed-units" : "Gbps",
204 "port-description" : "downstream port 1",
205 "interface-type" : "port",
206 "prov-status" : "PROV",
207 "in-maint" : "false",
211 "interface-name" : "pnf_template-i-interface",
212 "interface-role" : "Eth logical interface",
213 "is-port-mirrored" : "false",
214 "prov-status" : "PROV",
224 List Created PNF cmd:
225 -----------------------
230 onap>pnf-list -u AAI -p AAI -m https://172.19.44.123:8443
232 +----------------+--------------------------------------+------------------+
233 |pnf-name |pnf-id |resource-version |
234 +----------------+--------------------------------------+------------------+
235 |batch-name-2 |176d9eba-1662-4289-8396-0097b50fd470 |1521790894608 |
236 +----------------+--------------------------------------+------------------+
237 |pnf_template |176d9eba-1662-4289-8396-0097b50fd467 |1521702068121 |
238 +----------------+--------------------------------------+------------------+
239 |testcmdpnfname |176d9eba-1662-4289-8396-0097b50fd466 |1521687589914 |
240 +----------------+--------------------------------------+------------------+
241 |batch-name-1 |176d9eba-1662-4289-8396-0097b50fd470 |1521790894391 |
242 +----------------+--------------------------------------+------------------+
243 |SPGW-0001 | |1520304310122 |
244 +----------------+--------------------------------------+------------------+
245 |test | |1520417818047 |
246 +----------------+--------------------------------------+------------------+
247 |MME-000111 | |1520417147010 |
248 +----------------+--------------------------------------+------------------+
249 |MME-0001 | |1520303982165 |
250 +----------------+--------------------------------------+------------------+
251 |SP GW-0001 | |1520304000840 |
252 +----------------+--------------------------------------+------------------+
259 onap>pnf-delete -n testname -b 1521685031379 -u AAI -p AAI -m https://172.19.44.123:8443
264 there are many ways to create VNF, cmd:
266 A: create VNF with VNF id:
267 ---------------------------
270 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
272 B: create VNF with template:
273 -----------------------------
277 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
279 Sample content of /opt/oclip/open-cli-schema/vnf-template.json
281 "vnf-id": "d9b1b05f-44c8-45ef-89aa-d27ad060ceb9",
282 "vnf-name": "vvnf-name",
283 "vnf-type": "vnf-type-1",
285 "is-closed-loop-disabled": false
288 Create relationship between service instance and PNF/VNF:
289 =========================================================
293 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
295 Sample content of /opt/oclip/open-cli-schema/relation.json:
299 "related-link": "/aai/v11/network/pnfs/pnf/pnf_template",
300 "relationship-data": [
302 "relationship-key": "pnf.pnf-name",
303 "relationship-value": "pnf_template"
308 List Service-instance relationship:
309 ------------------------------------
313 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
317 +--------------+----------------------------------------------------+
318 |related-to |related-link |
319 +--------------+----------------------------------------------------+
320 |pnf |/aai/v11/network/pnfs/pnf/pnf_template |
321 +--------------+----------------------------------------------------+
322 |pnf |/aai/v11/network/pnfs/pnf/testcmdpnfname |
323 +--------------+----------------------------------------------------+
324 |logical-link |/aai/v11/network/logical-links/logical-link/S11-00 |
326 +--------------+----------------------------------------------------+
327 |pnf |/aai/v11/network/pnfs/pnf/MME-0001 |
328 +--------------+----------------------------------------------------+
329 |pnf |/aai/v11/network/pnfs/pnf/SP%20GW-0001 |
330 +--------------+----------------------------------------------------+
332 Delete Service-instance relationship:
333 --------------------------------------
337 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
339 Sample content of /opt/oclip/open-cli-schema/relation.json is same as the one used to create relation.
341 batch import PNF/VNF:
342 =====================
343 Since all the cmd support batch model, user can import multi-PNF/VNF one time:
344 This CMD should be run on system terminal:
351 onap>oclip -p create-batch.yaml pnf-create
353 Sample content of create-batch.yaml:
359 - host-url: https://172.19.44.123:8443
365 - host-url: https://172.19.44.123:8443
370 "related-to": "logical-link",
371 "related-link": "/aai/v11/network/logical-links/logical-link/S11-00001",
372 "relationship-data": [
374 "relationship-key": "logical-link.link-name",
375 "relationship-value": "S11-00001"
382 User can also use create with template cmd for batch execute:
389 oclip -p create-batch.yaml pnf-create-with-template
391 Checke AAI topology through portal:
392 ====================================
394 Typing the key word, (service,PNF,generic-vnf,customer),the search text box will pup up auto suggestion of the search key word.
398 service-instance called 176d9eba-1662-4289-8396-0097b50fd485
401 generic-vnf called d9b1b05f-44c8-45ef-89aa-d27ad060ceb4