blob: eb4724c97ee02a7ad05d492f3d3a637ca270884a [file] [log] [blame]
Rene Robert53ef77f2019-01-24 18:24:55 +01001{
Rene Robert53ef77f2019-01-24 18:24:55 +01002 "info": {
Rene_Robert11c57832019-10-22 17:27:21 +02003 "_postman_id": "dcfc4671-1cb4-453a-8fef-97a0ba533daa",
Rene Robert53ef77f2019-01-24 18:24:55 +01004 "name": "06_Onboard_Service",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02005 "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
Rene Robert53ef77f2019-01-24 18:24:55 +01006 },
7 "item": [
8 {
9 "name": "check service exists and get infos",
10 "event": [
11 {
12 "listen": "test",
13 "script": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +020014 "id": "4f27b99e-23ac-4e7c-a1dc-c42ad63d6f65",
Rene Robert53ef77f2019-01-24 18:24:55 +010015 "exec": [
Rene_Robert0ebd04f2019-07-30 17:11:26 +020016 "pm.test(\"Status code is 200\", function () {",
17 " pm.response.to.have.status(200);",
18 "});",
Rene Robert53ef77f2019-01-24 18:24:55 +010019 "",
Rene_Robert0ebd04f2019-07-30 17:11:26 +020020 "var jsonData = pm.response.json();",
Rene Robert53ef77f2019-01-24 18:24:55 +010021 "var service_found = false;",
22 "for (var i = 0; i < jsonData.length; i++) { ",
Rene_Robert11c57832019-10-22 17:27:21 +020023 " if (jsonData[i].name === pm.environment.get(\"service\")) {",
Rene Robert53ef77f2019-01-24 18:24:55 +010024 " service_found = true;",
Rene_Robert11c57832019-10-22 17:27:21 +020025 " pm.environment.set(\"auto_service_uuid\", \"\"+jsonData[i].uuid+\"\");",
26 " pm.environment.set(\"auto_service_invariant_uuid\", \"\"+jsonData[i].invariantUUID+\"\");",
Rene Robert53ef77f2019-01-24 18:24:55 +010027 " }",
28 "}",
29 "if (service_found === false) {",
Rene_Robert11c57832019-10-22 17:27:21 +020030 " tests[pm.environment.get(\"service\")+\" does not exist yet, we continue the run\"] = true;",
Rene Robert53ef77f2019-01-24 18:24:55 +010031 "}",
32 "",
33 "else {",
Rene_Robert11c57832019-10-22 17:27:21 +020034 " tests[pm.environment.get(\"service\")+\" already exists, stop the run\"] = false;",
Rene Robert53ef77f2019-01-24 18:24:55 +010035 " postman.setNextRequest(null);",
36 "}"
Rene_Robert0ebd04f2019-07-30 17:11:26 +020037 ],
38 "type": "text/javascript"
Rene Robert53ef77f2019-01-24 18:24:55 +010039 }
40 }
41 ],
42 "request": {
Rene Robert53ef77f2019-01-24 18:24:55 +010043 "method": "GET",
44 "header": [
45 {
46 "key": "Content-Type",
Rene_Robert0ebd04f2019-07-30 17:11:26 +020047 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +010048 },
49 {
50 "key": "Accept",
Rene_Robert0ebd04f2019-07-30 17:11:26 +020051 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +010052 },
53 {
54 "key": "X-TransactionId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +020055 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +010056 },
57 {
58 "key": "USER_ID",
Rene_Robert0ebd04f2019-07-30 17:11:26 +020059 "value": "cs0008"
Rene Robert53ef77f2019-01-24 18:24:55 +010060 },
61 {
62 "key": "X-FromAppId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +020063 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +010064 },
65 {
66 "key": "Authorization",
Rene_Robert0ebd04f2019-07-30 17:11:26 +020067 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
Rene Robert53ef77f2019-01-24 18:24:55 +010068 },
69 {
70 "key": "x-ecomp-instanceid",
Rene_Robert0ebd04f2019-07-30 17:11:26 +020071 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +010072 }
73 ],
74 "body": {
75 "mode": "raw",
Rene_Robert0ebd04f2019-07-30 17:11:26 +020076 "raw": ""
Rene Robert53ef77f2019-01-24 18:24:55 +010077 },
Rene_Robert0ebd04f2019-07-30 17:11:26 +020078 "url": {
79 "raw": "{{url-sdc}}/sdc/v1/catalog/services",
80 "host": [
81 "{{url-sdc}}"
82 ],
83 "path": [
84 "sdc",
85 "v1",
86 "catalog",
87 "services"
88 ]
89 }
Rene Robert53ef77f2019-01-24 18:24:55 +010090 },
91 "response": []
92 },
93 {
Rene_Robert0ebd04f2019-07-30 17:11:26 +020094 "name": "Declare an aLaCarte Service",
Rene Robert53ef77f2019-01-24 18:24:55 +010095 "event": [
96 {
97 "listen": "test",
98 "script": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +020099 "id": "e6118e78-e476-4049-8e81-f81b53ba625a",
Rene Robert53ef77f2019-01-24 18:24:55 +0100100 "exec": [
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200101 "pm.test(\"Status code is 201\", function () {",
102 " pm.response.to.have.status(201);",
103 "});",
Rene Robert53ef77f2019-01-24 18:24:55 +0100104 "",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200105 "var jsonData = pm.response.json();",
Rene_Robert11c57832019-10-22 17:27:21 +0200106 "pm.environment.set(\"auto_service_invariant_uuid\", \"\"+jsonData[\"invariantUUID\"]+\"\");",
107 "pm.environment.set(\"auto_service_uuid\", \"\"+jsonData[\"uuid\"]+\"\");",
108 "pm.environment.set(\"auto_service_unique_id\", \"\"+jsonData[\"uniqueId\"]+\"\");",
Rene Robert53ef77f2019-01-24 18:24:55 +0100109 "",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200110 "tests[\"Service status is : \"+jsonData.lifecycleState] = jsonData.lifecycleState === \"NOT_CERTIFIED_CHECKOUT\";"
111 ],
112 "type": "text/javascript"
Rene Robert53ef77f2019-01-24 18:24:55 +0100113 }
114 }
115 ],
116 "request": {
Rene Robert53ef77f2019-01-24 18:24:55 +0100117 "method": "POST",
118 "header": [
119 {
120 "key": "Content-Type",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200121 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100122 },
123 {
124 "key": "Accept",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200125 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100126 },
127 {
128 "key": "X-TransactionId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200129 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +0100130 },
131 {
132 "key": "USER_ID",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200133 "value": "cs0008"
Rene Robert53ef77f2019-01-24 18:24:55 +0100134 },
135 {
136 "key": "X-FromAppId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200137 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +0100138 },
139 {
140 "key": "Authorization",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200141 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
Rene Robert53ef77f2019-01-24 18:24:55 +0100142 },
143 {
144 "key": "x-ecomp-instanceid",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200145 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +0100146 }
147 ],
148 "body": {
149 "mode": "raw",
150 "raw": "{\r\n\t\"artifacts\": {},\r\n\t\"toscaArtifacts\": {},\r\n\t\"contactId\": \"cs0008\",\r\n\t\"categories\": [{\r\n\t\t\"name\": \"Network Service\",\r\n\t\t\"normalizedName\": \"network service\",\r\n\t\t\"uniqueId\": \"serviceNewCategory.network service\",\r\n\t\t\"icons\": [\"network_l_1-3\"],\r\n\t\t\"subcategories\": null,\r\n\t\t\"version\": null,\r\n\t\t\"ownerId\": null,\r\n\t\t\"empty\": false,\r\n\t\t\"type\": null\r\n\t}],\r\n\t\"description\": \"Service {{service}}\",\r\n\t\"icon\": \"defaulticon\",\r\n\t\"componentInstancesProperties\": {},\r\n\t\"componentInstancesAttributes\": {},\r\n\t\"name\": \"{{service}}\",\r\n\t\"tags\": [\"{{service}}\"],\r\n\t\"capabilities\": {},\r\n\t\"requirements\": {},\r\n\t\"deploymentArtifacts\": {},\r\n\t\"componentType\": \"SERVICE\",\r\n\t\"projectCode\": \"123456\",\r\n\t\"componentInstances\": [],\r\n\t\"properties\": [],\r\n\t\"attributes\": [],\r\n\t\"forwardingPaths\": {},\r\n\t\"ecompGeneratedNaming\": true,\r\n\t\"serviceApiArtifacts\": {},\r\n\t\"instantiationType\": \"A-la-carte\",\r\n\t\"environmentContext\": \"General_Revenue-Bearing\"\r\n}"
151 },
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200152 "url": {
153 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/services",
154 "host": [
155 "{{url-sdc2}}"
156 ],
157 "path": [
158 "sdc1",
159 "feProxy",
160 "rest",
161 "v1",
162 "catalog",
163 "services"
164 ]
165 }
Rene Robert53ef77f2019-01-24 18:24:55 +0100166 },
167 "response": []
168 },
169 {
170 "name": "check VF exists and get uuid",
171 "event": [
172 {
173 "listen": "test",
174 "script": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200175 "id": "87b90661-aefb-4ec9-94fc-fb5277f8c283",
Rene Robert53ef77f2019-01-24 18:24:55 +0100176 "exec": [
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200177 "pm.test(\"Status code is 200\", function () {",
178 " pm.response.to.have.status(200);",
179 "});",
Rene Robert53ef77f2019-01-24 18:24:55 +0100180 "",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200181 "var jsonData = pm.response.json();",
Rene Robert53ef77f2019-01-24 18:24:55 +0100182 "var vf_found = false;",
Rene_Robert11c57832019-10-22 17:27:21 +0200183 "if (jsonData.name === pm.environment.get(\"vf_name\")) {",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200184 " vf_found = true;",
Rene_Robert11c57832019-10-22 17:27:21 +0200185 " pm.environment.set(\"auto_vf_uuid\", \"\"+jsonData.uuid+\"\");",
186 " pm.environment.set(\"auto_vf_invariant_uuid\", \"\"+jsonData.invariantUUID+\"\");",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200187 " ",
Rene Robert53ef77f2019-01-24 18:24:55 +0100188 "}",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200189 "",
Rene Robert53ef77f2019-01-24 18:24:55 +0100190 "if (vf_found === false) {",
Rene_Robert11c57832019-10-22 17:27:21 +0200191 " tests[\"VF \"+pm.environment.get(\"vf_name\")+\" does not exists, we stop the run\"] = false;",
Rene Robert53ef77f2019-01-24 18:24:55 +0100192 " postman.setNextRequest(null);",
193 "",
194 "}",
195 "",
196 "else {",
Rene_Robert11c57832019-10-22 17:27:21 +0200197 " tests[\"VF \"+pm.environment.get(\"vf_name\")+\" exists, we continue the run\"] = true;",
Rene Robert53ef77f2019-01-24 18:24:55 +0100198 "}"
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200199 ],
200 "type": "text/javascript"
Rene Robert53ef77f2019-01-24 18:24:55 +0100201 }
202 }
203 ],
204 "request": {
Rene Robert53ef77f2019-01-24 18:24:55 +0100205 "method": "GET",
206 "header": [
207 {
208 "key": "Content-Type",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200209 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100210 },
211 {
212 "key": "Accept",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200213 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100214 },
215 {
216 "key": "X-TransactionId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200217 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +0100218 },
219 {
220 "key": "USER_ID",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200221 "value": "cs0008"
Rene Robert53ef77f2019-01-24 18:24:55 +0100222 },
223 {
224 "key": "X-FromAppId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200225 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +0100226 },
227 {
228 "key": "Authorization",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200229 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
Rene Robert53ef77f2019-01-24 18:24:55 +0100230 },
231 {
232 "key": "x-ecomp-instanceid",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200233 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +0100234 }
235 ],
236 "body": {
237 "mode": "raw",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200238 "raw": ""
Rene Robert53ef77f2019-01-24 18:24:55 +0100239 },
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200240 "url": {
241 "raw": "{{url-sdc}}/sdc/v1/catalog/resources/{{auto_vf_uuid}}/metadata",
242 "host": [
243 "{{url-sdc}}"
244 ],
245 "path": [
246 "sdc",
247 "v1",
248 "catalog",
249 "resources",
250 "{{auto_vf_uuid}}",
251 "metadata"
252 ]
253 }
Rene Robert53ef77f2019-01-24 18:24:55 +0100254 },
255 "response": []
256 },
257 {
258 "name": "Get VF uniqueId",
259 "event": [
260 {
261 "listen": "test",
262 "script": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200263 "id": "16c73747-c973-40d9-ba3f-6061199386ec",
Rene Robert53ef77f2019-01-24 18:24:55 +0100264 "exec": [
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200265 "pm.test(\"Status code is 200\", function () {",
266 " pm.response.to.have.status(200);",
267 "});",
268 "var jsonData = pm.response.json();",
Rene Robert53ef77f2019-01-24 18:24:55 +0100269 "var vf_found = false;",
270 "for (var i = 0; i < jsonData.resources.length; i++) { ",
Rene_Robert11c57832019-10-22 17:27:21 +0200271 " if (jsonData.resources[i].name === pm.environment.get(\"vf_name\")) {",
Rene Robert53ef77f2019-01-24 18:24:55 +0100272 " vf_found = true;",
Rene_Robert11c57832019-10-22 17:27:21 +0200273 " pm.environment.set(\"auto_vf_unique_id\", \"\"+jsonData.resources[i].uniqueId+\"\");",
Rene Robert53ef77f2019-01-24 18:24:55 +0100274 " }",
275 "}",
276 ""
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200277 ],
278 "type": "text/javascript"
Rene Robert53ef77f2019-01-24 18:24:55 +0100279 }
280 }
281 ],
282 "request": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200283 "method": "GET",
284 "header": [
285 {
286 "key": "Content-Type",
287 "value": "application/json"
288 },
289 {
290 "key": "Accept",
291 "value": "application/json"
292 },
293 {
294 "key": "X-TransactionId",
295 "value": "ONAP-Test"
296 },
297 {
298 "key": "USER_ID",
299 "value": "cs0008"
300 },
301 {
302 "key": "X-FromAppId",
303 "value": "ONAP-Test"
304 },
305 {
306 "key": "Authorization",
307 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
308 },
309 {
310 "key": "x-ecomp-instanceid",
311 "value": "ONAP-Test"
312 }
313 ],
314 "body": {
315 "mode": "raw",
316 "raw": ""
317 },
Rene Robert53ef77f2019-01-24 18:24:55 +0100318 "url": {
319 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/screen?excludeTypes=VFCMT&excludeTypes=Configuration",
320 "host": [
321 "{{url-sdc2}}"
322 ],
323 "path": [
324 "sdc1",
325 "feProxy",
326 "rest",
327 "v1",
328 "screen"
329 ],
330 "query": [
331 {
332 "key": "excludeTypes",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200333 "value": "VFCMT"
Rene Robert53ef77f2019-01-24 18:24:55 +0100334 },
335 {
336 "key": "excludeTypes",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200337 "value": "Configuration"
Rene Robert53ef77f2019-01-24 18:24:55 +0100338 }
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200339 ]
340 }
Rene Robert53ef77f2019-01-24 18:24:55 +0100341 },
342 "response": []
343 },
344 {
345 "name": "Add VF to Service",
346 "event": [
347 {
348 "listen": "test",
349 "script": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200350 "id": "897b4588-b2e6-4af6-b469-09ae6ea3b797",
Rene Robert53ef77f2019-01-24 18:24:55 +0100351 "exec": [
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200352 "pm.test(\"Status code is 201\", function () {",
353 " pm.response.to.have.status(201);",
354 "});",
355 "var jsonData = pm.response.json();",
Rene_Robert11c57832019-10-22 17:27:21 +0200356 "pm.environment.set(\"auto_vf_customization_uuid\", \"\"+jsonData.customizationUUID+\"\");",
357 "pm.environment.set(\"auto_vf_name_for_model\", \"\"+jsonData.name+\"\");",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200358 "",
359 ""
360 ],
361 "type": "text/javascript"
Rene Robert53ef77f2019-01-24 18:24:55 +0100362 }
363 }
364 ],
365 "request": {
Rene Robert53ef77f2019-01-24 18:24:55 +0100366 "method": "POST",
367 "header": [
368 {
369 "key": "Content-Type",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200370 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100371 },
372 {
373 "key": "Accept",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200374 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100375 },
376 {
377 "key": "X-TransactionId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200378 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +0100379 },
380 {
381 "key": "USER_ID",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200382 "value": "cs0008"
Rene Robert53ef77f2019-01-24 18:24:55 +0100383 },
384 {
385 "key": "X-FromAppId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200386 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +0100387 },
388 {
389 "key": "Authorization",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200390 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
Rene Robert53ef77f2019-01-24 18:24:55 +0100391 },
392 {
393 "key": "x-ecomp-instanceid",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200394 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +0100395 }
396 ],
397 "body": {
398 "mode": "raw",
399 "raw": "{\r\n\t\"name\": \"{{vf_name}}\",\r\n\t\"componentVersion\": \"1.0\",\r\n\t\"posY\": 100,\r\n\t\"posX\": 200,\r\n\t\"uniqueId\": \"{{auto_vf_unique_id}}\",\r\n\t\"originType\": \"VF\",\r\n\t\"componentUid\": \"{{auto_vf_unique_id}}\",\r\n\t\"icon\": \"defaulticon\"\r\n}\r\n"
400 },
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200401 "url": {
402 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/services/{{auto_service_unique_id}}/resourceInstance",
403 "host": [
404 "{{url-sdc2}}"
405 ],
406 "path": [
407 "sdc1",
408 "feProxy",
409 "rest",
410 "v1",
411 "catalog",
412 "services",
413 "{{auto_service_unique_id}}",
414 "resourceInstance"
415 ]
416 }
417 },
418 "response": []
419 },
420 {
421 "name": "Get Generic Neutron Virtual Link infos",
422 "event": [
423 {
424 "listen": "test",
425 "script": {
426 "id": "8bc90be4-f039-44cb-af75-7f3addd63bdd",
427 "exec": [
428 "var vl_found = false;",
429 "if (pm.response.code === 404) {",
Rene_Robert11c57832019-10-22 17:27:21 +0200430 " tests[pm.environment.get(\"virtual_link_type\")+\" does not exists\"] = true;",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200431 "}",
432 "else {",
433 " if (pm.response.code === 200) {",
434 " tests[\"Status code is 200\"] = pm.response.code === 200;",
435 " }",
436 " var jsonData = pm.response.json();",
437 " for (var i = 0; i < jsonData.length; i++) { ",
Rene_Robert11c57832019-10-22 17:27:21 +0200438 " if (jsonData[i].name === pm.environment.get(\"virtual_link_type\")) {",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200439 " vl_found = true;",
Rene_Robert11c57832019-10-22 17:27:21 +0200440 " pm.environment.set(\"auto_virtual_link_uuid\", \"\"+jsonData[i].uuid+\"\");",
441 " pm.environment.set(\"auto_virtual_link_invariant_uuid\", \"\"+jsonData[i].invariantUUID+\"\");",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200442 " }",
443 " }",
444 " if (vl_found === false) {",
Rene_Robert11c57832019-10-22 17:27:21 +0200445 " tests[pm.environment.get(\"virtual_link_type\")+\" does not exists, we stop the run\"] = false;",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200446 " postman.setNextRequest(null);",
447 " }",
448 " ",
449 " else {",
Rene_Robert11c57832019-10-22 17:27:21 +0200450 " tests[pm.environment.get(\"virtual_link_type\")+\" exists, we continue the run\"] = true;",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200451 " }",
452 "}"
453 ],
454 "type": "text/javascript"
455 }
456 }
457 ],
458 "request": {
459 "method": "GET",
460 "header": [
461 {
462 "key": "Content-Type",
463 "value": "application/json"
464 },
465 {
466 "key": "Accept",
467 "value": "application/json"
468 },
469 {
470 "key": "X-TransactionId",
471 "value": "ONAP-Test"
472 },
473 {
474 "key": "USER_ID",
475 "value": "cs0008"
476 },
477 {
478 "key": "X-FromAppId",
479 "value": "ONAP-Test"
480 },
481 {
482 "key": "Authorization",
483 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
484 },
485 {
486 "key": "x-ecomp-instanceid",
487 "value": "ONAP-Test"
488 }
489 ],
490 "body": {
491 "mode": "raw",
492 "raw": ""
493 },
494 "url": {
495 "raw": "{{url-sdc}}/sdc/v1/catalog/resources?resourceType=VL",
496 "host": [
497 "{{url-sdc}}"
498 ],
499 "path": [
500 "sdc",
501 "v1",
502 "catalog",
503 "resources"
504 ],
505 "query": [
506 {
507 "key": "resourceType",
508 "value": "VL"
509 }
510 ]
511 }
512 },
513 "response": []
514 },
515 {
516 "name": "Get Generic Neutron Virtual Link uniqueId",
517 "event": [
518 {
519 "listen": "test",
520 "script": {
521 "id": "d906fb7e-04f9-445e-be5a-9644520171e1",
522 "exec": [
523 "pm.test(\"Status code is 200\", function () {",
524 " pm.response.to.have.status(200);",
525 "});",
526 "",
527 "var jsonData = pm.response.json();",
528 "var vl_found = false;",
529 "for (var i = 0; i < jsonData.resources.length; i++) { ",
Rene_Robert11c57832019-10-22 17:27:21 +0200530 " if (jsonData.resources[i].name === pm.environment.get(\"virtual_link_type\")) {",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200531 " vl_found = true;",
Rene_Robert11c57832019-10-22 17:27:21 +0200532 " pm.environment.set(\"auto_virtual_link_unique_id\", \"\"+jsonData.resources[i].uniqueId+\"\");",
533 " tests[\"Virtual Link : \"+pm.environment.get(\"virtual_link_type\")+\" found in SDC catalog with uniqueId = \"+pm.environment.get(\"auto_virtual_link_unique_id\")] = true;",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200534 " }",
535 "}",
536 ""
537 ],
538 "type": "text/javascript"
539 }
540 }
541 ],
542 "request": {
543 "method": "GET",
544 "header": [
545 {
546 "key": "Content-Type",
547 "value": "application/json"
548 },
549 {
550 "key": "Accept",
551 "value": "application/json"
552 },
553 {
554 "key": "X-TransactionId",
555 "value": "ONAP-Test"
556 },
557 {
558 "key": "USER_ID",
559 "value": "cs0008"
560 },
561 {
562 "key": "X-FromAppId",
563 "value": "ONAP-Test"
564 },
565 {
566 "key": "Authorization",
567 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
568 },
569 {
570 "key": "x-ecomp-instanceid",
571 "value": "ONAP-Test"
572 }
573 ],
574 "body": {
575 "mode": "raw",
576 "raw": ""
577 },
578 "url": {
579 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/screen?excludeTypes=VFCMT&excludeTypes=Configuration",
580 "host": [
581 "{{url-sdc2}}"
582 ],
583 "path": [
584 "sdc1",
585 "feProxy",
586 "rest",
587 "v1",
588 "screen"
589 ],
590 "query": [
591 {
592 "key": "excludeTypes",
593 "value": "VFCMT"
594 },
595 {
596 "key": "excludeTypes",
597 "value": "Configuration"
598 }
599 ]
600 }
601 },
602 "response": []
603 },
604 {
605 "name": "Add a Generic Neutron VirtualLink to Service",
606 "event": [
607 {
608 "listen": "test",
609 "script": {
610 "id": "0f07c2d5-49a1-4bf8-a3b5-6502674821af",
611 "exec": [
612 "pm.test(\"Status code is 201\", function () {",
613 " pm.response.to.have.status(201);",
614 "});",
615 "",
616 "var jsonData = pm.response.json();",
Rene_Robert11c57832019-10-22 17:27:21 +0200617 "pm.environment.set(\"auto_virtual_link_customization_uuid\", \"\"+jsonData.customizationUUID+\"\");",
618 "pm.environment.set(\"auto_virtual_link_name_for_model\", \"\"+jsonData.name+\"\");",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200619 "",
620 ""
621 ],
622 "type": "text/javascript"
623 }
624 }
625 ],
626 "request": {
627 "method": "POST",
628 "header": [
629 {
630 "key": "Content-Type",
631 "value": "application/json"
632 },
633 {
634 "key": "Accept",
635 "value": "application/json"
636 },
637 {
638 "key": "X-TransactionId",
639 "value": "ONAP-Test"
640 },
641 {
642 "key": "USER_ID",
643 "value": "cs0008"
644 },
645 {
646 "key": "X-FromAppId",
647 "value": "ONAP-Test"
648 },
649 {
650 "key": "Authorization",
651 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
652 },
653 {
654 "key": "x-ecomp-instanceid",
655 "value": "ONAP-Test"
656 }
657 ],
658 "body": {
659 "mode": "raw",
660 "raw": "{\r\n\t\"name\": \"{{virtual_link_type}}\",\r\n\t\"componentVersion\": \"1.0\",\r\n\t\"posY\": 200,\r\n\t\"posX\": 300,\r\n\t\"uniqueId\": \"{{auto_virtual_link_unique_id}}\",\r\n\t\"originType\": \"VL\",\r\n\t\"componentUid\": \"{{auto_virtual_link_unique_id}}\",\r\n\t\"icon\": \"defaulticon\"\r\n}\r\n"
661 },
662 "url": {
663 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/services/{{auto_service_unique_id}}/resourceInstance",
664 "host": [
665 "{{url-sdc2}}"
666 ],
667 "path": [
668 "sdc1",
669 "feProxy",
670 "rest",
671 "v1",
672 "catalog",
673 "services",
674 "{{auto_service_unique_id}}",
675 "resourceInstance"
676 ]
677 }
Rene Robert53ef77f2019-01-24 18:24:55 +0100678 },
679 "response": []
680 },
681 {
682 "name": "Submit for testing",
683 "event": [
684 {
685 "listen": "test",
686 "script": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200687 "id": "f3215da0-5a6c-474c-9cc2-6733b36f1347",
Rene Robert53ef77f2019-01-24 18:24:55 +0100688 "exec": [
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200689 "pm.test(\"Status code is 200\", function () {",
690 " pm.response.to.have.status(200);",
691 "});",
692 "",
693 "var jsonData = pm.response.json();",
694 "",
695 "tests[\"Service status is : \"+jsonData.lifecycleState] = jsonData.lifecycleState === \"READY_FOR_CERTIFICATION\";",
696 ""
697 ],
698 "type": "text/javascript"
Rene Robert53ef77f2019-01-24 18:24:55 +0100699 }
700 }
701 ],
702 "request": {
Rene Robert53ef77f2019-01-24 18:24:55 +0100703 "method": "POST",
704 "header": [
705 {
706 "key": "Content-Type",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200707 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100708 },
709 {
710 "key": "Accept",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200711 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100712 },
713 {
714 "key": "X-TransactionId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200715 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +0100716 },
717 {
718 "key": "USER_ID",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200719 "value": "cs0008"
Rene Robert53ef77f2019-01-24 18:24:55 +0100720 },
721 {
722 "key": "X-FromAppId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200723 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +0100724 },
725 {
726 "key": "Authorization",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200727 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
Rene Robert53ef77f2019-01-24 18:24:55 +0100728 },
729 {
730 "key": "x-ecomp-instanceid",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200731 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +0100732 }
733 ],
734 "body": {
735 "mode": "raw",
736 "raw": "{\"userRemarks\":\"please test\"}"
737 },
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200738 "url": {
739 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/services/{{auto_service_unique_id}}/lifecycleState/certificationRequest",
740 "host": [
741 "{{url-sdc2}}"
742 ],
743 "path": [
744 "sdc1",
745 "feProxy",
746 "rest",
747 "v1",
748 "catalog",
749 "services",
750 "{{auto_service_unique_id}}",
751 "lifecycleState",
752 "certificationRequest"
753 ]
754 }
Rene Robert53ef77f2019-01-24 18:24:55 +0100755 },
756 "response": []
757 },
758 {
759 "name": "Start Certification",
760 "event": [
761 {
762 "listen": "test",
763 "script": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200764 "id": "e9143951-e32e-4d93-b970-20b54ea64fd4",
Rene Robert53ef77f2019-01-24 18:24:55 +0100765 "exec": [
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200766 "pm.test(\"Status code is 200\", function () {",
767 " pm.response.to.have.status(200);",
768 "});",
769 "",
770 "var jsonData = pm.response.json();",
771 "tests[\"Service status is : \"+jsonData.lifecycleState] = jsonData.lifecycleState === \"CERTIFICATION_IN_PROGRESS\";"
772 ],
773 "type": "text/javascript"
Rene Robert53ef77f2019-01-24 18:24:55 +0100774 }
775 }
776 ],
777 "request": {
Rene Robert53ef77f2019-01-24 18:24:55 +0100778 "method": "POST",
779 "header": [
780 {
781 "key": "Content-Type",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200782 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100783 },
784 {
785 "key": "Accept",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200786 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100787 },
788 {
789 "key": "X-TransactionId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200790 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +0100791 },
792 {
793 "key": "USER_ID",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200794 "value": "jm0007"
Rene Robert53ef77f2019-01-24 18:24:55 +0100795 },
796 {
797 "key": "X-FromAppId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200798 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +0100799 },
800 {
801 "key": "Authorization",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200802 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
Rene Robert53ef77f2019-01-24 18:24:55 +0100803 },
804 {
805 "key": "x-ecomp-instanceid",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200806 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +0100807 }
808 ],
809 "body": {
810 "mode": "raw",
811 "raw": "{}"
812 },
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200813 "url": {
814 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/services/{{auto_service_unique_id}}/lifecycleState/startCertification",
815 "host": [
816 "{{url-sdc2}}"
817 ],
818 "path": [
819 "sdc1",
820 "feProxy",
821 "rest",
822 "v1",
823 "catalog",
824 "services",
825 "{{auto_service_unique_id}}",
826 "lifecycleState",
827 "startCertification"
828 ]
829 }
Rene Robert53ef77f2019-01-24 18:24:55 +0100830 },
831 "response": []
832 },
833 {
834 "name": "Certify",
835 "event": [
836 {
837 "listen": "test",
838 "script": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200839 "id": "2ca11efa-040f-4927-b30f-e58912f0db83",
Rene Robert53ef77f2019-01-24 18:24:55 +0100840 "exec": [
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200841 "pm.test(\"Status code is 200\", function () {",
842 " pm.response.to.have.status(200);",
843 "});",
Rene Robert53ef77f2019-01-24 18:24:55 +0100844 "",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200845 "var jsonData = pm.response.json();",
846 "",
847 "tests[\"Service status is : \"+jsonData.lifecycleState] = jsonData.lifecycleState === \"CERTIFIED\";",
848 "",
Rene_Robert11c57832019-10-22 17:27:21 +0200849 "pm.environment.set(\"auto_service_new_unique_id\", \"\"+jsonData.uniqueId+\"\");",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200850 ""
851 ],
852 "type": "text/javascript"
Rene Robert53ef77f2019-01-24 18:24:55 +0100853 }
854 }
855 ],
856 "request": {
Rene Robert53ef77f2019-01-24 18:24:55 +0100857 "method": "POST",
858 "header": [
859 {
860 "key": "Content-Type",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200861 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100862 },
863 {
864 "key": "Accept",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200865 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100866 },
867 {
868 "key": "X-TransactionId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200869 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +0100870 },
871 {
872 "key": "USER_ID",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200873 "value": "jm0007"
Rene Robert53ef77f2019-01-24 18:24:55 +0100874 },
875 {
876 "key": "X-FromAppId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200877 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +0100878 },
879 {
880 "key": "Authorization",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200881 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
Rene Robert53ef77f2019-01-24 18:24:55 +0100882 },
883 {
884 "key": "x-ecomp-instanceid",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200885 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +0100886 }
887 ],
888 "body": {
889 "mode": "raw",
890 "raw": "{\"userRemarks\":\"ok\"}"
891 },
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200892 "url": {
893 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/services/{{auto_service_unique_id}}/lifecycleState/certify",
894 "host": [
895 "{{url-sdc2}}"
896 ],
897 "path": [
898 "sdc1",
899 "feProxy",
900 "rest",
901 "v1",
902 "catalog",
903 "services",
904 "{{auto_service_unique_id}}",
905 "lifecycleState",
906 "certify"
907 ]
908 }
Rene Robert53ef77f2019-01-24 18:24:55 +0100909 },
910 "response": []
911 },
912 {
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200913 "name": "Get Service infos by uniqueID to get new_service_unique_id",
Rene Robert53ef77f2019-01-24 18:24:55 +0100914 "event": [
915 {
916 "listen": "test",
917 "script": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200918 "id": "cecdbf68-2176-4dc1-8321-6285d57a2e8f",
Rene Robert53ef77f2019-01-24 18:24:55 +0100919 "exec": [
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200920 "pm.test(\"Status code is 200\", function () {",
921 " pm.response.to.have.status(200);",
922 "});",
923 "",
924 "var jsonData = pm.response.json();",
Rene_Robert11c57832019-10-22 17:27:21 +0200925 "pm.environment.set(\"auto_service_new_unique_id\", \"\"+jsonData[\"metadata\"][\"allVersions\"][\"1.0\"]+\"\");",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200926 ""
927 ],
928 "type": "text/javascript"
Rene Robert53ef77f2019-01-24 18:24:55 +0100929 }
930 }
931 ],
932 "request": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200933 "method": "GET",
934 "header": [
935 {
936 "key": "Content-Type",
937 "value": "application/json"
938 },
939 {
940 "key": "Accept",
941 "value": "application/json"
942 },
943 {
944 "key": "X-TransactionId",
945 "value": "ONAP-Test"
946 },
947 {
948 "key": "USER_ID",
949 "value": "cs0008"
950 },
951 {
952 "key": "X-FromAppId",
953 "value": "ONAP-Test"
954 },
955 {
956 "key": "Authorization",
957 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
958 },
959 {
960 "key": "x-ecomp-instanceid",
961 "value": "ONAP-Test"
962 }
963 ],
964 "body": {
965 "mode": "raw",
966 "raw": ""
967 },
968 "url": {
969 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/services/{{auto_service_unique_id}}/filteredDataByParams?include=metadata",
970 "host": [
971 "{{url-sdc2}}"
972 ],
973 "path": [
974 "sdc1",
975 "feProxy",
976 "rest",
977 "v1",
978 "catalog",
979 "services",
980 "{{auto_service_unique_id}}",
981 "filteredDataByParams"
982 ],
983 "query": [
984 {
985 "key": "include",
986 "value": "metadata"
987 }
988 ]
989 }
990 },
991 "response": []
992 },
993 {
994 "name": "Approve distribution",
995 "event": [
996 {
997 "listen": "test",
998 "script": {
999 "id": "ef5105ec-e9ea-454a-954a-3398364ecb89",
1000 "exec": [
1001 "pm.test(\"Status code is 200\", function () {",
1002 " pm.response.to.have.status(200);",
1003 "});",
1004 "",
1005 "var jsonData = pm.response.json();",
1006 "",
1007 "tests[\"Distribution status is : \"+jsonData.distributionStatus] = jsonData.distributionStatus === \"DISTRIBUTION_APPROVED\";",
1008 ""
1009 ],
1010 "type": "text/javascript"
1011 }
1012 }
1013 ],
1014 "request": {
Rene Robert53ef77f2019-01-24 18:24:55 +01001015 "method": "POST",
1016 "header": [
1017 {
1018 "key": "Content-Type",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001019 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +01001020 },
1021 {
1022 "key": "Accept",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001023 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +01001024 },
1025 {
1026 "key": "X-TransactionId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001027 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +01001028 },
1029 {
1030 "key": "USER_ID",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001031 "value": "gv0001"
Rene Robert53ef77f2019-01-24 18:24:55 +01001032 },
1033 {
1034 "key": "X-FromAppId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001035 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +01001036 },
1037 {
1038 "key": "Authorization",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001039 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
Rene Robert53ef77f2019-01-24 18:24:55 +01001040 },
1041 {
1042 "key": "x-ecomp-instanceid",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001043 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +01001044 }
1045 ],
1046 "body": {
1047 "mode": "raw",
1048 "raw": "{\"userRemarks\":\"ok\"}"
1049 },
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001050 "url": {
1051 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/services/{{auto_service_new_unique_id}}/distribution-state/approve",
1052 "host": [
1053 "{{url-sdc2}}"
1054 ],
1055 "path": [
1056 "sdc1",
1057 "feProxy",
1058 "rest",
1059 "v1",
1060 "catalog",
1061 "services",
1062 "{{auto_service_new_unique_id}}",
1063 "distribution-state",
1064 "approve"
1065 ]
1066 }
Rene Robert53ef77f2019-01-24 18:24:55 +01001067 },
1068 "response": []
1069 },
1070 {
1071 "name": "Distribute service",
1072 "event": [
1073 {
1074 "listen": "test",
1075 "script": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001076 "id": "cf7fe737-3858-4235-88b8-73640775d871",
Rene Robert53ef77f2019-01-24 18:24:55 +01001077 "exec": [
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001078 "pm.test(\"Status code is 200\", function () {",
1079 " pm.response.to.have.status(200);",
1080 "});",
1081 "",
1082 "var jsonData = pm.response.json();",
1083 "",
1084 "tests[\"Distribution status is : \"+jsonData.distributionStatus] = jsonData.distributionStatus === \"DISTRIBUTED\";",
1085 "",
Rene_Robert11c57832019-10-22 17:27:21 +02001086 "pm.environment.set(\"auto_vf_module_model_name\", \"\"+jsonData.componentInstances[0].groupInstances[0].groupName+\"\");",
1087 "pm.environment.set(\"auto_vf_module_model_customization_name\", \"\"+jsonData.componentInstances[0].groupInstances[0].groupName+\"\");",
1088 "pm.environment.set(\"auto_vf_module_model_uuid\", \"\"+jsonData.componentInstances[0].groupInstances[0].groupUUID+\"\");",
1089 "pm.environment.set(\"auto_vf_module_model_invariant_uuid\", \"\"+jsonData.componentInstances[0].groupInstances[0].invariantUUID+\"\");",
1090 "pm.environment.set(\"auto_vf_module_model_customization_uuid\", \"\"+jsonData.componentInstances[0].groupInstances[0].customizationUUID+\"\");",
1091 "pm.environment.set(\"auto_virtual_link_model_customization_uuid\", \"\"+jsonData.componentInstances[1].customizationUUID+\"\");"
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001092 ],
1093 "type": "text/javascript"
Rene Robert53ef77f2019-01-24 18:24:55 +01001094 }
1095 }
1096 ],
1097 "request": {
Rene Robert53ef77f2019-01-24 18:24:55 +01001098 "method": "POST",
1099 "header": [
1100 {
1101 "key": "Content-Type",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001102 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +01001103 },
1104 {
1105 "key": "Accept",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001106 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +01001107 },
1108 {
1109 "key": "X-TransactionId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001110 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +01001111 },
1112 {
1113 "key": "USER_ID",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001114 "value": "op0001"
Rene Robert53ef77f2019-01-24 18:24:55 +01001115 },
1116 {
1117 "key": "X-FromAppId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001118 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +01001119 },
1120 {
1121 "key": "Authorization",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001122 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
Rene Robert53ef77f2019-01-24 18:24:55 +01001123 },
1124 {
1125 "key": "x-ecomp-instanceid",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001126 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +01001127 }
1128 ],
1129 "body": {
1130 "mode": "raw",
1131 "raw": "{}"
1132 },
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001133 "url": {
1134 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/services/{{auto_service_new_unique_id}}/distribution/PROD/activate",
1135 "host": [
1136 "{{url-sdc2}}"
1137 ],
1138 "path": [
1139 "sdc1",
1140 "feProxy",
1141 "rest",
1142 "v1",
1143 "catalog",
1144 "services",
1145 "{{auto_service_new_unique_id}}",
1146 "distribution",
1147 "PROD",
1148 "activate"
1149 ]
1150 }
Rene Robert53ef77f2019-01-24 18:24:55 +01001151 },
1152 "response": []
1153 },
1154 {
1155 "name": "check distribution",
1156 "event": [
1157 {
1158 "listen": "test",
1159 "script": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001160 "id": "401f90b3-649f-4f3f-a2bd-ef996a54e47b",
Rene Robert53ef77f2019-01-24 18:24:55 +01001161 "exec": [
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001162 "pm.test(\"Status code is 200\", function () {",
1163 " pm.response.to.have.status(200);",
1164 "});",
Rene Robert53ef77f2019-01-24 18:24:55 +01001165 "",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001166 "var jsonData = pm.response.json();",
Rene Robert53ef77f2019-01-24 18:24:55 +01001167 "var distrib_done = false;",
1168 "for (var i = 0; i < jsonData.distributionStatusOfServiceList.length; i++) { ",
1169 " if (jsonData.distributionStatusOfServiceList[i].deployementStatus === \"Distributed\") {",
1170 " distrib_done = true;",
Rene_Robert11c57832019-10-22 17:27:21 +02001171 " pm.environment.set(\"auto_distribution_id\", \"\"+jsonData.distributionStatusOfServiceList[i].distributionID+\"\");",
Rene Robert53ef77f2019-01-24 18:24:55 +01001172 "",
1173 " }",
1174 "}",
1175 "if (distrib_done === false) {",
Rene_Robert11c57832019-10-22 17:27:21 +02001176 " tests[pm.environment.get(\"service\")+\" not distributed, we stop the run\"] = false;",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001177 " postman.setNextRequest(null);",
Rene Robert53ef77f2019-01-24 18:24:55 +01001178 "}",
1179 "",
1180 "else {",
Rene_Robert11c57832019-10-22 17:27:21 +02001181 " tests[pm.environment.get(\"service\")+\" distributed\"] = true;",
Rene Robert53ef77f2019-01-24 18:24:55 +01001182 "}"
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001183 ],
1184 "type": "text/javascript"
Rene Robert53ef77f2019-01-24 18:24:55 +01001185 }
1186 }
1187 ],
1188 "request": {
Rene Robert53ef77f2019-01-24 18:24:55 +01001189 "method": "GET",
1190 "header": [
1191 {
1192 "key": "Content-Type",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001193 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +01001194 },
1195 {
1196 "key": "Accept",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001197 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +01001198 },
1199 {
1200 "key": "X-TransactionId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001201 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +01001202 },
1203 {
1204 "key": "USER_ID",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001205 "value": "op0001"
Rene Robert53ef77f2019-01-24 18:24:55 +01001206 },
1207 {
1208 "key": "X-FromAppId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001209 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +01001210 },
1211 {
1212 "key": "Authorization",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001213 "value": "Basic YmVlcDpib29w"
Rene Robert53ef77f2019-01-24 18:24:55 +01001214 },
1215 {
1216 "key": "x-ecomp-instanceid",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001217 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +01001218 }
1219 ],
1220 "body": {
1221 "mode": "raw",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001222 "raw": ""
Rene Robert53ef77f2019-01-24 18:24:55 +01001223 },
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001224 "url": {
1225 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/services/{{auto_service_uuid}}/distribution",
1226 "host": [
1227 "{{url-sdc2}}"
1228 ],
1229 "path": [
1230 "sdc1",
1231 "feProxy",
1232 "rest",
1233 "v1",
1234 "catalog",
1235 "services",
1236 "{{auto_service_uuid}}",
1237 "distribution"
1238 ]
1239 }
Rene Robert53ef77f2019-01-24 18:24:55 +01001240 },
1241 "response": []
1242 },
1243 {
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001244 "name": "check distribution fully completed after 60s",
Rene Robert53ef77f2019-01-24 18:24:55 +01001245 "event": [
1246 {
1247 "listen": "test",
1248 "script": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001249 "id": "86932912-3b35-409d-bdbf-003550969f10",
Rene Robert53ef77f2019-01-24 18:24:55 +01001250 "exec": [
1251 "tests[\"Status code is 200\"] = responseCode.code === 200;",
1252 "",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001253 "var jsonData = pm.response.json();",
Rene Robert53ef77f2019-01-24 18:24:55 +01001254 "var distrib_SO = false;",
1255 "var distrib_AAI = false;",
1256 "var distrib_SDNC = false;",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001257 "var distrib_MultiCloud = false;",
1258 "var distrib_CDS = false;",
1259 "var distrib_policy = false;",
Rene Robert53ef77f2019-01-24 18:24:55 +01001260 "",
1261 "for (var i = 0; i < jsonData.distributionStatusList.length; i++) { ",
1262 " if ((jsonData.distributionStatusList[i].omfComponentID === \"SO-COpenSource-Env11\") && (jsonData.distributionStatusList[i].status === \"DOWNLOAD_OK\"))",
1263 " {",
1264 " distrib_SO = true;",
1265 " }",
1266 " if ((jsonData.distributionStatusList[i].omfComponentID === \"aai-ml\") && (jsonData.distributionStatusList[i].status === \"DOWNLOAD_OK\"))",
1267 " {",
1268 " distrib_AAI = true;",
1269 " }",
1270 " if ((jsonData.distributionStatusList[i].omfComponentID === \"sdc-COpenSource-Env11-sdnc-dockero\") && (jsonData.distributionStatusList[i].status === \"DOWNLOAD_OK\"))",
1271 " {",
1272 " distrib_SDNC = true;",
1273 " }",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001274 " if ((jsonData.distributionStatusList[i].omfComponentID === \"multicloud-k8s-id\") && (jsonData.distributionStatusList[i].status === \"DOWNLOAD_OK\"))",
1275 " {",
1276 " distrib_MultiCloud = true;",
1277 " }",
1278 " if ((jsonData.distributionStatusList[i].omfComponentID === \"cds\") && (jsonData.distributionStatusList[i].status === \"DOWNLOAD_OK\"))",
1279 " {",
1280 " distrib_CDS = true;",
1281 " }",
1282 " if ((jsonData.distributionStatusList[i].omfComponentID === \"policy-id\") && (jsonData.distributionStatusList[i].status === \"DOWNLOAD_OK\"))",
1283 " {",
1284 " distrib_policy = true;",
1285 " } ",
Rene Robert53ef77f2019-01-24 18:24:55 +01001286 "}",
1287 "",
1288 "",
1289 "if (distrib_SO === false) {",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001290 " tests[pm.globals.get(\"service\")+\" not distributed to SO\"] = false;",
Rene Robert53ef77f2019-01-24 18:24:55 +01001291 "}",
1292 "",
1293 "else {",
Rene_Robert11c57832019-10-22 17:27:21 +02001294 " tests[pm.environment.get(\"service\")+\" distributed to SO\"] = true;",
Rene Robert53ef77f2019-01-24 18:24:55 +01001295 "}",
1296 "",
1297 "if (distrib_AAI === false) {",
Rene_Robert11c57832019-10-22 17:27:21 +02001298 " tests[pm.environment.get(\"service\")+\" not distributed to AAI\"] = false;",
Rene Robert53ef77f2019-01-24 18:24:55 +01001299 "}",
1300 "",
1301 "else {",
Rene_Robert11c57832019-10-22 17:27:21 +02001302 " tests[pm.environment.get(\"service\")+\" distributed to AAI\"] = true;",
Rene Robert53ef77f2019-01-24 18:24:55 +01001303 "}",
1304 "",
1305 "if (distrib_SDNC === false) {",
Rene_Robert11c57832019-10-22 17:27:21 +02001306 " tests[pm.environment.get(\"service\")+\" not distributed to SDNC\"] = false;",
Rene Robert53ef77f2019-01-24 18:24:55 +01001307 "}",
1308 "",
1309 "else {",
Rene_Robert11c57832019-10-22 17:27:21 +02001310 " tests[pm.environment.get(\"service\")+\" distributed to SDNC\"] = true;",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001311 "}",
1312 "if (distrib_MultiCloud === false) {",
Rene_Robert11c57832019-10-22 17:27:21 +02001313 " tests[pm.environment.get(\"service\")+\" not distributed to MultiCloud\"] = false;",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001314 "}",
1315 "",
1316 "else {",
Rene_Robert11c57832019-10-22 17:27:21 +02001317 " tests[pm.environment.get(\"service\")+\" distributed to MultiCloud\"] = true;",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001318 "}",
1319 "if (distrib_CDS === false) {",
Rene_Robert11c57832019-10-22 17:27:21 +02001320 " tests[pm.environment.get(\"service\")+\" not distributed to CDS\"] = false;",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001321 "}",
1322 "",
1323 "else {",
Rene_Robert11c57832019-10-22 17:27:21 +02001324 " tests[pm.environment.get(\"service\")+\" distributed to CDS\"] = true;",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001325 "}",
1326 "if (distrib_policy === false) {",
Rene_Robert11c57832019-10-22 17:27:21 +02001327 " tests[pm.environment.get(\"service\")+\" not distributed to Policy\"] = false;",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001328 "}",
1329 "",
1330 "else {",
Rene_Robert11c57832019-10-22 17:27:21 +02001331 " tests[pm.environment.get(\"service\")+\" distributed to Policy\"] = true;",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001332 "}",
1333 ""
1334 ],
1335 "type": "text/javascript"
1336 }
1337 },
1338 {
1339 "listen": "prerequest",
1340 "script": {
1341 "id": "9a1093c2-5c2d-47f6-892e-1a049cff8931",
1342 "exec": [
1343 " var date = new Date();",
1344 " var curDate = null;",
1345 " do {",
1346 " curDate = new Date();",
1347 " }",
1348 " while (curDate - date < 10000);"
1349 ],
1350 "type": "text/javascript"
Rene Robert53ef77f2019-01-24 18:24:55 +01001351 }
1352 }
1353 ],
1354 "request": {
Rene Robert53ef77f2019-01-24 18:24:55 +01001355 "method": "GET",
1356 "header": [
1357 {
1358 "key": "Content-Type",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001359 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +01001360 },
1361 {
1362 "key": "Accept",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001363 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +01001364 },
1365 {
1366 "key": "X-TransactionId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001367 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +01001368 },
1369 {
1370 "key": "USER_ID",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001371 "value": "op0001"
Rene Robert53ef77f2019-01-24 18:24:55 +01001372 },
1373 {
1374 "key": "X-FromAppId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001375 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +01001376 },
1377 {
1378 "key": "Authorization",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001379 "value": "Basic YmVlcDpib29w"
Rene Robert53ef77f2019-01-24 18:24:55 +01001380 },
1381 {
1382 "key": "x-ecomp-instanceid",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001383 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +01001384 }
1385 ],
1386 "body": {
1387 "mode": "raw",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001388 "raw": ""
Rene Robert53ef77f2019-01-24 18:24:55 +01001389 },
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001390 "url": {
1391 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/services/distribution/{{auto_distribution_id}}",
1392 "host": [
1393 "{{url-sdc2}}"
1394 ],
1395 "path": [
1396 "sdc1",
1397 "feProxy",
1398 "rest",
1399 "v1",
1400 "catalog",
1401 "services",
1402 "distribution",
1403 "{{auto_distribution_id}}"
1404 ]
1405 }
Rene Robert53ef77f2019-01-24 18:24:55 +01001406 },
1407 "response": []
1408 }
1409 ]
1410}