summaryrefslogtreecommitdiffstats
path: root/docs/user_guide_pnf_on_boarding.rst
blob: 765db06666e3376c4b10ba95edc17d3bf0604d3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0
.. Copyright 2018 Huawei Technologies Co., Ltd.

.. Step to import VNF/PNF:


Step to import VNF/PNF
==============================================

This document describes how to insert existing PNF/VNF to AAI with CLI project.

Main steps:
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.

2. create PNF/VNF

3. create relation-ship between service-instance and created PNF/VNFs

4. check the Topology graph through AAI portal


create customer
================
optional,since the customer/subscription/service-instance may already exist

create customer:
--------------------

::

  onap>customer-create -u AAI -p AAI -m https://172.19.44.123:8443 --customer-name testCustomer --subscriber-name EC

Check if customer created successfully:
-------------------------------------------

::

  onap>customer-list -u AAI -p AAI -m https://172.19.44.123:8443

  +--------------+------------------+
  |name          |resource-version  |
  +--------------+------------------+
  |testCustomer  |1521772326346     |
  +--------------+------------------+
  |Orange1       |1521771120855     |
  +--------------+------------------+
  |Orange        |1520304126184     |
  +--------------+------------------+
  |test          |1521098144163     |
  +--------------+------------------+

delete customer cmd:
-------------------------------------------

::

  onap>customer-delete -u AAI -p AAI -m https://172.19.44.123:8443 --customer-name testCustomer --resource-version 1521772326346


create subscription (optional)
==============================

create subscription cmd:
-------------------------

::


  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

        content of /opt/oclip/template/sub-create.json:
            {
            "service-subscription": [
                {
                    "service-type": "EC",
                }
                 ]
                }



Check if subscription created successfully:
--------------------------------------------

::

  onap>subscription-list -u AAI -p AAI -m https://172.19.44.123:8443 --customer-name testCustomer

  output:
  +--------------+------------------+
  |service-type  |resource-version  |
  +--------------+------------------+
  |EEC           |1521773231094     |
  +--------------+------------------+
  |EC            |1522058350020     |
  +--------------+------------------+

delete subscription cmd:
--------------------------------------------

::

  onap>subscription-delete -u AAI -p AAI -m https://172.19.44.123:8443 --customer-name testCustomer --service-type EC --resource-version 1521772326346

create service instance(optional)
=================================

create service instance with template cmd:
------------------------------------------


::

  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

   content of /opt/oclip/open-cli-schema/service-instance-template.json:

        {
            "global-customer-id": "testCustomer",
            "subscriber-name": "EC",
            "subscriber-type": "INFRA",
            "service-subscriptions": {
                "service-subscription": [
                    {
                        "service-type": "EC",
                        "service-instances": {
                            "service-instance": [
                                {
                                    "service-instance-id": "176d9eba-1662-4289-8396-0097b50fd486",
                                    "service-instance-name": "template-service",
                                    "service-type": "NetworkService",
                                    "relationship-list": {
                                    }
                                }
                            ]
                        }
                    }
                ]
            }
        }


Create PNF
==========

    there are many ways to create PNF, cmd:

A: create pnf with pnf name:
----------------------------

::

  onap>pnf-create -u AAI -p AAI -m https://172.19.44.123:8443 -n testcmdpnfname

B: create pnf with all option (including relationship json):
------------------------------------------------------------


::

  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

       Sample content of /opt/oclip/open-cli-schema/pnf-sub-relation.json:

           {
                "relationship": [
                    {
                        "related-to": "logical-link",
                        "related-link": "/aai/v11/network/logical-links/logical-link/S11-00001",
                        "relationship-data": [
                            {
                                "relationship-key": "logical-link.link-name",
                                "relationship-value": "S11-00001"
                            }
                        ]
                    }
                  ]
        }

C: create pnf with template
----------------------------
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:


::

  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

        Sample content of /opt/oclip/open-cli-schema/pnf-template.json

        {
            "pnf-name" : "pnf_template",
            "equip-type" : "pnf_template",
            "equip-vendor" : "Generic",
            "in-maint" : "false",
            "prov-status" : "PROV",
            "p-interfaces" : {
                 "p-interface" : [
                     {
                        "interface-name" : "pnf_template-p-interface",
                        "speed-value" : "1",
                        "speed-units" : "Gbps",
                        "port-description" : "downstream  port 1",
                        "interface-type" : "port",
                        "prov-status" : "PROV",
                        "in-maint" : "false",
                        "l-interfaces" : {
                              "l-interface" : [
                                   {
                                        "interface-name" : "pnf_template-i-interface",
                                        "interface-role" : "Eth logical interface",
                                        "is-port-mirrored" : "false",
                                        "prov-status" : "PROV",
                                        "in-maint" : "false"
                                   }
                               ]
                        }
                    }
                 ]
              }
            }

List Created PNF cmd:
-----------------------


