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_pre_ser-inst:
8 Pre Service instantiation Operations
9 ====================================
11 Several operations need to be performed after Service model distribution,
12 but before instantiating a service.
14 Those operations are only available via REST API requests.
16 Various tools can be used to send REST API requests.
18 Here after are examples using "curl" command line tool that you can use in
22 Declare owningEntity, lineOfBusiness, Platform and Project
23 ----------------------------------------------------------
25 At one point during Service Instantiation, the user need to select values for
34 Those parameters and values must be pre-declared in ONAP VID component
37 Those informations will be available to all service instantiation
38 (you only need to declare them once in ONAP)
41 Example for "Owning Entity" named "OE-Generic"
43 For Owning_Entity, it is important to declare the information in AAI
44 with a UUID value for "owning-entity-id". That value will be necessary
45 to instantiate a service with SO using GR_API.
50 https://aai.api.sparky.simpledemo.onap.org:30233/aai/v13/business/owning-entities/owning-entity/8874891f-5120-4b98-b452-46284513958d \
51 -H 'Accept: application/json' \
52 -H 'Authorization: Basic QUFJOkFBSQ==' \
53 -H 'Content-Type: application/json' \
54 -H 'X-FromAppId: AAI' \
55 -H 'X-TransactionId: get_aai_subscr' \
56 -H 'cache-control: no-cache' \
58 "owning-entity-name": "OE-Generic",
59 "owning-entity-id": "8874891f-5120-4b98-b452-46284513958d"
65 https://aai.api.sparky.simpledemo.onap.org:30233/aai/v16/business/owning-entities \
66 -H 'Accept: application/json' \
67 -H 'Authorization: Basic QUFJOkFBSQ==' \
68 -H 'Content-Type: application/json' \
69 -H 'X-FromAppId: AAI' \
70 -H 'X-TransactionId: get_aai_subscr' \
71 -H 'cache-control: no-cache'
74 To declare the Owning Entity in VID:
79 https://vid.api.simpledemo.onap.org:30200/vid/maintenance/category_parameter/owningEntity \
80 -H 'Accept-Encoding: gzip, deflate' \
81 -H 'Content-Type: application/json' \
82 -H 'cache-control: no-cache' \
84 "options": ["OE-Generic"]
88 Example for "platform" named "Test_Platform"
93 https://vid.api.simpledemo.onap.org:30200/vid/maintenance/category_parameter/platform \
94 -H 'Content-Type: application/json' \
95 -H 'cache-control: no-cache' \
97 "options": ["Test_Platform"]
100 Example for "line of business" named "Test_LOB"
105 https://vid.api.simpledemo.onap.org:30200/vid/maintenance/category_parameter/lineOfBusiness \
106 -H 'Content-Type: application/json' \
107 -H 'cache-control: no-cache' \
109 "options": ["Test_LOB"]
112 Example for "project" named "Test_project"
117 https://vid.api.simpledemo.onap.org:30200/vid/maintenance/category_parameter/project \
118 -H 'Content-Type: application/json' \
119 -H 'cache-control: no-cache' \
121 "options": ["Test_project"]
130 Each time you have a new customer, you will need to perform those operations
132 This operation is using ONAP AAI REST API
134 Any service instance need to be linked to a customer
136 in the query path, you put the customer_name
138 in the query body you put the customer name again
140 Here after an example to declare a customer named "my_customer_name"
146 https://aai.api.sparky.simpledemo.onap.org:30233/aai/v16/business/customers/customer/my_customer_name \
147 -H 'Accept: application/json' \
148 -H 'Authorization: Basic QUFJOkFBSQ==' \
149 -H 'Content-Type: application/json' \
150 -H 'X-FromAppId: AAI' \
151 -H 'X-TransactionId: 808b54e3-e563-4144-a1b9-e24e2ed93d4f' \
152 -H 'cache-control: no-cache' \
154 "global-customer-id": "my_customer_name",
155 "subscriber-name": "my_customer_name",
156 "subscriber-type": "INFRA"
160 check customers in ONAP AAI (you should see if everything ok in the response)
165 https://aai.api.sparky.simpledemo.onap.org:30233/aai/v16/business/customers \
166 -H 'Accept: application/json' \
167 -H 'Authorization: Basic QUFJOkFBSQ==' \
168 -H 'Content-Type: application/json' \
169 -H 'X-FromAppId: AAI' \
170 -H 'X-TransactionId: 808b54e3-e563-4144-a1b9-e24e2ed93d4f' \
171 -H 'cache-control: no-cache' -k
174 Associate Service Model to Customer
175 -----------------------------------
178 This operation is using ONAP AAI REST API
180 in the query path, you put the customer_name and the service model name
182 in the query body you put the service model UUID
187 https://aai.api.sparky.simpledemo.onap.org:30233/aai/v16/business/customers/customer/my_customer_name/service-subscriptions/service-subscription/my_service_model_name \
188 -H 'Accept: application/json' \
189 -H 'Authorization: Basic QUFJOkFBSQ==' \
190 -H 'Content-Type: application/json' \
191 -H 'Postman-Token: d4bc4991-a518-4d75-8a87-674ba44bf13a' \
192 -H 'X-FromAppId: AAI' \
193 -H 'X-TransactionId: 808b54e3-e563-4144-a1b9-e24e2ed93d4f' \
194 -H 'cache-control: no-cache' \
196 "service-id": "11265d8c-2cc2-40e5-95d8-57cad81c18da"
202 Associate Cloud Site to Customer
203 --------------------------------
205 in the query path, you put the customer_name and the service model name
207 in the query body you put the cloud owner name, the cloud site name,
208 the tenant id and the tenant name
214 https://aai.api.sparky.simpledemo.onap.org:30233/aai/v16/business/customers/customer/my_customer_name/service-subscriptions/service-subscription/my_service_model_name/relationship-list/relationship \
215 -H 'Accept: application/json' \
216 -H 'Authorization: Basic QUFJOkFBSQ==' \
217 -H 'Content-Type: application/json' \
218 -H 'Postman-Token: 11ea9a9e-0dc8-4d20-8a78-c75cd6928916' \
219 -H 'X-FromAppId: AAI' \
220 -H 'X-TransactionId: 808b54e3-e563-4144-a1b9-e24e2ed93d4f' \
221 -H 'cache-control: no-cache' \
223 "related-to": "tenant",
224 "related-link": "/aai/v16/cloud-infrastructure/cloud-regions/cloud-region/my_cloud_owner_name/my_cloud_site_name/tenants/tenant/234a9a2dc4b643be9812915b214cdbbb",
225 "relationship-data": [
227 "relationship-key": "cloud-region.cloud-owner",
228 "relationship-value": "my_cloud_owner_name"
231 "relationship-key": "cloud-region.cloud-region-id",
232 "relationship-value": "my_cloud_site_name"
235 "relationship-key": "tenant.tenant-id",
236 "relationship-value": "234a9a2dc4b643be9812915b214cdbbb"
239 "related-to-property": [
241 "property-key": "tenant.tenant-name",
242 "property-value": "my_tenant_name"
248 check (you should see if everything ok in the response)
253 'https://aai.api.sparky.simpledemo.onap.org:30233/aai/v16/business/customers/customer/my_customer_name/service-subscriptions?depth=all' \
254 -H 'Accept: application/json' \
255 -H 'Authorization: Basic QUFJOkFBSQ==' \
256 -H 'Content-Type: application/json' \
257 -H 'X-FromAppId: AAI' \
258 -H 'X-TransactionId: 808b54e3-e563-4144-a1b9-e24e2ed93d4f' \
259 -H 'cache-control: no-cache' -k