1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. Copyright 2017 Huawei Technologies Co., Ltd.
5 CODE FLOWS OF BPMN-INFRA
6 ========================
8 API Handler is a SO Component. Every Rest API will first reach to the API Handler. Curl command which is mentioned below will directly hit to the E2EServiceInstances.java file of the API Handler component.
10 API HANDLER ( E2EServiceInstances.java )
11 ----------------------------------------
13 curl -v -H "Content-Type: application/json" -X POST --data @request_body_file_name.json -u mso_admin:password1$ http://localhost:8080/onap/so/infra/e2eServiceInstances/v3
21 "name":"SliceService",
22 "description":"SliceService",
23 "serviceInvariantUuid":"dfcd7471-16c7-444e-8268-d4c50d90593a",
24 "serviceUuid":"dfcd7471-16c7-444e-8268-d4c50d90593a",
25 "globalSubscriberId":"test_custormer",
28 "locationConstraints":[
33 "resourceName":"allottedResource",
34 "resourceInvariantUuid":"eeefcd86-7b5b-41ae-9516-08acc5d59d92",
35 "resourceUuid":"265da937-76c7-4152-98e3-5f0d0a844b7f",
36 "resourceCustomizationUuid":"a4eda1d9-1af4-424b-997f-12c57b74c67a",
38 "locationConstraints":[
50 "uEMobilityLevel": "stationary",
51 "areaTrafficCapDL": 123,
52 "maxNumberofUEs": 1000,
53 "expDataRateUL": 2000,
54 "plmnIdList": "39-00|39-01",
55 "areaTrafficCapUL": 456,
58 "coverageAreaTAList": 101001,
60 "resourceSharingLevel": "shared",
61 "nstar0_allottedresource0_providing_service_uuid": "4e8d930b-7483-4b9b-8c82-4708638ade4a",
62 "nstar0_allottedresource0_providing_service_invariant_uuid": "1899e5c1-df4e-43a8-a889-48c157dad7bc"
73 "serviceId": "ebe2d37f-f65b-43d8-8906-f81811ed8f22",
74 "operationId": "ed9b4c84-17db-4874-8896-25324a0401fe"
81 1. It reaches to the E2EServiceInstances.java file of API-Handeler infra project and Input json is mapped to the createE2EServiceInstance method
83 2. A unique request id is generated corresponding to every request and checked if request Id already exists in requestdb
84 InfraActiveReqest table
86 a. http://request-db-adapter:8083/infraActiveRequests/requestID (GET), which will return a 404 if not exists
87 b. createInstance is set to the action variable
89 3. Running local validations on input json.
91 4. Gets the orchestration url from the recipe table
93 a. Checks whether the service already exists in catalogdb http://catalog-db-adapter:8082/service/{modelNameVersionId}
96 b. Checks the service recipe table with the modelNameVersionId and the action to be perfomed http://catalog-db-
97 adapter:8082/serviceRecipe/search/findFirstByServiceModelUUIDAndAction?serviceModelUUID=
98 {modelNameVersionId}&action=createInstance . Returns a 404 if no recipe exists with the corresponding id.
100 c. As recipe corresponding to this doesnt exist, we try to get with a default value. This flow comes under default flow
101 so the defaultvalue is UUI_DEFAULT. First we get service with this value
102 http://catalog-db-adapter:8082/service/search/findFirstByModelNameOrderByModelVersionDesc?modelName=UUI_DEFAULT (GET) .
103 It returns a service with modelUUID as dfcd7471-16c7-444e-8268-d4c50d90593a, and further can be used to get the recipe
106 d. http://so-catalog-db-adapter.onap:8082/serviceRecipe/search/findFirstByServiceModelUUIDAndAction?
107 serviceModelUUID=dfcd7471-16c7-444e-8268-d4c50d90593a&action=createInstance gives a recipe which has a parameter
108 "orchestrationUri" as "/mso/async/services/CreateCustomE2EServiceInstance"
115 Hits CreateCustomE2EServiceInstances
117 Address: http://bpmn-infra:8081/mso/async/services/CreateCustomE2EServiceInstance
119 Payload will be reaching to bpmn in the form of:
129 "modelInvariantId": "699dd37d-c82f-4bd5-adec-856900fc2796",
130 "modelType": "service",
131 "modelNameVersionId": "0692e0c9-8913-41ca-893a-58626f4afff2",
132 "modelName": "voLTE",
133 "modelVersion": "1.0",
134 "modelVersionId": "0692e0c9-8913-41ca-893a-58626f4afff2",
135 "modelUuid": "0692e0c9-8913-41ca-893a-58626f4afff2",
136 "modelInvariantUuid": "699dd37d-c82f-4bd5-adec-856900fc2796"
140 "instanceName": "SliceService",
141 "suppressRollback": true
144 "globalSubscriberId": "test_custormer"
146 "requestParameters": {
147 "subscriptionServiceType": "MOG",
150 "ServiceInstanceName": "SliceService",
153 "name": "SliceService",
154 "description": "SliceService",
155 "serviceInvariantUuid": "699dd37d-c82f-4bd5-adec-856900fc2796",
156 "serviceUuid": "0692e0c9-8913-41ca-893a-58626f4afff2",
157 "globalSubscriberId": "test_custormer",
158 "serviceType": "embb",
160 "locationConstraints": [],
163 "resourceIndex": "1",
164 "resourceName": "allottedResource",
165 "resourceInvariantUuid": "eeefcd86-7b5b-41ae-9516-08acc5d59d92",
166 "resourceUuid": "265da937-76c7-4152-98e3-5f0d0a844b7f",
167 "resourceCustomizationUuid": "a4eda1d9-1af4-424b-997f-12c57b74c67a",
169 "locationConstraints": [],
178 "uEMobilityLevel": "stationary",
179 "areaTrafficCapDL": 123,
180 "maxNumberofUEs": 1000,
181 "expDataRateUL": 2000,
182 "plmnIdList": "39-00|39-01",
183 "areaTrafficCapUL": 456,
185 "expDataRateDL": 400,
186 "coverageAreaTAList": 101001,
187 "activityFactor": 99,
188 "resourceSharingLevel": "shared",
189 "nstar0_allottedresource0_providing_service_uuid": "4e8d930b-7483-4b9b-8c82-4708638ade4a",
190 "nstar0_allottedresource0_providing_service_invariant_uuid": "1899e5c1-df4e-43a8-a889-48c157dad7bc"
201 "serviceInstanceId": null,
202 "vnfInstanceId": null,
204 "networkInstanceId": null,
205 "volumeGroupInstanceId": null,
206 "vfModuleInstanceId": null,
207 "configurationId": null,
208 "instanceGroupId": null
213 "value": "6fa42cd2-4f49-4e2c-92fb-fae133277e9e",
217 "value": "6fa42cd2-4f49-4e2c-92fb-fae133277e9e",
229 "value": "createInstance",
232 "serviceInstanceId": {
236 "pnfCorrelationId": {
311 Based on the serviceUuid which is mentioned in the request body it will call the the CreateCommunicationService.bpmn file and This CreateCommunicationService.bpmn is taken as a example to this workflow Understanding which then call the subprocess of this flow and so on.
313 .. image:: ../images/CreateCommunicationService.png
315 1. CreateCommunicationService -> preProcessRequest()
317 a. Get Input Request will be logged as shown above
319 c. Here ServiceInstanceId is null so serviceInstanceId is generated randomly.
320 d. Input productFamilyId is null
321 e. Now it will get the user input parameter from the request json.
324 2. CreateCommunicationService--> prepareInitOperationStatus
326 a. Generate a new operation based on serviceInstanceId and operationId
327 b. call to prepareUpdateOperationStatus() method
329 3. RequestDBUtil--> prepareUpdateOperationStatus()
331 a. This method will be called to update the operation status in the requestDB
332 b. Exit prepareUpdateOperationStatus()
333 c. Exit prepareInitOperationStatus()
335 4. Based on the bpmn structure DecomposeService class is called
337 a. This class takes input as
345 b. Sent GET request to catalogdb to fetch the data based on serviceModelInvariantId and modelVersion
346 http://so-catalog-db-adapter.onap:8082/ecomp/mso/catalog/v2/{serviceModelUuid}
348 c. Response from catalogdb will be looking like:
353 "serviceResources": {
356 "modelUuid": "bfc2775b-64ad-41e5-95fe-d3bc57df6c73",
357 "modelInvariantUuid": "d4df55ca-c985-46c9-8088-f952181f553e",
358 "modelVersion": "1.0"
360 "serviceType": "embb",
362 "environmentContext": "General_Revenue-Bearing",
363 "resourceOrder": "ServiceProfile Service Proxy",
364 "workloadContext": "Production",
366 "serviceNetworks": [],
372 "name": "skip_post_instantiation_configuration",
378 "name": "useInterval",
383 "default": "SO-REF-DATA",
384 "name": "controller_actor",
390 "name": "maxNumberofUEs",
402 "name": "cds_model_version",
408 "name": "uEMobilityLevel",
414 "name": "cds_model_name",
420 "name": "expDataRateUL",
426 "name": "expDataRateDL",
432 "name": "coverageAreaList",
438 "name": "resourceSharingLevel",
443 "serviceProperties": [
446 "name": "skip_post_instantiation_configuration",
458 "default": "SO-REF-DATA",
459 "name": "controller_actor",
473 "name": "maxNumberofUEs",
483 "name": "expDataRateUL",
493 "name": "useInterval",
499 "name": "plmnIdList",
504 "name": "cds_model_version",
508 "name": "uEMobilityLevel",
513 "name": "cds_model_name",
517 "name": "expDataRateDL",
522 "name": "coverageAreaList",
527 "name": "resourceSharingLevel",
532 "serviceArtifact": []
537 "modelName": "ServiceProfile Service Proxy",
538 "modelUuid": "ed00301c-51ec-46a4-b766-e3af50c210d2",
539 "modelInvariantUuid": "071d426c-3f9b-44a9-9757-422043d80fc1",
540 "modelVersion": "1.0",
541 "modelCustomizationUuid": "81c5a468-37d3-4d8d-95f5-e72b0933d3d4",
542 "modelInstanceName": "serviceprofile_proxy 0"
544 "toscaNodeType": "org.openecomp.nodes.serviceprofile_proxy",
545 "description": "A Proxy for Service ServiceProfile",
546 "sourceModelUuid": "94553b32-e075-4cb0-b309-dd318ebbf670"
549 "serviceAllottedResources": []
553 5. CreateCommunicationService--> prepareDoComposeE2E()
555 a. To decompose the service based on serviceModelUuid
557 6. CreateCommunicationService--> parseCSParamsFromReq()
559 a. To parse the CreateCommunication parameter Request from the Request json
561 7. Now sending PUT request to AAI based on globalSubscriberId and serviceType
563 a. https://aai.onap:8443/aai/v19/business/customers/customer/{globalSubscriberId}/service-subscriptions/service-
564 subscription/{seviceType}/service-instances/service-instance/{serviceInstanceId}
566 b. Customer can be got by GET request with
567 https://aai.onap:8443/aai/v19/business/customers/customer/{globalSubscriberId}
569 c. Service-Subscription can be got by GET request with
570 https://aai.onap:8443/aai/v19/business/customers/customer/{globalSubscriberId}/service-subscriptions/service-
571 subscription/{seviceType}
573 d. Request body for PUT request to the AAI from bpmn:
576 "service-instance-name": "SliceService",
577 "service-role": "communication-service",
578 "environment-context": "01-70CAA6B",
579 "created-at": "2020-06-23 05:02:56",
580 "model-invariant-id": "d4df55ca-c985-46c9-8088-f952181f553e",
581 "model-version-id": "bfc2775b-64ad-41e5-95fe-d3bc57df6c73",
582 "orchestration-status": "processing",
583 "input-parameters": "{ \"service\":{ \"name\":\"SliceService\", \"description\":\"SliceService\", \"serviceInvariantUuid\":\"d4df55ca-c985-46c9-8088-f952181f553e\", \"serviceUuid\":\"bfc2775b-64ad-41e5-95fe-d3bc57df6c73\", \"globalSubscriberId\":\"5GCustomer\", \"serviceType\":\"5G\", \"parameters\":{ \"locationConstraints\":[ ], \"resources\":[ { \"resourceIndex\":\"1\", \"resourceName\":\"allottedResource\", \"resourceInvariantUuid\":\"eeefcd86-7b5b-41ae-9516-08acc5d59d92\", \"resourceUuid\":\"265da937-76c7-4152-98e3-5f0d0a844b7f\", \"resourceCustomizationUuid\":\"a4eda1d9-1af4-424b-997f-12c57b74c67a\", \"parameters\":{ \"locationConstraints\":[ ], \"resources\":[ ], \"requestInputs\":{ } } } ], \"requestInputs\":{\t\t\t \"sST\": \"embb\", \"sNSSAI\": \"1-10101\", \"uEMobilityLevel\": \"stationary\", \"areaTrafficCapDL\": 123, \"maxNumberofUEs\": 1000, \"expDataRateUL\": 2000, \"plmnIdList\": \"39-00|39-01\", \"areaTrafficCapUL\": 456, \"latency\": 300, \"expDataRateDL\": 400, \"coverageAreaTAList\": 101001, \"activityFactor\": 99, \"resourceSharingLevel\": \"shared\", \"nstar0_allottedresource0_providing_service_uuid\": \"4e8d930b-7483-4b9b-8c82-4708638ade4a\", \"nstar0_allottedresource0_providing_service_invariant_uuid\": \"1899e5c1-df4e-43a8-a889-48c157dad7bc\" } } }}"
587 Response: Response is returned with an empty entity
590 e. Sending PUT request to the AAI for communication service profile
592 https://aai.onap:8443/aai/v19/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/8a95e3ac-32cd-4ffb-b9e3-5366b393a7a2/communication-service-profiles/communication-service-profile/202a5e9a-d1d7-4afd-922f-3e7a709c780c
596 {"profile-id":"202a5e9a-d1d7-4afd-922f-3e7a709c780c","max-number-of-UEs":1000,"latency":300,"exp-data-rate-UL":2000,"exp-data-rate-DL":400,"ue-mobility-level":"stationary","resource-sharing-level":"shared"}
598 Response: Response is returned with an empty entity
600 8. CreateCommunicationService--> sendSyncResponse()
602 a. Send a response to the API-Handler
609 "serviceId":"8a95e3ac-32cd-4ffb-b9e3-5366b393a7a2",
610 "operationId":"a970a804-7ac5-4de9-b6db-17352afbc6fa"
614 9. CreateCommunicationService--> generateE2EServiceProfile()
616 a. It gets the E2E service templete Id and change communication profile to E2E service profile
617 b. Basically it generates the E2E service profile
619 10. CreateCommunicationService--> preRequestSend2NSMF()
621 a. It sets the payload to send to the other bpmn file
623 11. Here based on the CreateCommunicationService bpmn structure required bpmn file will be called and corresponding to
625 this bpmn, groovy file will be called. For example, Here CreateSliceService.groovy is being called.
627 12. CreateCommunicationService--> processNSMFResponse()
629 a. It processes the NSMF response code which was returned from other groovy file
631 13. CreateCommunicationService--> createCSAndSSRelationship()
633 a. It will create relationship between communication service and e2e service
635 14. CreateCommunicationService--> createRelationShipInAAI()
637 a. Sending a PUT request to make a relationship between two services
638 https://aai.onap:8443/aai/v19/business/customers/customer/5GCustomer/service-subscriptions/service-
639 subscription/5G/service-instances/service-instance/8a95e3ac-32cd-4ffb-b9e3-5366b393a7a2/relationship-
645 "related-link":"aai/v16/business/customers/customer/5GCustomer/service-subscriptions/service-
646 subscription/5G/service-instances/service-instance/2e6c2d7f-85c0-4b1f-b7fd-5f2364c27ea7"
649 15. CreateCommunicationService--> prepareUpdateOperationStatus()
651 a. prepare update operation status after create relationship in aai
653 16. RequestDBUtil--> prepareUpdateOperationStatus()
655 a. update operation status in requestDB
657 b. DB Adapter Endpoint is: http://so-request-db-adapter.onap:8083/services/RequestsDbAdapter