Merge "Bump VID version to 5.0.2"
[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
5 Instantiate Service, VNF, VF modules and Network
6 ================================================
7
8
9 Overview
10 --------
11
12 Using VID with A-La-Carte method means that the user needs to performed
13 by himself the instantiation of each object  : service, VNF(s), VF module(s),
14 network(s).
15
16 ONAP to VIM interactions will occurs when instantiating/deleting VF module(s)
17 or Network(s). In case of an Openstack VIM, Heat Stack(s) will
18 be created/deleted.
19
20 In the following description, the service model in SDC was composed of 1 VF
21 and 1 Virtual Link (Generic Neutron Network)
22
23 To be able to instantiate VF-module or Network object, some data need to be
24 declared in ONAP SDNC using SDNC Rest API. It is the place where to put
25 the instance specific values such as an IP address value specific
26 to the VNF instance for example.
27
28 In VID, terminologies are sometimes different than in other components:
29
30 VNF in VID  = VF in SDC
31
32 Node instance = VF in SDC
33
34 Network = Virtual Link in SDC
35
36
37 Pre-requisites
38 --------------
39
40 pre-instantiation operations must have been performed in AAI and VID,
41 via Rest API, to declare some values for:
42
43 - Subscriber Name (= customer in AAI)
44 - Service Type or product family (= service subscription in AAI)
45 - Project
46 - Owning Entity
47 - Line Of Business
48 - Platform
49 - LCP Region (= CloudOwner/RegionId in AAI)
50 - Tenant
51
52 see, in the ONAP User Guides, section about adding a CloudSite
53 and section about pre-instantiation Operations
54
55
56 Access to VID portal
57 --------------------
58
59 .. figure:: images/onap-portal.png
60    :align: center
61
62 Select the VID icon
63
64 .. figure:: images/vid-icon-on-portal.png
65    :align: center
66
67
68 Here after, the VID Home page starts
69
70 .. figure:: images/home.png
71    :align: center
72
73
74 SDNC API selection
75 ------------------
76
77 Select the API for "A-la-carte"
78
79 There are two choices:
80
81 - VNF_API (old) : VID will use the (old) "VNF" SDNC API
82   to get/check some parameters
83 - GR_API (new) : VID will use the "Generic Resource"
84   SDNC API to get/check some parameters
85
86 .. figure:: images/API_selection.png
87    :align: center
88
89
90
91 Instantiate Service
92 -------------------
93
94 Click Browse SDC Service Models and search for the service to instantiate.
95
96 The view show only service models in the DISTRIBUTED state.
97
98 .. figure:: images/browse-service-models.png
99    :align: center
100
101
102 Select a service and click Deploy.
103
104 A dialog box displays.
105
106 Complete the fields indicated by the red star and click Confirm.
107
108 .. figure:: images/create-service-instance-alacarte.png
109    :align: center
110
111 A status ox appears that shows the ONAP SO instantiation progress
112 as well as any messages associated with the process.
113
114 .. figure:: images/create-service-instance-alacarte-success.png
115    :align: center
116
117 A Service object is created in ONAP.
118
119 Click Close and next screen should appear.
120 It will allow to declare VNF(s) and Network(s)
121 that are part of the service model composition.
122
123 .. figure:: images/create-service-instance-alacarte-VNF-network.png
124    :align: center
125
126
127 Instantiate a VNF
128 -----------------
129
130 From previous screen, it is possible to declare a VNF: click on
131 "Add node instance" and select the VNF you want to instantiate in the list
132
133 The  following screen should appear:
134
135 .. figure:: images/create-vnf-instance-alacarte.png
136    :align: center
137
138 Complete the fields indicated by the red star and click Confirm.
139
140 A VNF object will be declared in ONAP.
141
142 Once, ONAP SO process is finished, click on close button.
143
144 The following screen then should appear:
145
146
147 .. figure:: images/create-service-instance-alacarte-after-vnf-instantiated.png
148    :align: center
149
150
151 Warning: a this step, no VNF instance (e.g. VM) is created on the Cloud Platform.
152
153 Click on "i" blue button to obtain VNF instance display information.
154
155 From this screen, it will be possible to get:
156
157 - the service instance id value
158 - the VNF Type value
159
160 Those information will be necessary for the "SDNC preload" step
161 to instantiate the VF module
162
163 Close that screen
164
165
166 Instantiate VF Module
167 ---------------------
168
169 It is now possible to declare a VF Module: click on
170 "Add VF-Module" and select the VF-module you want to instantiate in the list
171
172 The  following screen should appear:
173
174 .. figure:: images/create-vfmodule-instance-alacarte.png
175    :align: center
176
177 From this screen, it will be possible to get:
178
179 - "Model Name" value
180
181 At this step, with this "A-La-Carte" method, it is necessary to declare
182 some information in ONAP SDNC.
183
184 SDNC needs to be aware about the VNF before trying to use ONAP SO
185 to instantiate the VF-module.
186
187 This group of data is usually called "SDNC preload" and will contain:
188
189 - vf-module instance Name
190 - vnf instance Name
191 - service instance id
192 - the list of vnf parameters with values, when not using the default values
193
194 Here is an example of SDNC preload for VNF, using "curl" tool
195 to push those data using SDNC Rest API:
196
197 ::
198
199     curl -X POST \
200     http://sdnc.api.simpledemo.onap.org:30202/restconf/operations/VNF-API:preload-vnf-topology-operation \
201     -H 'Accept: application/json' \
202     -H 'Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==' \
203     -H 'Content-Type: application/json' \
204     -H 'X-FromAppId: API client' \
205     -H 'X-TransactionId: 0a3f6713-ba96-4971-a6f8-c2da85a3176e' \
206     -H 'cache-control: no-cache' \
207     -d '{
208         "input": {
209             "request-information": {
210                 "notification-url": "onap.org",
211                 "order-number": "1",
212                 "order-version": "1",
213                 "request-action": "PreloadVNFRequest",
214                 "request-id": "test"
215             },
216             "sdnc-request-header": {
217                 "svc-action": "reserve",
218                 "svc-notification-url": "http:\/\/onap.org:8080\/adapters\/rest\/SDNCNotify",
219                 "svc-request-id": "test"
220             },
221             "vnf-topology-information": {
222                 "vnf-assignments": {
223                     "availability-zones": [],
224                     "vnf-networks": [],
225                     "vnf-vms": []
226                 },
227                 "vnf-parameters": [
228                     {
229                         "name": "oam_net_id",
230                         "value": "oam_network_tXWW"
231                     }
232                 ],
233                 "vnf-topology-identifier": {
234                     "generic-vnf-name": "my-vnf-instance-01",
235                     "generic-vnf-type": "Service-model-with-VNF-and-Virtual-Link/FreeRadius_VF 0",
236                     "service-type": "09f9ffad-1069-43fa-97e8-da7b9a439601",
237                     "vnf-name": "my_vf_module-instance-01",
238                     "vnf-type": "FreeradiusVf..base_freeRadius..module-0"
239                 }
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