Merge "Document SDNC https port 30267"
[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     https://sdnc.api.simpledemo.onap.org:30267/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                         "vnf-parameter-name": "oam_net_id",
230                         "vnf-parameter-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 Data mapping between ONAP SDNC terminology and ONAP SO
246
247 - "generic-vnf-name" value must be equal to the VNF instance name value
248   (see VNF instance detail screen)
249 - "generic-vnf-type" value must be equal to VNF Type value
250   (see VNF instance detail screen)
251 - "service-type" value must be equal to the service instance id value
252   (see VNF instance detail screen)
253 - "vnf-name" value must be equal to the VF module instance name value
254 - "vnf-type" value must be equal to the "Model Name" value
255   (see create VF module screen)
256
257
258 If there is a need for an instance specific value
259 of a VNF parameter (for example : an OAM network id value,
260 specific to this VNF instance),
261 the "vnf-parameters" must be completed with a list of name/value.
262
263 Once the "SDNC preload" is completed, send it to SDNC using any Rest API Tool.
264
265 Then, continue on VID and complete the fields indicated by the red star
266 and click "Confirm".
267
268 Warning : be very careful to use exactly the same VF module instance name
269 on this screen and in the "SDNC preload"
270
271 Wait for success and close the popup screen.
272
273 The following screen should appear:
274
275 .. figure:: images/create-service-instance-alacarte-after-vfmodule-instantiated.png
276    :align: center
277
278 At that point, the VNF is now instantiated in the cloud platform.
279
280
281 Instantiate Network
282 -------------------
283
284 Instantiating a network is quite similar to vf-module instantiation
285 (there is also the need for a "SDNC preload")
286
287 Click on "Add Network" and select the Network you want
288 to instantiate in the list
289
290 The  following screen should appear:
291
292 .. figure:: images/create-network-instance-alacarte.png
293    :align: center
294
295
296 Prepare the "SDNC preload" with:
297
298 - "network-role": provide any value,
299 - "network-technology": use "neutron" as this example will instantiate
300   a network using openstack neutron application
301 - "service-type": value must be equal to "Service Name"
302   (=service model name) displayed on VID screen
303 - "network-name": value must be equal to the desired network instance name,
304 - "network-type": value must be equal to "Model Name""Generic NeutronNet"
305   displayed on VID screen
306
307 In addition:
308
309 - in "provider-network-information" section, it is possible to indicate
310   some network characteristics
311 - it is possible to add a section about "subnets"
312
313 Here after, an "SDNC preload" example that can be use for Network
314 instantiation.
315
316 ::
317
318     curl -X POST \
319     http://sdnc.api.simpledemo.onap.org:30202/restconf/operations/VNF-API:preload-network-topology-operation \
320     -H 'Accept: application/json' \
321     -H 'Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==' \
322     -H 'Content-Type: application/json' \
323     -H 'X-FromAppId: API client' \
324     -H 'X-TransactionId: 0a3f6713-ba96-4971-a6f8-c2da85a3176e' \
325     -H 'cache-control: no-cache' \
326     -d '{
327     "input": {
328         "request-information": {
329         "request-id": "postman001",
330         "notification-url": "http://so.onap.org",
331         "order-number": "postman001",
332         "request-sub-action": "SUPP",
333         "request-action": "PreloadNetworkRequest",
334         "source": "postman",
335         "order-version": "1.0"
336         },
337         "network-topology-information": {
338         "network-policy": [],
339         "route-table-reference": [],
340         "vpn-bindings": [],
341         "network-topology-identifier": {
342             "network-role": "integration_test_net",
343             "network-technology": "neutron",
344             "service-type": "Service-model-with-VNF-and-Virtual-Link",
345             "network-name": "my-network-instance-001",
346             "network-type": "Generic NeutronNet"
347         },
348         "provider-network-information": {
349             "is-external-network": "false",
350             "is-provider-network": "false",
351             "is-shared-network": "false"
352         },
353         "subnets": [
354             {
355             "subnet-name": "my-sub_network-instance-001",
356             "subnet-role": "OAM",
357             "start-address": "192.168.90.0",
358             "cidr-mask": "24",
359             "ip-version": "4",
360             "dhcp-enabled": "Y",
361             "dhcp-start-address": "",
362             "dhcp-end-address": "",
363             "gateway-address": "192.168.90.1",
364             "host-routes":[]
365             }
366                 ]
367         },
368         "sdnc-request-header": {
369         "svc-action": "reserve",
370         "svc-notification-url": "http://so.onap.org",
371         "svc-request-id": "postman001"
372         }
373     }
374     }
375     '
376
377 Once the "SDNC preload" is completed, send it to SDNC using any Rest API Tool.
378
379 Then, continue on VID and complete the fields indicated by the red star
380 and click "Confirm".
381
382 Warning : be very careful to use exactly the same network instance name
383 on this screen and in the "SDNC preload"
384
385 Wait for success and close the popup screen.
386
387 The  following screen should appear:
388
389 .. figure:: images/create-network-instance-alacarte-after-instantiated.png
390    :align: center
391
392 At that point, the Network and subnets are now instantiated
393 in the cloud platform.
394
395 Also, all those network information are available in ONAP AAI,
396 under the terminology
397 "l3-network", with the "neutron-network-id" and the "neutron-subnet-id"
398 provided by
399 the openstack platform.
400
401
402 Deleting Network, VF module, VNF, Service
403 -----------------------------------------
404
405 To delete a service instance using VID, it is necessary to delete objects
406 in the following sequence:
407
408 - delete VF module(s)
409 - delete VNF instance(s)
410 - delete Network(s)
411 - delete service instance
412
413 To proceed those deletion, from VID Home screen
414
415 - search for existing service instance
416 - edit/view the service instance you want to delete
417 - click on red button with white cross and confirm for each object