addtional info to be added for audit info
[vid.git] / docs / instantiate.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0
2    International License.
3 .. http://creativecommons.org/licenses/by/4.0
4 .. _instantiate:
5
6 Instantiate Service, VNF, VF modules and Network
7 ================================================
8
9
10 Overview
11 --------
12
13 Using VID with A-La-Carte method means that the user needs to performed
14 by himself the instantiation of each object  : service, VNF(s), VF module(s),
15 network(s).
16
17 ONAP to VIM interactions will occurs when instantiating/deleting VF module(s)
18 or Network(s). In case of an Openstack VIM, Heat Stack(s) will
19 be created/deleted.
20
21 In the following description, the service model in SDC was composed of 1 VF
22 and 1 Virtual Link (Generic Neutron Network)
23
24 To be able to instantiate VF-module or Network object, some data need to be
25 declared in ONAP SDNC using SDNC Rest API. It is the place where to put
26 the instance specific values such as an IP address value specific
27 to the VNF instance for example.
28
29 In VID, terminologies are sometimes different than in other components:
30
31 VNF in VID  = VF in SDC
32
33 Node instance = VF in SDC
34
35 Network = Virtual Link in SDC
36
37
38 Pre-requisites
39 --------------
40
41 pre-instantiation operations must have been performed in AAI and VID,
42 via Rest API, to declare some values for:
43
44 - Subscriber Name (= customer in AAI)
45 - Service Type or product family (= service subscription in AAI)
46 - Project
47 - Owning Entity
48 - Line Of Business
49 - Platform
50 - LCP Region (= CloudOwner/RegionId in AAI)
51 - Tenant
52
53 see, in the ONAP User Guides, section about adding a CloudSite
54 and section about pre-instantiation Operations
55
56
57 Access to VID portal
58 --------------------
59
60 .. figure:: images/onap-portal.png
61    :align: center
62
63 Select the VID icon
64
65 .. figure:: images/vid-icon-on-portal.png
66    :align: center
67
68
69 Here after, the VID Home page starts
70
71 .. figure:: images/home.png
72    :align: center
73
74
75 SDNC API selection
76 ------------------
77
78 Select the API for "A-la-carte"
79
80 There are two choices:
81
82 - VNF_API (old) : VID will use the (old) "VNF" SDNC API
83   to get/check some parameters
84 - GR_API (new) : VID will use the "Generic Resource"
85   SDNC API to get/check some parameters
86
87 .. figure:: images/API_selection.png
88    :align: center
89
90
91
92 Instantiate Service
93 -------------------
94
95 Click Browse SDC Service Models and search for the service to instantiate.
96
97 The view show only service models in the DISTRIBUTED state.
98
99 .. figure:: images/browse-service-models.png
100    :align: center
101
102
103 Select a service and click Deploy.
104
105 A dialog box displays.
106
107 Complete the fields indicated by the red star and click Confirm.
108
109 .. figure:: images/create-service-instance-alacarte.png
110    :align: center
111
112 A status ox appears that shows the ONAP SO instantiation progress
113 as well as any messages associated with the process.
114
115 .. figure:: images/create-service-instance-alacarte-success.png
116    :align: center
117
118 A Service object is created in ONAP.
119
120 Click Close and next screen should appear.
121 It will allow to declare VNF(s) and Network(s)
122 that are part of the service model composition.
123
124 .. figure:: images/create-service-instance-alacarte-VNF-network.png
125    :align: center
126
127
128 Instantiate a VNF
129 -----------------
130
131 From previous screen, it is possible to declare a VNF: click on
132 "Add node instance" and select the VNF you want to instantiate in the list
133
134 The  following screen should appear:
135
136 .. figure:: images/create-vnf-instance-alacarte.png
137    :align: center
138
139 Complete the fields indicated by the red star and click Confirm.
140
141 A VNF object will be declared in ONAP.
142
143 Once, ONAP SO process is finished, click on close button.
144
145 The following screen then should appear:
146
147
148 .. figure:: images/create-service-instance-alacarte-after-vnf-instantiated.png
149    :align: center
150
151
152 Warning: a this step, no VNF instance (e.g. VM) is created on the Cloud Platform.
153
154 Click on "i" blue button to obtain VNF instance display information.
155
156 From this screen, it will be possible to get:
157
158 - the service instance id value
159 - the VNF Type value
160
161 Those information will be necessary for the "SDNC preload" step
162 to instantiate the VF module
163
164 Close that screen
165
166
167 Instantiate VF Module
168 ---------------------
169
170 It is now possible to declare a VF Module: click on
171 "Add VF-Module" and select the VF-module you want to instantiate in the list
172
173 The  following screen should appear:
174
175 .. figure:: images/create-vfmodule-instance-alacarte.png
176    :align: center
177
178 From this screen, it will be possible to get:
179
180 - "Model Name" value
181
182 At this step, with this "A-La-Carte" method, it is necessary to declare
183 some information in ONAP SDNC.
184
185 SDNC needs to be aware about the VNF before trying to use ONAP SO
186 to instantiate the VF-module.
187
188 This group of data is usually called "SDNC preload" and will contain:
189
190 - vf-module instance Name
191 - vnf instance Name
192 - service instance id
193 - the list of vnf parameters with values, when not using the default values
194
195 Here is an example of SDNC preload for VNF, using "curl" tool
196 to push those data using SDNC Rest API:
197
198 ::
199
200     curl -X POST \
201     https://sdnc.api.simpledemo.onap.org:30267/restconf/operations/VNF-API:preload-vnf-topology-operation \
202     -H 'Accept: application/json' \
203     -H 'Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==' \
204     -H 'Content-Type: application/json' \
205     -H 'X-FromAppId: API client' \
206     -H 'X-TransactionId: 0a3f6713-ba96-4971-a6f8-c2da85a3176e' \
207     -H 'cache-control: no-cache' \
208     -d '{
209         "input": {
210             "request-information": {
211                 "notification-url": "onap.org",
212                 "order-number": "1",
213                 "order-version": "1",
214                 "request-action": "PreloadVNFRequest",
215                 "request-id": "test"
216             },
217             "sdnc-request-header": {
218                 "svc-action": "reserve",
219                 "svc-notification-url": "http:\/\/onap.org:8080\/adapters\/rest\/SDNCNotify",
220                 "svc-request-id": "test"
221             },
222             "vnf-topology-information": {
223                 "vnf-assignments": {
224                     "availability-zones": [],
225                     "vnf-networks": [],
226                     "vnf-vms": []
227                 },
228                 "vnf-parameters": [
229                     {
230                         "vnf-parameter-name": "oam_net_id",
231                         "vnf-parameter-value": "oam_network_tXWW"
232                     }
233                 ],
234                 "vnf-topology-identifier": {
235                     "generic-vnf-name": "my-vnf-instance-01",
236                     "generic-vnf-type": "Service-model-with-VNF-and-Virtual-Link/FreeRadius_VF 0",
237                     "service-type": "09f9ffad-1069-43fa-97e8-da7b9a439601",
238                     "vnf-name": "my_vf_module-instance-01",
239                     "vnf-type": "FreeradiusVf..base_freeRadius..module-0"
240                 }
241             }
242         }
243     }'
244
245
246 Data mapping between ONAP SDNC terminology and ONAP SO
247
248 - "generic-vnf-name" value must be equal to the VNF instance name value
249   (see VNF instance detail screen)
250 - "generic-vnf-type" value must be equal to VNF Type value
251   (see VNF instance detail screen)
252 - "service-type" value must be equal to the service instance id value
253   (see VNF instance detail screen)
254 - "vnf-name" value must be equal to the VF module instance name value
255 - "vnf-type" value must be equal to the "Model Name" value
256   (see create VF module screen)
257
258
259 If there is a need for an instance specific value
260 of a VNF parameter (for example : an OAM network id value,
261 specific to this VNF instance),
262 the "vnf-parameters" must be completed with a list of name/value.
263
264 Once the "SDNC preload" is completed, send it to SDNC using any Rest API Tool.
265
266 Then, continue on VID and complete the fields indicated by the red star
267 and click "Confirm".
268
269 Warning : be very careful to use exactly the same VF module instance name
270 on this screen and in the "SDNC preload"
271
272 Wait for success and close the popup screen.
273
274 The following screen should appear:
275
276 .. figure:: images/create-service-instance-alacarte-after-vfmodule-instantiated.png
277    :align: center
278
279 At that point, the VNF is now instantiated in the cloud platform.
280
281
282 Instantiate Network
283 -------------------
284
285 Instantiating a network is quite similar to vf-module instantiation
286 (there is also the need for a "SDNC preload")
287
288 Click on "Add Network" and select the Network you want
289 to instantiate in the list
290
291 The  following screen should appear:
292
293 .. figure:: images/create-network-instance-alacarte.png
294    :align: center
295
296
297 Prepare the "SDNC preload" with:
298
299 - "network-role": provide any value,
300 - "network-technology": use "neutron" as this example will instantiate
301   a network using openstack neutron application
302 - "service-type": value must be equal to "Service Name"
303   (=service model name) displayed on VID screen
304 - "network-name": value must be equal to the desired network instance name,
305 - "network-type": value must be equal to "Model Name""Generic NeutronNet"
306   displayed on VID screen
307
308 In addition:
309
310 - in "provider-network-information" section, it is possible to indicate
311   some network characteristics
312 - it is possible to add a section about "subnets"
313
314 Here after, an "SDNC preload" example that can be use for Network
315 instantiation.
316
317 ::
318
319     curl -X POST \
320     http://sdnc.api.simpledemo.onap.org:30202/restconf/operations/VNF-API:preload-network-topology-operation \
321     -H 'Accept: application/json' \
322     -H 'Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==' \
323     -H 'Content-Type: application/json' \
324     -H 'X-FromAppId: API client' \
325     -H 'X-TransactionId: 0a3f6713-ba96-4971-a6f8-c2da85a3176e' \
326     -H 'cache-control: no-cache' \
327     -d '{
328     "input": {
329         "request-information": {
330         "request-id": "postman001",
331         "notification-url": "http://so.onap.org",
332         "order-number": "postman001",
333         "request-sub-action": "SUPP",
334         "request-action": "PreloadNetworkRequest",
335         "source": "postman",
336         "order-version": "1.0"
337         },
338         "network-topology-information": {
339         "network-policy": [],
340         "route-table-reference": [],
341         "vpn-bindings": [],
342         "network-topology-identifier": {
343             "network-role": "integration_test_net",
344             "network-technology": "neutron",
345             "service-type": "Service-model-with-VNF-and-Virtual-Link",
346             "network-name": "my-network-instance-001",
347             "network-type": "Generic NeutronNet"
348         },
349         "provider-network-information": {
350             "is-external-network": "false",
351             "is-provider-network": "false",
352             "is-shared-network": "false"
353         },
354         "subnets": [
355             {
356             "subnet-name": "my-sub_network-instance-001",
357             "subnet-role": "OAM",
358             "start-address": "192.168.90.0",
359             "cidr-mask": "24",
360             "ip-version": "4",
361             "dhcp-enabled": "Y",
362             "dhcp-start-address": "",
363             "dhcp-end-address": "",
364             "gateway-address": "192.168.90.1",
365             "host-routes":[]
366             }
367                 ]
368         },
369         "sdnc-request-header": {
370         "svc-action": "reserve",
371         "svc-notification-url": "http://so.onap.org",
372         "svc-request-id": "postman001"
373         }
374     }
375     }
376     '
377
378 Once the "SDNC preload" is completed, send it to SDNC using any Rest API Tool.
379
380 Then, continue on VID and complete the fields indicated by the red star
381 and click "Confirm".
382
383 Warning : be very careful to use exactly the same network instance name
384 on this screen and in the "SDNC preload"
385
386 Wait for success and close the popup screen.
387
388 The  following screen should appear:
389
390 .. figure:: images/create-network-instance-alacarte-after-instantiated.png
391    :align: center
392
393 At that point, the Network and subnets are now instantiated
394 in the cloud platform.
395
396 Also, all those network information are available in ONAP AAI,
397 under the terminology
398 "l3-network", with the "neutron-network-id" and the "neutron-subnet-id"
399 provided by
400 the openstack platform.
401
402
403 Deleting Network, VF module, VNF, Service
404 -----------------------------------------
405
406 To delete a service instance using VID, it is necessary to delete objects
407 in the following sequence:
408
409 - delete VF module(s)
410 - delete VNF instance(s)
411 - delete Network(s)
412 - delete service instance
413
414 To proceed those deletion, from VID Home screen
415
416 - search for existing service instance
417 - edit/view the service instance you want to delete
418 - click on red button with white cross and confirm for each object