1 .. This work is licensed under a Creative Commons Attribution 4.0
2 .. International License. http://creativecommons.org/licenses/by/4.0
3 .. Copyright 2019 ONAP Contributors. All rights reserved.
5 .. _doc_guide_user_ser_inst_so1:
8 A La Carte mode Service Instantiation via ONAP SO API
9 =====================================================
11 Using ONAP SO API in "A La Carte" mode, the user needs to send
12 a request to instantiate the service object but also for each VNF/VF-module
13 and network that compose the Service.
15 ONAP will instantiate resources on Cloud platforms only when user is requesting
16 to instantiate VF-module or Network (openstack neutron or contrail).
18 To instantiate a VF-module, it is required to have instantiated a VNF object.
20 To instantiate a VNF object, it is required to have instantiated
23 To instantiate a Network object, it is required to have instantiated
27 * `Request to instantiate Service object`_
28 * `Request to instantiate VNF object`_
29 * `Requests to instantiate VF-module object`_
30 * `Requests to instantiate Neutron Network object`_
31 * `Requests to instantiate a Contrail Network object`_
34 Request to instantiate Service object
35 -------------------------------------
37 Example to request a service instance directly to ONAP SO
42 http://so.api.simpledemo.onap.org:30277/onap/so/infra/serviceInstances/v7/serviceInstances \
43 -H 'Accept: application/json' \
44 -H 'Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==' \
45 -H 'Content-Type: application/json' \
46 -H 'X-FromAppId: AAI' \
47 -H 'X-TransactionId: get_aai_subscr' \
48 -H 'cache-control: no-cache' \
52 "instanceName": "integration_test_service_instance_001",
54 "suppressRollback": false,
58 "modelType": "service",
59 "modelInvariantId": "b0631a6c-ec7a-4f0c-a9ac-4423d9d67a7f",
60 "modelVersionId": "aafd5523-2cc5-4c86-957e-18bc37355f7a",
61 "modelName": "integration_test_ubuntu16",
64 "cloudConfiguration": {
65 "tenantId": "3e3b55ca4c9948d1a9fa68715831c6bd",
66 "cloudOwner": "OPNFV",
67 "lcpCloudRegionId": "RegionOne"
69 "requestParameters": {
72 "subscriptionServiceType": "integration_test_ubuntu16",
76 "globalSubscriberId": "integration_test_customer"
79 "projectName": "integration_test_project"
82 "owningEntityId": "6b5b6b70-4e9a-4f6f-8b7b-cbd7cf990c6e",
83 "owningEntityName": "integration_test_OE"
90 In the response, you will obtain the serviceOrderId value.
92 Then you have the possibility to check about the SO request
93 (here after the requestId=e3ad8df6-ea0d-4384-be95-bcb7dd39bbde).
95 This will allow you to get the serviceOrder Status (completed, failed...)
100 http://so.api.simpledemo.onap.org:30277/onap/so/infra/orchestrationRequests/v6/e3ad8df6-ea0d-4384-be95-bcb7dd39bbde \
101 -H 'Accept: application/json' \
102 -H 'Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==' \
103 -H 'Content-Type: application/json' \
104 -H 'X-FromAppId: AAI' \
105 -H 'X-TransactionId: get_aai_subscr' \
106 -H 'cache-control: no-cache'
109 Request to instantiate VNF object
110 ---------------------------------
112 To instantiate a VNF, you need to build an other request.
113 All necessary parameters are available in the Tosca service template
114 generated by SDC when you defined your service model.
119 http://so.api.simpledemo.onap.org:30277/onap/so/infra/serviceInstances/v6/95762b50-0244-4723-8fde-35f911db9263/vnfs \
120 -H 'Accept: application/json' \
121 -H 'Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==' \
122 -H 'Content-Type: application/json' \
123 -H 'X-FromAppId: AAI' \
124 -H 'X-TransactionId: get_aai_subscr' \
125 -H 'cache-control: no-cache' \
129 "productFamilyId": "0d463b0c-e559-4def-8d7b-df64cfbd3159",
130 "instanceName": "my_service_vnf_instance_001",
132 "suppressRollback": false,
133 "requestorId": "test"
137 "modelInvariantId": "4e66bb92-c597-439e-822d-75aaa69b13d4",
138 "modelVersionId": "3b6ba59c-287c-449e-a1da-2db49984a087",
139 "modelName": "my_service_VF",
140 "modelVersion": "1.0",
141 "modelCustomizationId": "",
142 "modelCustomizationName": ""
144 "requestParameters": {
149 "cloudConfiguration": {
150 "lcpCloudRegionId": "my_cloud_site",
151 "tenantId": "5906b9b8fd9642df9ba1c9e290063439"
154 "lineOfBusinessName": "test_LOB"
157 "platformName": "test_platform"
159 "relatedInstanceList": [{
161 "instanceId": "95762b50-0244-4723-8fde-35f911db9263",
163 "modelType": "service",
164 "modelName": "my-service-model",
165 "modelInvariantId": "11265d8c-2cc2-40e5-95d8-57cad81c18da",
166 "modelVersion": "1.0",
167 "modelVersionId": "0d463b0c-e559-4def-8d7b-df64cfbd3159"
175 Requests to instantiate VF-module object
176 ----------------------------------------
178 To instantiate a VF module, you need to build two complex requests
179 All necessary parameters are available in the Tosca service template
180 generated by SDC when you defined your service model.
182 1st request is called a "SDNC-preload" for a VNF object and is used
183 to store in SDNC some VNF parameters values
184 that will be needed for the instantiation
189 http://sdnc.api.simpledemo.onap.org:30202/restconf/operations/VNF-API:preload-vnf-topology-operation \
190 -H 'Accept: application/json' \
191 -H 'Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==' \
192 -H 'Content-Type: application/json' \
193 -H 'X-FromAppId: API client' \
194 -H 'X-TransactionId: 0a3f6713-ba96-4971-a6f8-c2da85a3176e' \
195 -H 'cache-control: no-cache' \
198 "request-information": {
199 "notification-url": "onap.org",
201 "order-version": "1",
202 "request-action": "PreloadVNFRequest",
205 "sdnc-request-header": {
206 "svc-action": "reserve",
207 "svc-notification-url": "http:\/\/onap.org:8080\/adapters\/rest\/SDNCNotify",
208 "svc-request-id": "test"
210 "vnf-topology-information": {
212 "availability-zones": [],
216 "vnf-parameters": [],
217 "vnf-topology-identifier": {
218 "generic-vnf-name": "my_service_vnf_instance_001",
219 "generic-vnf-type": "",
220 "service-type": "95762b50-0244-4723-8fde-35f911db9263",
221 "vnf-name": "my_service_vfmodule_001",
228 The 2nd request is to instantiate the VF module via ONAP SO
229 (instance name must be identical in both requests)
234 http://so.api.simpledemo.onap.org:30277/onap/so/infra/serviceInstances/v6/95762b50-0244-4723-8fde-35f911db9263/vnfs/vfModules \
235 -H 'Accept: application/json' \
236 -H 'Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==' \
237 -H 'Content-Type: application/json' \
238 -H 'X-FromAppId: AAI' \
239 -H 'X-TransactionId: get_aai_subscr' \
240 -H 'cache-control: no-cache' \
244 "instanceName": "my_vfmodule_001",
246 "suppressRollback": false,
247 "requestorId": "test"
250 "modelType": "vfModule",
251 "modelInvariantId": "",
252 "modelVersionId": "",
255 "modelCustomizationId": "",
256 "modelCustomizationName": ""
258 "requestParameters": {
260 "testApi": "VNF_API",
263 "cloudConfiguration": {
264 "lcpCloudRegionId": "my_cloud_site",
265 "tenantId": "5906b9b8fd9642df9ba1c9e290063439"
267 "relatedInstanceList": [{
269 "instanceId": "95762b50-0244-4723-8fde-35f911db9263",
271 "modelType": "service",
272 "modelName": "my-service-model",
273 "modelInvariantId": "11265d8c-2cc2-40e5-95d8-57cad81c18da",
274 "modelVersion": "1.0",
275 "modelVersionId": "0d463b0c-e559-4def-8d7b-df64cfbd3159"
284 "modelName": "my_service_model_VF",
285 "modelInvariantId": "4e66bb92-c597-439e-822d-75aaa69b13d4",
286 "modelVersion": "1.0",
287 "modelVersionId": "3b6ba59c-287c-449e-a1da-2db49984a087",
288 "modelCustomizationId": "",
289 "modelCustomizationName": ""
298 Requests to instantiate Neutron Network object
299 ----------------------------------------------
301 To instantiate a Neutron Network, you need to build two complex request.
302 All necessary parameters are available in the Tosca service template
303 generated by SDC when you defined your service model.
306 1st request is the "SDNC-preload" for a neutron network object:
311 http://sdnc.api.simpledemo.onap.org:30202/restconf/operations/VNF-API:preload-network-topology-operation \
312 -H 'Accept: application/json' \
313 -H 'Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==' \
314 -H 'Content-Type: application/json' \
315 -H 'X-FromAppId: API client' \
316 -H 'X-TransactionId: 0a3f6713-ba96-4971-a6f8-c2da85a3176e' \
317 -H 'cache-control: no-cache' \
320 "request-information": {
321 "request-id": "postman001",
322 "notification-url": "http://so.onap.org",
323 "order-number": "postman001",
324 "request-sub-action": "SUPP",
325 "request-action": "PreloadNetworkRequest",
327 "order-version": "1.0"
329 "network-topology-information": {
330 "network-policy": [],
331 "route-table-reference": [],
333 "network-topology-identifier": {
334 "network-role": "integration_test_net",
335 "network-technology": "neutron",
336 "service-type": "my-service-2",
337 "network-name": "my_network_01",
338 "network-type": "Generic NeutronNet"
340 "provider-network-information": {
341 "is-external-network": "false",
342 "is-provider-network": "false",
343 "is-shared-network": "false"
347 "subnet-name": "my_subnet_01",
348 "subnet-role": "OAM",
349 "start-address": "192.168.90.0",
353 "dhcp-start-address": "",
354 "dhcp-end-address": "",
355 "gateway-address": "192.168.90.1",
360 "sdnc-request-header": {
361 "svc-action": "reserve",
362 "svc-notification-url": "http://so.onap.org",
363 "svc-request-id": "postman001"
369 2nd request is to instantiate the neutron network via ONAP SO
370 (instance name must be identical in both requests)
376 http://so.api.simpledemo.onap.org:30277/onap/so/infra/serviceInstances/v6/95762b50-0244-4723-8fde-35f911db9263/networks \
377 -H 'Accept: application/json' \
378 -H 'Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==' \
379 -H 'Content-Type: application/json' \
380 -H 'X-FromAppId: AAI' \
381 -H 'X-TransactionId: get_aai_subscr' \
382 -H 'cache-control: no-cache' \
386 "instanceName": "my_network_01",
388 "suppressRollback": false,
389 "requestorId": "demo",
390 "productFamilyId": "b9ac88f7-0e1b-462d-84ac-74c3c533217c"
393 "modelType": "network",
394 "modelInvariantId": "0070b65c-48cb-4985-b4df-7c67ca99cd95",
395 "modelVersionId": "4f738bed-e804-4765-8d22-07bb4d11f14b",
396 "modelName": "Generic NeutronNet",
397 "modelVersion": "1.0",
398 "modelCustomizationId": "95534a95-dc8d-4ffb-89c7-091e2c49b55d",
399 "modelCustomizationName": "Generic NeutronNet 0"
401 "requestParameters": {
406 "cloudConfiguration": {
407 "lcpCloudRegionId": "my_cloud_site",
408 "tenantId": "5906b9b8fd9642df9ba1c9e290063439"
411 "lineOfBusinessName": "Test_LOB"
414 "platformName": "Test_platform"
416 "relatedInstanceList": [{
418 "instanceId": "95762b50-0244-4723-8fde-35f911db9263",
420 "modelType": "service",
421 "modelName": "my_service_model_name",
422 "modelInvariantId": "11265d8c-2cc2-40e5-95d8-57cad81c18da",
423 "modelVersion": "1.0",
424 "modelVersionId": "0d463b0c-e559-4def-8d7b-df64cfbd3159"
432 Requests to instantiate a Contrail Network object
433 -------------------------------------------------