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, you need to send several requests,
12 depending on the service model composition.
14 For example, if your service model is composed of 2 VNF and a Network,
15 you will have to build and send :
17 * a request to SO to create the "service instance" object
18 * a request to SO to create the VNF 1 instance object
19 * a request to SDNC to declare VNF 1 instance parameters and values
21 * a request to SO to create the Vf-module 1 instance object
22 * a request to SO to create the VNF 2 instance object
23 * a request to SDNC to declare VNF 2 instance parameters and values
25 * a request to SO to create the Vf-module 2 instance object
26 * a request to SO to create the Network instance object
30 Example to request a service instance directly to ONAP SO
37 In the response, you will obtain the serviceOrderId value.
39 Then you have the possibility to check about the SO request
40 (here after the requestId=e3ad8df6-ea0d-4384-be95-bcb7dd39bbde).
42 This will allow you to get the serviceOrder Status (completed, failed...)
47 http://so.api.simpledemo.onap.org:30277/onap/so/infra/orchestrationRequests/v6/e3ad8df6-ea0d-4384-be95-bcb7dd39bbde \
48 -H 'Accept: application/json' \
49 -H 'Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==' \
50 -H 'Content-Type: application/json' \
51 -H 'X-FromAppId: AAI' \
52 -H 'X-TransactionId: get_aai_subscr' \
53 -H 'cache-control: no-cache'
56 To instantiate a VNF, you need to build a complex request.
57 All necessary parameters are available in the Tosca service template
58 generated by SDC when you defined your service model.
63 http://so.api.simpledemo.onap.org:30277/onap/so/infra/serviceInstances/v6/95762b50-0244-4723-8fde-35f911db9263/vnfs \
64 -H 'Accept: application/json' \
65 -H 'Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==' \
66 -H 'Content-Type: application/json' \
67 -H 'X-FromAppId: AAI' \
68 -H 'X-TransactionId: get_aai_subscr' \
69 -H 'cache-control: no-cache' \
73 "productFamilyId": "0d463b0c-e559-4def-8d7b-df64cfbd3159",
74 "instanceName": "my_service_vnf_instance_001",
76 "suppressRollback": false,
81 "modelInvariantId": "4e66bb92-c597-439e-822d-75aaa69b13d4",
82 "modelVersionId": "3b6ba59c-287c-449e-a1da-2db49984a087",
83 "modelName": "my_service_VF",
84 "modelVersion": "1.0",
85 "modelCustomizationId": "",
86 "modelCustomizationName": ""
88 "requestParameters": {
93 "cloudConfiguration": {
94 "lcpCloudRegionId": "my_cloud_site",
95 "tenantId": "5906b9b8fd9642df9ba1c9e290063439"
98 "lineOfBusinessName": "test_LOB"
101 "platformName": "test_platform"
103 "relatedInstanceList": [{
105 "instanceId": "95762b50-0244-4723-8fde-35f911db9263",
107 "modelType": "service",
108 "modelName": "my-service-model",
109 "modelInvariantId": "11265d8c-2cc2-40e5-95d8-57cad81c18da",
110 "modelVersion": "1.0",
111 "modelVersionId": "0d463b0c-e559-4def-8d7b-df64cfbd3159"
118 To instantiate a VF module, you need to build two complex requests
119 All necessary parameters are available in the Tosca service template
120 generated by SDC when you defined your service model.
122 1st request is called a "SDNC-preload" for a VNF object and is used
123 to store in SDNC some VNF parameters values
124 that will be needed for the instantiation
129 http://sdnc.api.simpledemo.onap.org:30202/restconf/operations/VNF-API:preload-vnf-topology-operation \
130 -H 'Accept: application/json' \
131 -H 'Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==' \
132 -H 'Content-Type: application/json' \
133 -H 'X-FromAppId: API client' \
134 -H 'X-TransactionId: 0a3f6713-ba96-4971-a6f8-c2da85a3176e' \
135 -H 'cache-control: no-cache' \
138 "request-information": {
139 "notification-url": "onap.org",
141 "order-version": "1",
142 "request-action": "PreloadVNFRequest",
145 "sdnc-request-header": {
146 "svc-action": "reserve",
147 "svc-notification-url": "http:\/\/onap.org:8080\/adapters\/rest\/SDNCNotify",
148 "svc-request-id": "test"
150 "vnf-topology-information": {
152 "availability-zones": [],
156 "vnf-parameters": [],
157 "vnf-topology-identifier": {
158 "generic-vnf-name": "my_service_vnf_instance_001",
159 "generic-vnf-type": "",
160 "service-type": "95762b50-0244-4723-8fde-35f911db9263",
161 "vnf-name": "my_service_vfmodule_001",
168 The 2nd request is to instantiate the VF module via ONAP SO
169 (instance name must be identical in both requests)
174 http://so.api.simpledemo.onap.org:30277/onap/so/infra/serviceInstances/v6/95762b50-0244-4723-8fde-35f911db9263/vnfs/vfModules \
175 -H 'Accept: application/json' \
176 -H 'Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==' \
177 -H 'Content-Type: application/json' \
178 -H 'X-FromAppId: AAI' \
179 -H 'X-TransactionId: get_aai_subscr' \
180 -H 'cache-control: no-cache' \
184 "instanceName": "my_vfmodule_001",
186 "suppressRollback": false,
187 "requestorId": "test"
190 "modelType": "vfModule",
191 "modelInvariantId": "",
192 "modelVersionId": "",
195 "modelCustomizationId": "",
196 "modelCustomizationName": ""
198 "requestParameters": {
200 "testApi": "VNF_API",
203 "cloudConfiguration": {
204 "lcpCloudRegionId": "my_cloud_site",
205 "tenantId": "5906b9b8fd9642df9ba1c9e290063439"
207 "relatedInstanceList": [{
209 "instanceId": "95762b50-0244-4723-8fde-35f911db9263",
211 "modelType": "service",
212 "modelName": "my-service-model",
213 "modelInvariantId": "11265d8c-2cc2-40e5-95d8-57cad81c18da",
214 "modelVersion": "1.0",
215 "modelVersionId": "0d463b0c-e559-4def-8d7b-df64cfbd3159"
224 "modelName": "my_service_model_VF",
225 "modelInvariantId": "4e66bb92-c597-439e-822d-75aaa69b13d4",
226 "modelVersion": "1.0",
227 "modelVersionId": "3b6ba59c-287c-449e-a1da-2db49984a087",
228 "modelCustomizationId": "",
229 "modelCustomizationName": ""
238 To instantiate a Neutron Network, you need to build two complex request.
239 All necessary parameters are available in the Tosca service template
240 generated by SDC when you defined your service model.
243 1st request is the "SDNC-preload" for a network object:
248 http://sdnc.api.simpledemo.onap.org:30202/restconf/operations/VNF-API:preload-network-topology-operation \
249 -H 'Accept: application/json' \
250 -H 'Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==' \
251 -H 'Content-Type: application/json' \
252 -H 'X-FromAppId: API client' \
253 -H 'X-TransactionId: 0a3f6713-ba96-4971-a6f8-c2da85a3176e' \
254 -H 'cache-control: no-cache' \
257 "request-information": {
258 "request-id": "postman001",
259 "notification-url": "http://so.onap.org",
260 "order-number": "postman001",
261 "request-sub-action": "SUPP",
262 "request-action": "PreloadNetworkRequest",
264 "order-version": "1.0"
266 "network-topology-information": {
267 "network-policy": [],
268 "route-table-reference": [],
270 "network-topology-identifier": {
271 "network-role": "integration_test_net",
272 "network-technology": "neutron",
273 "service-type": "my-service-2",
274 "network-name": "my_network_01",
275 "network-type": "Generic NeutronNet"
277 "provider-network-information": {
278 "is-external-network": "false",
279 "is-provider-network": "false",
280 "is-shared-network": "false"
284 "subnet-name": "my_subnet_01",
285 "subnet-role": "OAM",
286 "start-address": "192.168.90.0",
290 "dhcp-start-address": "",
291 "dhcp-end-address": "",
292 "gateway-address": "192.168.90.1",
297 "sdnc-request-header": {
298 "svc-action": "reserve",
299 "svc-notification-url": "http://so.onap.org",
300 "svc-request-id": "postman001"
306 2nd request is to instantiate the network via ONAP SO
307 (instance name must be identical in both requests)
313 http://so.api.simpledemo.onap.org:30277/onap/so/infra/serviceInstances/v6/95762b50-0244-4723-8fde-35f911db9263/networks \
314 -H 'Accept: application/json' \
315 -H 'Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==' \
316 -H 'Content-Type: application/json' \
317 -H 'X-FromAppId: AAI' \
318 -H 'X-TransactionId: get_aai_subscr' \
319 -H 'cache-control: no-cache' \
323 "instanceName": "my_network_01",
325 "suppressRollback": false,
326 "requestorId": "demo",
327 "productFamilyId": "b9ac88f7-0e1b-462d-84ac-74c3c533217c"
330 "modelType": "network",
331 "modelInvariantId": "0070b65c-48cb-4985-b4df-7c67ca99cd95",
332 "modelVersionId": "4f738bed-e804-4765-8d22-07bb4d11f14b",
333 "modelName": "Generic NeutronNet",
334 "modelVersion": "1.0",
335 "modelCustomizationId": "95534a95-dc8d-4ffb-89c7-091e2c49b55d",
336 "modelCustomizationName": "Generic NeutronNet 0"
338 "requestParameters": {
343 "cloudConfiguration": {
344 "lcpCloudRegionId": "my_cloud_site",
345 "tenantId": "5906b9b8fd9642df9ba1c9e290063439"
348 "lineOfBusinessName": "Test_LOB"
351 "platformName": "Test_platform"
353 "relatedInstanceList": [{
355 "instanceId": "95762b50-0244-4723-8fde-35f911db9263",
357 "modelType": "service",
358 "modelName": "my_service_model_name",
359 "modelInvariantId": "11265d8c-2cc2-40e5-95d8-57cad81c18da",
360 "modelVersion": "1.0",
361 "modelVersionId": "0d463b0c-e559-4def-8d7b-df64cfbd3159"