blob: 96bbc3a8dd550234fe27c5d01fb03bfb5cb0e05d [file] [log] [blame]
Rene_Robertfb177972019-07-09 14:39:47 +02001.. 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.
4
andreasgeissler7789a222019-07-16 18:44:23 +02005.. _doc_guide_user_ser_inst_nbi:
Rene_Robertfb177972019-07-09 14:39:47 +02006
7
andreasgeissler7789a222019-07-16 18:44:23 +02008Service Instantiation via ONAP NBI API (TM Forum)
9=================================================
Rene_Robertfb177972019-07-09 14:39:47 +020010
11ONAP NBI allow you to use a TM Forum standardized API (serviceOrder API)
12
andreasgeissler7789a222019-07-16 18:44:23 +020013Additional info in:
14
15.. toctree::
16 :maxdepth: 1
17 :titlesonly:
18
19 NBI Guide <../../../../../submodules/externalapi/nbi.git/docs/offeredapis/offeredapis.rst>
20
21
Rene_Robertfb177972019-07-09 14:39:47 +020022ONAP NBI will convert that request to ONAP SO request.
23
24
25ServiceOrder management in NBI will support 2 modes:
26
27* E2E integration - NBI calls SO API to perform an End-To-end integration
28* Service-level only integration - NBI will trigger only SO request at
29 serviceInstance level (not at VNF, not at Vf-module level and nothing will
30 be created on cloud platform)
31
32ONAP SO prerequisite: SO must be able to find a BPMN to process service
andreasgeissler7789a222019-07-16 18:44:23 +020033fulfillment (integrate VNF, VNF activation in SDNC, VF module)
Rene_Robertfb177972019-07-09 14:39:47 +020034
35The choice of the mode is done by NBI depending on information retrieved
andreasgeissler7789a222019-07-16 18:44:23 +020036in SDC. If the serviceSpecification is within a Category "E2E Service" ,
Rene_Robertfb177972019-07-09 14:39:47 +020037NBI will use E2E SO API, if not only API at service instance level
38will be used.
39
40There is no difference or specific expectation in the service order API
41used by NBI user.
42
43
44Example of serviceOrder to instantiate (=add) a service based on model
45with id=0d463b0c-e559-4def-8d7b-df64cfbd3159
46
47
48::
49
50 curl -X POST \
51 http://nbi.api.simpledemo.onap.org:30274/nbi/api/v4/serviceOrder \
52 -H 'Accept: application/json' \
53 -H 'Content-Type: application/json' \
54 -H 'cache-control: no-cache' \
55 -d '{
56 "externalId": "BSS_order_001",
57 "priority": "1",
58 "description": "this is a service order to instantiate a service",
59 "category": "Consumer",
60 "requestedStartDate": "",
61 "requestedCompletionDate": "",
62 "relatedParty": [
63 {
64 "id": "JohnDoe",
65 "role": "ONAPcustomer",
66 "name": "JohnDoe"
67 }
68 ],
69 "orderItem": [
70 {
71 "id": "1",
72 "action": "add",
73 "service": {
74 "name": "my_service_model_instance_01",
75 "serviceState": "active",
76 "serviceSpecification": {
77 "id": "0d463b0c-e559-4def-8d7b-df64cfbd3159"
78 }
79 }
80 }
81 ]
82 }'
83
84In the response, you will obtain the serviceOrderId value.
85
86Then you have the possibility to check about the serviceorder
87(here after the serviceOrderId=5d06309da0e46400017b1123).
88
89This will allow you to get the serviceOrder Status (completed, failed...)
90
91::
92
93 curl -X GET \
94 http://nbi.api.simpledemo.onap.org:30274/nbi/api/v4/serviceOrder/5d06309da0e46400017b1123 \
95 -H 'Accept: application/json' \
96 -H 'Content-Type: application/json' \
97 -H 'cache-control: no-cache'