::

  onap>pnf-list -u AAI -p AAI -m https://172.19.44.123:8443
    output:
            +----------------+--------------------------------------+------------------+
            |pnf-name        |pnf-id                                |resource-version  |
            +----------------+--------------------------------------+------------------+
            |batch-name-2    |176d9eba-1662-4289-8396-0097b50fd470  |1521790894608     |
            +----------------+--------------------------------------+------------------+
            |pnf_template    |176d9eba-1662-4289-8396-0097b50fd467  |1521702068121     |
            +----------------+--------------------------------------+------------------+
            |testcmdpnfname  |176d9eba-1662-4289-8396-0097b50fd466  |1521687589914     |
            +----------------+--------------------------------------+------------------+
            |batch-name-1    |176d9eba-1662-4289-8396-0097b50fd470  |1521790894391     |
            +----------------+--------------------------------------+------------------+
            |SPGW-0001       |                                      |1520304310122     |
            +----------------+--------------------------------------+------------------+
            |test            |                                      |1520417818047     |
            +----------------+--------------------------------------+------------------+
            |MME-000111      |                                      |1520417147010     |
            +----------------+--------------------------------------+------------------+
            |MME-0001        |                                      |1520303982165     |
            +----------------+--------------------------------------+------------------+
            |SP GW-0001      |                                      |1520304000840     |
            +----------------+--------------------------------------+------------------+

Delete PNF cmd:
----------------

::

  onap>pnf-delete -n testname -b 1521685031379 -u AAI -p AAI -m https://172.19.44.123:8443

Create VNF
===========

    there are many ways to create VNF, cmd:

A: create VNF with VNF id:
---------------------------

::
  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

B: create VNF with template:
-----------------------------

::

  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

        Sample content of /opt/oclip/open-cli-schema/vnf-template.json
        {
            "vnf-id": "d9b1b05f-44c8-45ef-89aa-d27ad060ceb9",
            "vnf-name": "vvnf-name",
            "vnf-type": "vnf-type-1",
            "in-maint": true,
            "is-closed-loop-disabled": false
        }

Create relationship between service instance and PNF/VNF:
=========================================================

::

  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

    Sample content of  /opt/oclip/open-cli-schema/relation.json:

            {
                        "related-to": "pnf",
                        "related-link": "/aai/v11/network/pnfs/pnf/pnf_template",
                        "relationship-data": [
                            {
                                "relationship-key": "pnf.pnf-name",
                                "relationship-value": "pnf_template"
                            }
                        ]
            }

List Service-instance relationship:
------------------------------------

::

  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

    Output:

        +--------------+----------------------------------------------------+
        |related-to    |related-link                                        |
        +--------------+----------------------------------------------------+
        |pnf           |/aai/v11/network/pnfs/pnf/pnf_template              |
        +--------------+----------------------------------------------------+
        |pnf           |/aai/v11/network/pnfs/pnf/testcmdpnfname            |
        +--------------+----------------------------------------------------+
        |logical-link  |/aai/v11/network/logical-links/logical-link/S11-00  |
        |              |001                                                 |
        +--------------+----------------------------------------------------+
        |pnf           |/aai/v11/network/pnfs/pnf/MME-0001                  |
        +--------------+----------------------------------------------------+
        |pnf           |/aai/v11/network/pnfs/pnf/SP%20GW-0001              |
        +--------------+----------------------------------------------------+

Delete Service-instance relationship:
--------------------------------------

::

  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

    Sample content of     /opt/oclip/open-cli-schema/relation.json is same as the one used to create relation.

batch import PNF/VNF:
=====================
    Since all the cmd support batch model, user can import multi-PNF/VNF one time:
    This CMD should be run on system terminal:

cmd:
-------

::

  onap>oclip -p create-batch.yaml pnf-create

        Sample content of create-batch.yaml:

        pnf1:
          - name: batch-name-1
          - host-username: AAI
          - host-password: AAI
          - host-url: https://172.19.44.123:8443

        pnf2:
          - name: batch-name-2
          - host-username: AAI
          - host-password: AAI
          - host-url: https://172.19.44.123:8443
          - template: |
                        {
                            "relationship": [
                                {
                                    "related-to": "logical-link",
                                    "related-link": "/aai/v11/network/logical-links/logical-link/S11-00001",
                                    "relationship-data": [
                                        {
                                            "relationship-key": "logical-link.link-name",
                                            "relationship-value": "S11-00001"
                                        }
                                    ]
                                }
                            ]
                         }

User can also use create with template cmd for batch execute:

sample cmd:
----------------

::

  oclip -p create-batch.yaml pnf-create-with-template

Checke AAI topology through portal:
====================================

Typing the key word, (service,PNF,generic-vnf,customer),the search text box will pup up auto suggestion of the search key word.
e.g.
::

    service-instance called 176d9eba-1662-4289-8396-0097b50fd485
    customer called test
    pnf called MME-0001
    generic-vnf called d9b1b05f-44c8-45ef-89aa-d27ad060ceb4