blob: 50ae5f89fc93f3f1e4d031552f3b50de248c7bd5 [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": "8f0c4ff0-c762-4289-8547-daa0def307c1",
Rene Robert53ef77f2019-01-24 18:24:55 +01004 "name": "05_Onboard_VF",
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 vf exists and get id",
10 "event": [
11 {
12 "listen": "test",
13 "script": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +020014 "id": "a7d64193-edcb-4540-bcac-dde0f33a637f",
Rene Robert53ef77f2019-01-24 18:24:55 +010015 "exec": [
Rene_Robert0ebd04f2019-07-30 17:11:26 +020016 "",
Rene Robert53ef77f2019-01-24 18:24:55 +010017 "var vf_found = false;",
Rene_Robert0ebd04f2019-07-30 17:11:26 +020018 "if (pm.response.code === 404) {",
Rene_Robert11c57832019-10-22 17:27:21 +020019 " tests[pm.environment.get(\"vf_name\")+\" does not exists\"] = true;",
Rene Robert53ef77f2019-01-24 18:24:55 +010020 "}",
Rene Robert53ef77f2019-01-24 18:24:55 +010021 "else {",
Rene_Robert0ebd04f2019-07-30 17:11:26 +020022 " if (pm.response.code === 200) {",
Rene Robert6edc7892019-01-25 15:36:40 +010023 " tests[\"Status code is 200\"] = responseCode.code === 200;",
24 " }",
Rene_Robert0ebd04f2019-07-30 17:11:26 +020025 " var jsonData = pm.response.json();",
Rene Robert6edc7892019-01-25 15:36:40 +010026 " for (var i = 0; i < jsonData.length; i++) { ",
Rene_Robert11c57832019-10-22 17:27:21 +020027 " if (jsonData[i].name === pm.environment.get(\"vf_name\")) {",
Rene Robert6edc7892019-01-25 15:36:40 +010028 " vf_found = true;",
Rene_Robert11c57832019-10-22 17:27:21 +020029 " pm.environment.set(\"auto_vf_uuid\", \"\"+jsonData[i].uuid+\"\");",
30 " pm.environment.set(\"auto_vf_invariant_uuid\", \"\"+jsonData[i].invariantUUID+\"\");",
Rene Robert6edc7892019-01-25 15:36:40 +010031 " }",
32 " }",
33 " if (vf_found === false) {",
Rene_Robert11c57832019-10-22 17:27:21 +020034 " tests[pm.environment.get(\"vf_name\")+\" does not yet exists, we continue the run\"] = true;",
Rene Robert6edc7892019-01-25 15:36:40 +010035 " }",
36 " ",
37 " else {",
Rene_Robert11c57832019-10-22 17:27:21 +020038 " tests[pm.environment.get(\"vf_name\")+\" already exists, stop the run\"] = false;",
Rene Robert6edc7892019-01-25 15:36:40 +010039 " postman.setNextRequest(null);",
40 " }",
Rene Robert53ef77f2019-01-24 18:24:55 +010041 "}"
Rene_Robert0ebd04f2019-07-30 17:11:26 +020042 ],
43 "type": "text/javascript"
Rene Robert53ef77f2019-01-24 18:24:55 +010044 }
45 }
46 ],
47 "request": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +020048 "method": "GET",
49 "header": [
50 {
51 "key": "Content-Type",
52 "value": "application/json"
53 },
54 {
55 "key": "Accept",
56 "value": "application/json"
57 },
58 {
59 "key": "X-TransactionId",
60 "value": "ONAP-Test"
61 },
62 {
63 "key": "USER_ID",
64 "value": "cs0008"
65 },
66 {
67 "key": "X-FromAppId",
68 "value": "ONAP-Test"
69 },
70 {
71 "key": "Authorization",
72 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
73 },
74 {
75 "key": "x-ecomp-instanceid",
76 "value": "ONAP-Test"
77 }
78 ],
79 "body": {
80 "mode": "raw",
81 "raw": ""
82 },
Rene Robert53ef77f2019-01-24 18:24:55 +010083 "url": {
84 "raw": "{{url-sdc}}/sdc/v1/catalog/resources?resourceType=VF",
85 "host": [
86 "{{url-sdc}}"
87 ],
88 "path": [
89 "sdc",
90 "v1",
91 "catalog",
92 "resources"
93 ],
94 "query": [
95 {
96 "key": "resourceType",
Rene_Robert0ebd04f2019-07-30 17:11:26 +020097 "value": "VF"
Rene Robert53ef77f2019-01-24 18:24:55 +010098 }
Rene_Robert0ebd04f2019-07-30 17:11:26 +020099 ]
100 }
Rene Robert53ef77f2019-01-24 18:24:55 +0100101 },
102 "response": []
103 },
104 {
105 "name": "check VSP exists and get infos",
106 "event": [
107 {
108 "listen": "test",
109 "script": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200110 "id": "ff2f00ca-80fc-40d6-b6ec-aac08eb91759",
Rene Robert53ef77f2019-01-24 18:24:55 +0100111 "exec": [
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200112 "pm.test(\"Status code is 200\", function () {",
113 " pm.response.to.have.status(200);",
114 "});",
Rene Robert53ef77f2019-01-24 18:24:55 +0100115 "",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200116 "var jsonData = pm.response.json();",
Rene Robert53ef77f2019-01-24 18:24:55 +0100117 "var vsp_found = false;",
118 "for (var i = 0; i < jsonData.results.length; i++) { ",
Rene_Robert11c57832019-10-22 17:27:21 +0200119 " if (jsonData.results[i].name === pm.environment.get(\"vsp_name\")) {",
Rene Robert53ef77f2019-01-24 18:24:55 +0100120 " vsp_found = true;",
Rene_Robert11c57832019-10-22 17:27:21 +0200121 " pm.environment.set(\"auto_vsp_id\", \"\"+jsonData.results[i].id+\"\");",
Rene Robert53ef77f2019-01-24 18:24:55 +0100122 "",
123 " }",
124 "}",
125 "if (vsp_found === false) {",
Rene_Robert11c57832019-10-22 17:27:21 +0200126 " tests[\"VSP \"+pm.environment.get(\"vsp_name\")+\" does not exists, we stop the run\"] = false;",
Rene Robert53ef77f2019-01-24 18:24:55 +0100127 " postman.setNextRequest(null); ",
128 "}",
129 "",
130 "else {",
Rene_Robert11c57832019-10-22 17:27:21 +0200131 " tests[\"VSP \"+pm.environment.get(\"vsp_name\")+\" exists, we can continue\"] = true;",
Rene Robert53ef77f2019-01-24 18:24:55 +0100132 "}"
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200133 ],
134 "type": "text/javascript"
Rene Robert53ef77f2019-01-24 18:24:55 +0100135 }
136 }
137 ],
138 "request": {
Rene Robert53ef77f2019-01-24 18:24:55 +0100139 "method": "GET",
140 "header": [
141 {
142 "key": "Content-Type",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200143 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100144 },
145 {
146 "key": "Accept",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200147 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100148 },
149 {
150 "key": "X-TransactionId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200151 "value": "robot-ete-ba84612d-c1c6-4c53-9967-7b1dff276c7a"
Rene Robert53ef77f2019-01-24 18:24:55 +0100152 },
153 {
154 "key": "USER_ID",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200155 "value": "cs0008"
Rene Robert53ef77f2019-01-24 18:24:55 +0100156 },
157 {
158 "key": "X-FromAppId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200159 "value": "robot-ete"
Rene Robert53ef77f2019-01-24 18:24:55 +0100160 }
161 ],
162 "body": {
163 "mode": "raw",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200164 "raw": ""
Rene Robert53ef77f2019-01-24 18:24:55 +0100165 },
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200166 "url": {
167 "raw": "{{url-sdc2}}/sdc1/feProxy/onboarding-api/v1.0/vendor-software-products",
168 "host": [
169 "{{url-sdc2}}"
170 ],
171 "path": [
172 "sdc1",
173 "feProxy",
174 "onboarding-api",
175 "v1.0",
176 "vendor-software-products"
177 ]
178 }
Rene Robert53ef77f2019-01-24 18:24:55 +0100179 },
180 "response": []
181 },
182 {
183 "name": "Get VSP versions",
184 "event": [
185 {
186 "listen": "test",
187 "script": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200188 "id": "f16c158f-aceb-490c-924d-3ea83c2b9431",
Rene Robert53ef77f2019-01-24 18:24:55 +0100189 "exec": [
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200190 "pm.test(\"Status code is 200\", function () {",
191 " pm.response.to.have.status(200);",
192 "});",
Rene Robert53ef77f2019-01-24 18:24:55 +0100193 "",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200194 "var jsonData = pm.response.json();",
Rene Robert53ef77f2019-01-24 18:24:55 +0100195 "var vsp_found = false;",
196 "for (var i = 0; i < jsonData.results.length; i++) { ",
Rene_Robert11c57832019-10-22 17:27:21 +0200197 " if (jsonData.results[i].name === pm.environment.get(\"vsp_name\")) {",
Rene Robert53ef77f2019-01-24 18:24:55 +0100198 " vsp_found = true;",
Rene_Robert11c57832019-10-22 17:27:21 +0200199 " pm.environment.set(\"auto_vsp_version_id\", \"\"+jsonData.results[i].id+\"\");",
200 " pm.environment.set(\"auto_vsp_version_name\", \"\"+jsonData.results[i].name+\"\");",
Rene Robert53ef77f2019-01-24 18:24:55 +0100201 " }",
202 "}"
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200203 ],
204 "type": "text/javascript"
Rene Robert53ef77f2019-01-24 18:24:55 +0100205 }
206 }
207 ],
208 "request": {
Rene Robert53ef77f2019-01-24 18:24:55 +0100209 "method": "GET",
210 "header": [
211 {
212 "key": "Content-Type",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200213 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100214 },
215 {
216 "key": "Accept",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200217 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100218 },
219 {
220 "key": "X-TransactionId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200221 "value": "robot-ete-ba84612d-c1c6-4c53-9967-7b1dff276c7a"
Rene Robert53ef77f2019-01-24 18:24:55 +0100222 },
223 {
224 "key": "USER_ID",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200225 "value": "cs0008"
Rene Robert53ef77f2019-01-24 18:24:55 +0100226 },
227 {
228 "key": "X-FromAppId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200229 "value": "robot-ete"
Rene Robert53ef77f2019-01-24 18:24:55 +0100230 }
231 ],
232 "body": {
233 "mode": "raw",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200234 "raw": ""
Rene Robert53ef77f2019-01-24 18:24:55 +0100235 },
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200236 "url": {
237 "raw": "{{url-sdc2}}/sdc1/feProxy/onboarding-api/v1.0/items/{{auto_vsp_id}}/versions",
238 "host": [
239 "{{url-sdc2}}"
240 ],
241 "path": [
242 "sdc1",
243 "feProxy",
244 "onboarding-api",
245 "v1.0",
246 "items",
247 "{{auto_vsp_id}}",
248 "versions"
249 ]
250 }
Rene Robert53ef77f2019-01-24 18:24:55 +0100251 },
252 "response": []
253 },
254 {
255 "name": "Get Vendor infos",
256 "event": [
257 {
258 "listen": "test",
259 "script": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200260 "id": "ed512660-e7af-450f-aa7e-b503c7e21a72",
Rene Robert53ef77f2019-01-24 18:24:55 +0100261 "exec": [
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200262 "pm.test(\"Status code is 200\", function () {",
263 " pm.response.to.have.status(200);",
264 "});",
Rene Robert53ef77f2019-01-24 18:24:55 +0100265 "",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200266 "var jsonData = pm.response.json();",
Rene Robert53ef77f2019-01-24 18:24:55 +0100267 "var vendor_found = false;",
268 "for (var i = 0; i < jsonData.results.length; i++) { ",
Rene_Robert11c57832019-10-22 17:27:21 +0200269 " if (jsonData.results[i][\"name\"] === pm.environment.get(\"vendor_name\")) {",
Rene Robert53ef77f2019-01-24 18:24:55 +0100270 " vendor_found = true;",
Rene_Robert11c57832019-10-22 17:27:21 +0200271 " pm.environment.set(\"auto_vendor_id\", \"\"+jsonData.results[i][\"id\"]+\"\");",
Rene Robert53ef77f2019-01-24 18:24:55 +0100272 " }",
273 "}",
274 "if (vendor_found === false) {",
Rene_Robert11c57832019-10-22 17:27:21 +0200275 " tests[pm.environment.get(\"vendor_name\")+\" does not exists : we stop the run\"] = false;",
Rene Robert53ef77f2019-01-24 18:24:55 +0100276 " postman.setNextRequest(null);",
277 "}",
278 "",
279 "else {",
Rene_Robert11c57832019-10-22 17:27:21 +0200280 " tests[pm.environment.get(\"vendor_name\")+\" exists\"] = true;",
Rene Robert53ef77f2019-01-24 18:24:55 +0100281 "}",
282 "",
283 "",
284 ""
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200285 ],
286 "type": "text/javascript"
Rene Robert53ef77f2019-01-24 18:24:55 +0100287 }
288 }
289 ],
290 "request": {
Rene Robert53ef77f2019-01-24 18:24:55 +0100291 "method": "GET",
292 "header": [
293 {
294 "key": "Content-Type",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200295 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100296 },
297 {
298 "key": "Accept",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200299 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100300 },
301 {
302 "key": "X-TransactionId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200303 "value": "robot-ete-ba84612d-c1c6-4c53-9967-7b1dff276c7a"
Rene Robert53ef77f2019-01-24 18:24:55 +0100304 },
305 {
306 "key": "USER_ID",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200307 "value": "cs0008"
Rene Robert53ef77f2019-01-24 18:24:55 +0100308 },
309 {
310 "key": "X-FromAppId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200311 "value": "robot-ete"
Rene Robert53ef77f2019-01-24 18:24:55 +0100312 }
313 ],
314 "body": {
315 "mode": "raw",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200316 "raw": ""
Rene Robert53ef77f2019-01-24 18:24:55 +0100317 },
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200318 "url": {
319 "raw": "{{url-sdc2}}/sdc1/feProxy/onboarding-api/v1.0/vendor-license-models",
320 "host": [
321 "{{url-sdc2}}"
322 ],
323 "path": [
324 "sdc1",
325 "feProxy",
326 "onboarding-api",
327 "v1.0",
328 "vendor-license-models"
329 ]
330 }
Rene Robert53ef77f2019-01-24 18:24:55 +0100331 },
332 "response": []
333 },
334 {
335 "name": "Create VF resource",
336 "event": [
337 {
338 "listen": "test",
339 "script": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200340 "id": "78a4913a-db8c-4c41-8fae-28e5bf6d90b4",
Rene Robert53ef77f2019-01-24 18:24:55 +0100341 "exec": [
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200342 "pm.test(\"Status code is 201\", function () {",
343 " pm.response.to.have.status(201);",
344 "});",
Rene Robert53ef77f2019-01-24 18:24:55 +0100345 "",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200346 "var jsonData = pm.response.json();",
Rene_Robert11c57832019-10-22 17:27:21 +0200347 "pm.environment.set(\"auto_vf_invariant_uuid\", \"\"+jsonData.invariantUUID+\"\");",
348 "pm.environment.set(\"auto_vf_uuid\", \"\"+jsonData.uuid+\"\");",
349 "pm.environment.set(\"auto_vf_unique_id\", \"\"+jsonData.uniqueId+\"\");",
Rene Robert53ef77f2019-01-24 18:24:55 +0100350 "",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200351 "tests[\"VF status is : \"+jsonData.lifecycleState] = jsonData.lifecycleState === \"NOT_CERTIFIED_CHECKOUT\";"
352 ],
353 "type": "text/javascript"
Rene Robert53ef77f2019-01-24 18:24:55 +0100354 }
355 }
356 ],
357 "request": {
Rene Robert53ef77f2019-01-24 18:24:55 +0100358 "method": "POST",
359 "header": [
360 {
361 "key": "Content-Type",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200362 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100363 },
364 {
365 "key": "Accept",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200366 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100367 },
368 {
369 "key": "X-TransactionId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200370 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +0100371 },
372 {
373 "key": "USER_ID",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200374 "value": "cs0008"
Rene Robert53ef77f2019-01-24 18:24:55 +0100375 },
376 {
377 "key": "X-FromAppId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200378 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +0100379 },
380 {
381 "key": "Authorization",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200382 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
Rene Robert53ef77f2019-01-24 18:24:55 +0100383 },
384 {
385 "key": "x-ecomp-instanceid",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200386 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +0100387 }
388 ],
389 "body": {
390 "mode": "raw",
391 "raw": "{\r\n\t\"artifacts\": {},\r\n\t\"toscaArtifacts\": {},\r\n\t\"contactId\": \"cs0008\",\r\n\t\"categories\": [{\r\n\t\t\"name\": \"Generic\",\r\n\t\t\"normalizedName\": \"generic\",\r\n\t\t\"uniqueId\": \"resourceNewCategory.generic\",\r\n\t\t\"icons\": null,\r\n\t\t\"subcategories\": [{\r\n\t\t\t\"name\": \"Abstract\",\r\n\t\t\t\"normalizedName\": \"abstract\",\r\n\t\t\t\"uniqueId\": \"resourceNewCategory.generic.abstract\",\r\n\t\t\t\"icons\": [\"objectStorage\", \"compute\"],\r\n\t\t\t\"groupings\": null,\r\n\t\t\t\"ownerId\": null,\r\n\t\t\t\"empty\": false\r\n\t\t}],\r\n\t\t\"ownerId\": null,\r\n\t\t\"empty\": false\r\n\t}],\r\n\t\"description\": \"VF named {{vf_name}}\",\r\n\t\"icon\": \"defaulticon\",\r\n\t\"componentInstancesProperties\": {},\r\n\t\"componentInstancesAttributes\": {},\r\n\t\"name\": \"{{vf_name}}\",\r\n\t\"tags\": [\"{{vf_name}}\"],\r\n\t\"capabilities\": {},\r\n\t\"requirements\": {},\r\n\t\"deploymentArtifacts\": {},\r\n\t\"componentType\": \"RESOURCE\",\r\n\t\"vendorName\": \"{{vendor_name}}\",\r\n\t\"vendorRelease\": \"1.0\",\r\n\t\"componentInstances\": [],\r\n\t\"properties\": [],\r\n\t\"attributes\": [],\r\n\t\"groups\": [],\r\n\t\"resourceType\": \"VF\",\r\n\t\"csarUUID\": \"{{auto_vsp_id}}\",\r\n\t\"csarVersion\": \"{{auto_vsp_version_name}}\"\r\n}"
392 },
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200393 "url": {
394 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/resources",
395 "host": [
396 "{{url-sdc2}}"
397 ],
398 "path": [
399 "sdc1",
400 "feProxy",
401 "rest",
402 "v1",
403 "catalog",
404 "resources"
405 ]
406 }
Rene Robert53ef77f2019-01-24 18:24:55 +0100407 },
408 "response": []
409 },
410 {
411 "name": "Checkin VF resource",
412 "event": [
413 {
414 "listen": "test",
415 "script": {
416 "type": "text/javascript",
417 "exec": [
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200418 "var jsonData = pm.response.json();",
Rene Robert53ef77f2019-01-24 18:24:55 +0100419 "",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200420 "tests[\"VF status is : \"+jsonData.lifecycleState] = jsonData.lifecycleState === \"NOT_CERTIFIED_CHECKIN\";"
Rene Robert53ef77f2019-01-24 18:24:55 +0100421 ]
422 }
423 }
424 ],
425 "request": {
Rene Robert53ef77f2019-01-24 18:24:55 +0100426 "method": "POST",
427 "header": [
428 {
429 "key": "Content-Type",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200430 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100431 },
432 {
433 "key": "Accept",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200434 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100435 },
436 {
437 "key": "X-TransactionId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200438 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +0100439 },
440 {
441 "key": "USER_ID",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200442 "value": "cs0008"
Rene Robert53ef77f2019-01-24 18:24:55 +0100443 },
444 {
445 "key": "X-FromAppId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200446 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +0100447 },
448 {
449 "key": "X-ECOMP-InstanceID",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200450 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +0100451 },
452 {
453 "key": "Authorization",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200454 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
Rene Robert53ef77f2019-01-24 18:24:55 +0100455 }
456 ],
457 "body": {
458 "mode": "raw",
459 "raw": "{\"userRemarks\": \"ONAP-Test checkin\"}"
460 },
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200461 "url": {
462 "raw": "{{url-sdc}}/sdc/v1/catalog/resources/{{auto_vf_uuid}}/lifecycleState/checkin",
463 "host": [
464 "{{url-sdc}}"
465 ],
466 "path": [
467 "sdc",
468 "v1",
469 "catalog",
470 "resources",
471 "{{auto_vf_uuid}}",
472 "lifecycleState",
473 "checkin"
474 ]
475 }
Rene Robert53ef77f2019-01-24 18:24:55 +0100476 },
477 "response": []
478 },
479 {
480 "name": "Certify VF resource",
481 "event": [
482 {
483 "listen": "test",
484 "script": {
485 "type": "text/javascript",
486 "exec": [
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200487 "var jsonData = pm.response.json();",
Rene Robert53ef77f2019-01-24 18:24:55 +0100488 "",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200489 "tests[\"VF status is : \"+jsonData.lifecycleState] = jsonData.lifecycleState === \"CERTIFIED\";"
Rene Robert53ef77f2019-01-24 18:24:55 +0100490 ]
491 }
492 }
493 ],
494 "request": {
Rene Robert53ef77f2019-01-24 18:24:55 +0100495 "method": "POST",
496 "header": [
497 {
498 "key": "Content-Type",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200499 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100500 },
501 {
502 "key": "Accept",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200503 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100504 },
505 {
506 "key": "X-TransactionId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200507 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +0100508 },
509 {
510 "key": "USER_ID",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200511 "value": "cs0008"
Rene Robert53ef77f2019-01-24 18:24:55 +0100512 },
513 {
514 "key": "X-FromAppId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200515 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +0100516 },
517 {
518 "key": "Authorization",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200519 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
Rene Robert53ef77f2019-01-24 18:24:55 +0100520 },
521 {
522 "key": "X-ECOMP-InstanceID",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200523 "value": "ONAP-Test"
Rene Robert53ef77f2019-01-24 18:24:55 +0100524 }
525 ],
526 "body": {
527 "mode": "raw",
528 "raw": "{\"userRemarks\": \"certify\"}"
529 },
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200530 "url": {
531 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/resources/{{auto_vf_unique_id}}/lifecycleState/certify",
532 "host": [
533 "{{url-sdc2}}"
534 ],
535 "path": [
536 "sdc1",
537 "feProxy",
538 "rest",
539 "v1",
540 "catalog",
541 "resources",
542 "{{auto_vf_unique_id}}",
543 "lifecycleState",
544 "certify"
545 ]
546 }
Rene Robert53ef77f2019-01-24 18:24:55 +0100547 },
548 "response": []
549 },
550 {
551 "name": "Get VF infos by uniqueId to get new vf_unique_Id (=new version id)",
552 "event": [
553 {
554 "listen": "test",
555 "script": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200556 "id": "8d831aa8-7760-44b4-aab4-da4724e8dfc9",
Rene Robert53ef77f2019-01-24 18:24:55 +0100557 "exec": [
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200558 "pm.test(\"Status code is 200\", function () {",
559 " pm.response.to.have.status(200);",
560 "});",
Rene Robert53ef77f2019-01-24 18:24:55 +0100561 "",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200562 "var jsonData = pm.response.json();",
Rene_Robert11c57832019-10-22 17:27:21 +0200563 "pm.environment.set(\"auto_vf_new_unique_id\", \"\"+jsonData[\"metadata\"][\"allVersions\"][\"1.0\"]+\"\");",
Rene Robert53ef77f2019-01-24 18:24:55 +0100564 ""
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200565 ],
566 "type": "text/javascript"
Rene Robert53ef77f2019-01-24 18:24:55 +0100567 }
568 }
569 ],
570 "request": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200571 "method": "GET",
572 "header": [
573 {
574 "key": "Content-Type",
575 "value": "application/json"
576 },
577 {
578 "key": "Accept",
579 "value": "application/json"
580 },
581 {
582 "key": "X-TransactionId",
583 "value": "ONAP-Test"
584 },
585 {
586 "key": "USER_ID",
587 "value": "cs0008"
588 },
589 {
590 "key": "X-FromAppId",
591 "value": "ONAP-Test"
592 },
593 {
594 "key": "Authorization",
595 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
596 },
597 {
598 "key": "x-ecomp-instanceid",
599 "value": "ONAP-Test"
600 }
601 ],
602 "body": {
603 "mode": "raw",
604 "raw": ""
605 },
Rene Robert53ef77f2019-01-24 18:24:55 +0100606 "url": {
607 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/resources/{{auto_vf_unique_id}}/filteredDataByParams?include=metadata",
608 "host": [
609 "{{url-sdc2}}"
610 ],
611 "path": [
612 "sdc1",
613 "feProxy",
614 "rest",
615 "v1",
616 "catalog",
617 "resources",
618 "{{auto_vf_unique_id}}",
619 "filteredDataByParams"
620 ],
621 "query": [
622 {
623 "key": "include",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200624 "value": "metadata"
Rene Robert53ef77f2019-01-24 18:24:55 +0100625 }
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200626 ]
627 }
Rene Robert53ef77f2019-01-24 18:24:55 +0100628 },
629 "response": []
630 }
631 ]
632}