4 "name": "05_Onboard_VF",
5 "_postman_id": "3a292462-bd95-304c-041a-62a8bd1538a5",
7 "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
11 "name": "check vf exists and get id",
16 "type": "text/javascript",
18 "tests[\"Status code is 200\"] = responseCode.code === 200;",
20 "var jsonData = JSON.parse(responseBody);",
21 "var vf_found = false;",
22 "for (var i = 0; i < jsonData.length; i++) { ",
23 " if (jsonData[i][\"name\"] === postman.getGlobalVariable(\"vf_name\")) {",
25 " postman.setGlobalVariable(\"auto_vf_uuid\", \"\"+jsonData[i][\"uuid\"]+\"\");",
26 " postman.setGlobalVariable(\"auto_vf_invariant_uuid\", \"\"+jsonData[i][\"invariantUUID\"]+\"\");",
29 "if (vf_found === false) {",
30 " tests[postman.getGlobalVariable(\"vf_name\")+\" does not exists, we continue the run\"] = true;",
34 " tests[postman.getGlobalVariable(\"vf_name\")+\" already exists, stop the run\"] = true;",
35 " postman.setNextRequest(null);",
43 "raw": "{{url-sdc}}/sdc/v1/catalog/resources?resourceType=VF",
55 "key": "resourceType",
66 "key": "Content-Type",
67 "value": "application/json",
72 "value": "application/json",
76 "key": "X-TransactionId",
91 "key": "Authorization",
92 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=",
96 "key": "x-ecomp-instanceid",
103 "raw": "{\"contactId\": \"cs0008\", \"vendorRelease\": \"1.0\", \"requirements\": {}, \"artifacts\": {}, \"capabilities\": {}, \"componentInstancesProperties\": {}, \"deploymentArtifacts\": {}, \"icon\": \"defaulticon\", \"vendorName\": \"test-api-license-model\", \"description\": \"vendor software product\", \"tags\": [\"test-vsp\"], \"groups\": [], \"properties\": [], \"categories\": [{\"subcategories\": [{\"normalizedName\": \"abstract\", \"name\": \"Abstract\", \"uniqueId\": \"resourceNewCategory.generic.abstract\", \"icons\": [\"icon\"]}], \"normalizedName\": \"generic\", \"name\": \"Generic\", \"uniqueId\": \"resourceNewCategory.generic\"}], \"name\": \"test-vsp\", \"toscaArtifacts\": {}, \"csarUUID\": \"F3CD5189C2DF45B4B1CFA6D6E45FD613\", \"resourceType\": \"VF\", \"csarVersion\": \"1.0\", \"componentType\": \"RESOURCE\", \"componentInstancesAttributes\": {}, \"attributes\": [], \"componentInstances\": []}"
110 "name": "check VSP exists and get infos",
115 "type": "text/javascript",
117 "tests[\"Status code is 200\"] = responseCode.code === 200;",
119 "var jsonData = JSON.parse(responseBody);",
120 "var vsp_found = false;",
121 "for (var i = 0; i < jsonData.results.length; i++) { ",
122 " if (jsonData.results[i].name === postman.getGlobalVariable(\"vsp_name\")) {",
123 " vsp_found = true;",
124 " postman.setGlobalVariable(\"auto_vsp_id\", \"\"+jsonData.results[i].id+\"\");",
128 "if (vsp_found === false) {",
129 " tests[postman.getGlobalVariable(\"vsp_name\")+\" does not exists, we stop the run\"] = true;",
130 " postman.setNextRequest(null); ",
134 " tests[postman.getGlobalVariable(\"vsp_name\")+\" exists, we can continue\"] = true;",
141 "url": "{{url-sdc2}}/sdc1/feProxy/onboarding-api/v1.0/vendor-software-products",
145 "key": "Content-Type",
146 "value": "application/json",
151 "value": "application/json",
155 "key": "X-TransactionId",
156 "value": "robot-ete-ba84612d-c1c6-4c53-9967-7b1dff276c7a",
165 "key": "X-FromAppId",
166 "value": "robot-ete",
172 "raw": "{\"category\": \"resourceNewCategory.generic\", \"vendorId\": \"CE00625F0B334F7FBD7294293956649E\", \"subCategory\": \"resourceNewCategory.generic.abstract\", \"description\": \"vendor software product\", \"licensingVersion\": \"1.0\", \"licensingData\": {\"featureGroups\": [\"74F4A12BA9B5461CAF69C17AB4301889\"], \"licenseAgreement\": \"D738E60042A14FE0914B375F3FAE1BC8\"}, \"icon\": \"icon\", \"vendorName\": \"test-api-license-model\", \"name\": \"test-vsp\"}"
179 "name": "Get VSP versions",
184 "type": "text/javascript",
186 "tests[\"Status code is 200\"] = responseCode.code === 200;",
188 "var jsonData = JSON.parse(responseBody);",
189 "var vsp_found = false;",
190 "for (var i = 0; i < jsonData.results.length; i++) { ",
191 " if (jsonData.results[i].name === postman.getGlobalVariable(\"vsp_name\")) {",
192 " vsp_found = true;",
193 " postman.setGlobalVariable(\"auto_vsp_version_id\", \"\"+jsonData.results[i].id+\"\");",
194 " postman.setGlobalVariable(\"auto_vsp_version_name\", \"\"+jsonData.results[i].name+\"\");",
202 "url": "{{url-sdc2}}/sdc1/feProxy/onboarding-api/v1.0/items/{{auto_vsp_id}}/versions",
206 "key": "Content-Type",
207 "value": "application/json",
212 "value": "application/json",
216 "key": "X-TransactionId",
217 "value": "robot-ete-ba84612d-c1c6-4c53-9967-7b1dff276c7a",
226 "key": "X-FromAppId",
227 "value": "robot-ete",
233 "raw": "{\"category\": \"resourceNewCategory.generic\", \"vendorId\": \"CE00625F0B334F7FBD7294293956649E\", \"subCategory\": \"resourceNewCategory.generic.abstract\", \"description\": \"vendor software product\", \"licensingVersion\": \"1.0\", \"licensingData\": {\"featureGroups\": [\"74F4A12BA9B5461CAF69C17AB4301889\"], \"licenseAgreement\": \"D738E60042A14FE0914B375F3FAE1BC8\"}, \"icon\": \"icon\", \"vendorName\": \"test-api-license-model\", \"name\": \"test-vsp\"}"
240 "name": "Get Vendor infos",
245 "type": "text/javascript",
247 "tests[\"Status code is 200\"] = responseCode.code === 200;",
249 "var jsonData = JSON.parse(responseBody);",
250 "var vendor_found = false;",
251 "for (var i = 0; i < jsonData.results.length; i++) { ",
252 " if (jsonData.results[i][\"name\"] === postman.getGlobalVariable(\"vendor_name\")) {",
253 " vendor_found = true;",
254 " postman.setGlobalVariable(\"auto_vendor_id\", \"\"+jsonData.results[i][\"id\"]+\"\");",
257 "if (vendor_found === false) {",
258 " tests[postman.getGlobalVariable(\"vendor_name\")+\" does not exists : we stop the run\"] = false;",
259 " postman.setNextRequest(null);",
263 " tests[postman.getGlobalVariable(\"vendor_name\")+\" exists\"] = true;",
273 "url": "{{url-sdc2}}/sdc1/feProxy/onboarding-api/v1.0/vendor-license-models",
277 "key": "Content-Type",
278 "value": "application/json",
283 "value": "application/json",
287 "key": "X-TransactionId",
288 "value": "robot-ete-ba84612d-c1c6-4c53-9967-7b1dff276c7a",
297 "key": "X-FromAppId",
298 "value": "robot-ete",
304 "raw": "{\"iconRef\": \"icon\", \"vendorName\": \"test-api-license-model\", \"description\": \"vendor license model\"}"
311 "name": "Create VF resource",
316 "type": "text/javascript",
318 "tests[\"Status code is 201\"] = responseCode.code === 201;",
320 "var jsonData = JSON.parse(responseBody);",
321 "postman.setGlobalVariable(\"auto_vf_invariant_uuid\", \"\"+jsonData[\"invariantUUID\"]+\"\");",
322 "postman.setGlobalVariable(\"auto_vf_uuid\", \"\"+jsonData[\"uuid\"]+\"\");",
323 "postman.setGlobalVariable(\"auto_vf_unique_id\", \"\"+jsonData[\"uniqueId\"]+\"\");",
325 "tests[\"VF version is in NOT_CERTIFIED_CHECKOUT status\"] = jsonData[\"lifecycleState\"] === \"NOT_CERTIFIED_CHECKOUT\";"
331 "url": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/resources",
335 "key": "Content-Type",
336 "value": "application/json",
341 "value": "application/json",
345 "key": "X-TransactionId",
346 "value": "ONAP-Test",
355 "key": "X-FromAppId",
356 "value": "ONAP-Test",
360 "key": "Authorization",
361 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=",
365 "key": "x-ecomp-instanceid",
366 "value": "ONAP-Test",
372 "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}"
379 "name": "Checkin VF resource",
384 "type": "text/javascript",
386 "var jsonData = JSON.parse(responseBody);",
388 "tests[\"VF version is in NOT_CERTIFIED_CHECKIN status\"] = jsonData[\"lifecycleState\"] === \"NOT_CERTIFIED_CHECKIN\";"
394 "url": "{{url-sdc}}/sdc/v1/catalog/resources/{{auto_vf_uuid}}/lifecycleState/checkin",
398 "key": "Content-Type",
399 "value": "application/json",
404 "value": "application/json",
408 "key": "X-TransactionId",
409 "value": "ONAP-Test",
418 "key": "X-FromAppId",
419 "value": "ONAP-Test",
423 "key": "X-ECOMP-InstanceID",
424 "value": "ONAP-Test",
428 "key": "Authorization",
429 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=",
435 "raw": "{\"userRemarks\": \"ONAP-Test checkin\"}"
442 "name": "Certify VF resource",
447 "type": "text/javascript",
449 "var jsonData = JSON.parse(responseBody);",
451 "tests[\"VF version is in CERTIFIED status\"] = jsonData[\"lifecycleState\"] === \"CERTIFIED\";"
457 "url": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/resources/{{auto_vf_unique_id}}/lifecycleState/certify",
461 "key": "Content-Type",
462 "value": "application/json",
467 "value": "application/json",
471 "key": "X-TransactionId",
472 "value": "ONAP-Test",
481 "key": "X-FromAppId",
482 "value": "ONAP-Test",
486 "key": "Authorization",
487 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=",
491 "key": "X-ECOMP-InstanceID",
492 "value": "ONAP-Test",
498 "raw": "{\"userRemarks\": \"certify\"}"
505 "name": "Get VF infos by uniqueId to get new vf_unique_Id (=new version id)",
510 "type": "text/javascript",
512 "tests[\"Status code is 200\"] = responseCode.code === 200;",
514 "var jsonData = JSON.parse(responseBody);",
515 "postman.setGlobalVariable(\"auto_vf_new_unique_id\", \"\"+jsonData[\"metadata\"][\"allVersions\"][\"1.0\"]+\"\");",
523 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/resources/{{auto_vf_unique_id}}/filteredDataByParams?include=metadata",
534 "{{auto_vf_unique_id}}",
535 "filteredDataByParams"
550 "key": "Content-Type",
551 "value": "application/json",
556 "value": "application/json",
560 "key": "X-TransactionId",
561 "value": "ONAP-Test",
570 "key": "X-FromAppId",
571 "value": "ONAP-Test",
575 "key": "Authorization",
576 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=",
580 "key": "x-ecomp-instanceid",
581 "value": "ONAP-Test",
587 "raw": "{\"contactId\": \"cs0008\", \"vendorRelease\": \"1.0\", \"requirements\": {}, \"artifacts\": {}, \"capabilities\": {}, \"componentInstancesProperties\": {}, \"deploymentArtifacts\": {}, \"icon\": \"defaulticon\", \"vendorName\": \"test-api-license-model\", \"description\": \"vendor software product\", \"tags\": [\"test-vsp\"], \"groups\": [], \"properties\": [], \"categories\": [{\"subcategories\": [{\"normalizedName\": \"abstract\", \"name\": \"Abstract\", \"uniqueId\": \"resourceNewCategory.generic.abstract\", \"icons\": [\"icon\"]}], \"normalizedName\": \"generic\", \"name\": \"Generic\", \"uniqueId\": \"resourceNewCategory.generic\"}], \"name\": \"test-vsp\", \"toscaArtifacts\": {}, \"csarUUID\": \"F3CD5189C2DF45B4B1CFA6D6E45FD613\", \"resourceType\": \"VF\", \"csarVersion\": \"1.0\", \"componentType\": \"RESOURCE\", \"componentInstancesAttributes\": {}, \"attributes\": [], \"componentInstances\": []}"