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 "Test"
46 http://vid.api.simpledemo.onap.org:30238/vid/maintenance/category_parameter/owningEntity \
47 -H 'Accept-Encoding: gzip, deflate' \
48 -H 'Content-Type: application/json' \
49 -H 'cache-control: no-cache' \
54 Example for "platform" named "Test_Platform"
59 http://vid.api.simpledemo.onap.org:30238/vid/maintenance/category_parameter/platform \
60 -H 'Content-Type: application/json' \
61 -H 'cache-control: no-cache' \
63 "options": [""Test_Platform"]
66 Example for "line of business" named "Test_LOB"
71 http://vid.api.simpledemo.onap.org:30238/vid/maintenance/category_parameter/lineOfBusiness \
72 -H 'Content-Type: application/json' \
73 -H 'cache-control: no-cache' \
75 "options": ["Test_LOB"]
78 Example for "project" named "Test_project"
83 http://vid.api.simpledemo.onap.org:30238/vid/maintenance/category_parameter/project \
84 -H 'Content-Type: application/json' \
85 -H 'cache-control: no-cache' \
87 "options": ["Test_project"]
96 Each time you have a new customer, you will need to perform those operations
98 This operation is using ONAP AAI REST API
100 Any service instance need to be linked to a customer
102 in the query path, you put the customer_name
104 in the query body you put the customer name again
106 Here after an example to declare a customer named "my_customer_name"
112 https://aai.api.sparky.simpledemo.onap.org:30233/aai/v16/business/customers/customer/my_customer_name \
113 -H 'Accept: application/json' \
114 -H 'Authorization: Basic QUFJOkFBSQ==' \
115 -H 'Content-Type: application/json' \
116 -H 'X-FromAppId: AAI' \
117 -H 'X-TransactionId: 808b54e3-e563-4144-a1b9-e24e2ed93d4f' \
118 -H 'cache-control: no-cache' \
120 "global-customer-id": "my_customer_name",
121 "subscriber-name": "my_customer_name",
122 "subscriber-type": "INFRA"
126 check customers in ONAP AAI (you should see if everything ok in the response)
131 https://aai.api.sparky.simpledemo.onap.org:30233/aai/v16/business/customers \
132 -H 'Accept: application/json' \
133 -H 'Authorization: Basic QUFJOkFBSQ==' \
134 -H 'Content-Type: application/json' \
135 -H 'X-FromAppId: AAI' \
136 -H 'X-TransactionId: 808b54e3-e563-4144-a1b9-e24e2ed93d4f' \
137 -H 'cache-control: no-cache' -k
140 Associate Service Model to Customer
141 -----------------------------------
144 This operation is using ONAP AAI REST API
146 in the query path, you put the customer_name and the service model name
148 in the query body you put the service model UUID
153 https://aai.api.sparky.simpledemo.onap.org:30233/aai/v16/business/customers/customer/my_customer_name/service-subscriptions/service-subscription/my_service_model_name \
154 -H 'Accept: application/json' \
155 -H 'Authorization: Basic QUFJOkFBSQ==' \
156 -H 'Content-Type: application/json' \
157 -H 'Postman-Token: d4bc4991-a518-4d75-8a87-674ba44bf13a' \
158 -H 'X-FromAppId: AAI' \
159 -H 'X-TransactionId: 808b54e3-e563-4144-a1b9-e24e2ed93d4f' \
160 -H 'cache-control: no-cache' \
162 "service-id": "11265d8c-2cc2-40e5-95d8-57cad81c18da"
168 Associate Cloud Site to Customer
169 --------------------------------
171 in the query path, you put the customer_name and the service model name
173 in the query body you put the cloud owner name, the cloud site name,
174 the tenant id and the tenant name
180 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 \
181 -H 'Accept: application/json' \
182 -H 'Authorization: Basic QUFJOkFBSQ==' \
183 -H 'Content-Type: application/json' \
184 -H 'Postman-Token: 11ea9a9e-0dc8-4d20-8a78-c75cd6928916' \
185 -H 'X-FromAppId: AAI' \
186 -H 'X-TransactionId: 808b54e3-e563-4144-a1b9-e24e2ed93d4f' \
187 -H 'cache-control: no-cache' \
189 "related-to": "tenant",
190 "related-link": "/aai/v16/cloud-infrastructure/cloud-regions/cloud-region/my_cloud_owner_name/my_cloud_site_name/tenants/tenant/234a9a2dc4b643be9812915b214cdbbb",
191 "relationship-data": [
193 "relationship-key": "cloud-region.cloud-owner",
194 "relationship-value": "my_cloud_owner_name"
197 "relationship-key": "cloud-region.cloud-region-id",
198 "relationship-value": "my_cloud_site_name"
201 "relationship-key": "tenant.tenant-id",
202 "relationship-value": "234a9a2dc4b643be9812915b214cdbbb"
205 "related-to-property": [
207 "property-key": "tenant.tenant-name",
208 "property-value": "my_tenant_name"
214 check (you should see if everything ok in the response)
219 'https://aai.api.sparky.simpledemo.onap.org:30233/aai/v16/business/customers/customer/my_customer_name/service-subscriptions?depth=all' \
220 -H 'Accept: application/json' \
221 -H 'Authorization: Basic QUFJOkFBSQ==' \
222 -H 'Content-Type: application/json' \
223 -H 'X-FromAppId: AAI' \
224 -H 'X-TransactionId: 808b54e3-e563-4144-a1b9-e24e2ed93d4f' \
225 -H 'cache-control: no-cache' -k