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 "var vf_found = false;",
19 "if (responseCode.code === 404) {",
20 " tests[postman.getGlobalVariable(\"vf_name\")+\" does not exists\"] = true;",
23 " if (responseCode.code === 200) {",
24 " tests[\"Status code is 200\"] = responseCode.code === 200;",
26 " var jsonData = JSON.parse(responseBody);",
27 " for (var i = 0; i < jsonData.length; i++) { ",
28 " if (jsonData[i][\"name\"] === postman.getGlobalVariable(\"vf_name\")) {",
30 " postman.setGlobalVariable(\"auto_vf_uuid\", \"\"+jsonData[i][\"uuid\"]+\"\");",
31 " postman.setGlobalVariable(\"auto_vf_invariant_uuid\", \"\"+jsonData[i][\"invariantUUID\"]+\"\");",
34 " if (vf_found === false) {",
35 " tests[postman.getGlobalVariable(\"vf_name\")+\" does not exists, we continue the run\"] = true;",
39 " tests[postman.getGlobalVariable(\"vf_name\")+\" already exists, stop the run\"] = true;",
40 " postman.setNextRequest(null);",
49 "raw": "{{url-sdc}}/sdc/v1/catalog/resources?resourceType=VF",
61 "key": "resourceType",
72 "key": "Content-Type",
73 "value": "application/json",
78 "value": "application/json",
82 "key": "X-TransactionId",
97 "key": "Authorization",
98 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=",
102 "key": "x-ecomp-instanceid",
103 "value": "ONAP-Test",
109 "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\": []}"
116 "name": "check VSP exists and get infos",
121 "type": "text/javascript",
123 "tests[\"Status code is 200\"] = responseCode.code === 200;",
125 "var jsonData = JSON.parse(responseBody);",
126 "var vsp_found = false;",
127 "for (var i = 0; i < jsonData.results.length; i++) { ",
128 " if (jsonData.results[i].name === postman.getGlobalVariable(\"vsp_name\")) {",
129 " vsp_found = true;",
130 " postman.setGlobalVariable(\"auto_vsp_id\", \"\"+jsonData.results[i].id+\"\");",
134 "if (vsp_found === false) {",
135 " tests[postman.getGlobalVariable(\"vsp_name\")+\" does not exists, we stop the run\"] = true;",
136 " postman.setNextRequest(null); ",
140 " tests[postman.getGlobalVariable(\"vsp_name\")+\" exists, we can continue\"] = true;",
147 "url": "{{url-sdc2}}/sdc1/feProxy/onboarding-api/v1.0/vendor-software-products",
151 "key": "Content-Type",
152 "value": "application/json",
157 "value": "application/json",
161 "key": "X-TransactionId",
162 "value": "robot-ete-ba84612d-c1c6-4c53-9967-7b1dff276c7a",
171 "key": "X-FromAppId",
172 "value": "robot-ete",
178 "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\"}"
185 "name": "Get VSP versions",
190 "type": "text/javascript",
192 "tests[\"Status code is 200\"] = responseCode.code === 200;",
194 "var jsonData = JSON.parse(responseBody);",
195 "var vsp_found = false;",
196 "for (var i = 0; i < jsonData.results.length; i++) { ",
197 " if (jsonData.results[i].name === postman.getGlobalVariable(\"vsp_name\")) {",
198 " vsp_found = true;",
199 " postman.setGlobalVariable(\"auto_vsp_version_id\", \"\"+jsonData.results[i].id+\"\");",
200 " postman.setGlobalVariable(\"auto_vsp_version_name\", \"\"+jsonData.results[i].name+\"\");",
208 "url": "{{url-sdc2}}/sdc1/feProxy/onboarding-api/v1.0/items/{{auto_vsp_id}}/versions",
212 "key": "Content-Type",
213 "value": "application/json",
218 "value": "application/json",
222 "key": "X-TransactionId",
223 "value": "robot-ete-ba84612d-c1c6-4c53-9967-7b1dff276c7a",
232 "key": "X-FromAppId",
233 "value": "robot-ete",
239 "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\"}"
246 "name": "Get Vendor infos",
251 "type": "text/javascript",
253 "tests[\"Status code is 200\"] = responseCode.code === 200;",
255 "var jsonData = JSON.parse(responseBody);",
256 "var vendor_found = false;",
257 "for (var i = 0; i < jsonData.results.length; i++) { ",
258 " if (jsonData.results[i][\"name\"] === postman.getGlobalVariable(\"vendor_name\")) {",
259 " vendor_found = true;",
260 " postman.setGlobalVariable(\"auto_vendor_id\", \"\"+jsonData.results[i][\"id\"]+\"\");",
263 "if (vendor_found === false) {",
264 " tests[postman.getGlobalVariable(\"vendor_name\")+\" does not exists : we stop the run\"] = false;",
265 " postman.setNextRequest(null);",
269 " tests[postman.getGlobalVariable(\"vendor_name\")+\" exists\"] = true;",
279 "url": "{{url-sdc2}}/sdc1/feProxy/onboarding-api/v1.0/vendor-license-models",
283 "key": "Content-Type",
284 "value": "application/json",
289 "value": "application/json",
293 "key": "X-TransactionId",
294 "value": "robot-ete-ba84612d-c1c6-4c53-9967-7b1dff276c7a",
303 "key": "X-FromAppId",
304 "value": "robot-ete",
310 "raw": "{\"iconRef\": \"icon\", \"vendorName\": \"test-api-license-model\", \"description\": \"vendor license model\"}"
317 "name": "Create VF resource",
322 "type": "text/javascript",
324 "tests[\"Status code is 201\"] = responseCode.code === 201;",
326 "var jsonData = JSON.parse(responseBody);",
327 "postman.setGlobalVariable(\"auto_vf_invariant_uuid\", \"\"+jsonData[\"invariantUUID\"]+\"\");",
328 "postman.setGlobalVariable(\"auto_vf_uuid\", \"\"+jsonData[\"uuid\"]+\"\");",
329 "postman.setGlobalVariable(\"auto_vf_unique_id\", \"\"+jsonData[\"uniqueId\"]+\"\");",
331 "tests[\"VF version is in NOT_CERTIFIED_CHECKOUT status\"] = jsonData[\"lifecycleState\"] === \"NOT_CERTIFIED_CHECKOUT\";"
337 "url": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/resources",
341 "key": "Content-Type",
342 "value": "application/json",
347 "value": "application/json",
351 "key": "X-TransactionId",
352 "value": "ONAP-Test",
361 "key": "X-FromAppId",
362 "value": "ONAP-Test",
366 "key": "Authorization",
367 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=",
371 "key": "x-ecomp-instanceid",
372 "value": "ONAP-Test",
378 "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}"
385 "name": "Checkin VF resource",
390 "type": "text/javascript",
392 "var jsonData = JSON.parse(responseBody);",
394 "tests[\"VF version is in NOT_CERTIFIED_CHECKIN status\"] = jsonData[\"lifecycleState\"] === \"NOT_CERTIFIED_CHECKIN\";"
400 "url": "{{url-sdc}}/sdc/v1/catalog/resources/{{auto_vf_uuid}}/lifecycleState/checkin",
404 "key": "Content-Type",
405 "value": "application/json",
410 "value": "application/json",
414 "key": "X-TransactionId",
415 "value": "ONAP-Test",
424 "key": "X-FromAppId",
425 "value": "ONAP-Test",
429 "key": "X-ECOMP-InstanceID",
430 "value": "ONAP-Test",
434 "key": "Authorization",
435 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=",
441 "raw": "{\"userRemarks\": \"ONAP-Test checkin\"}"
448 "name": "Certify VF resource",
453 "type": "text/javascript",
455 "var jsonData = JSON.parse(responseBody);",
457 "tests[\"VF version is in CERTIFIED status\"] = jsonData[\"lifecycleState\"] === \"CERTIFIED\";"
463 "url": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/resources/{{auto_vf_unique_id}}/lifecycleState/certify",
467 "key": "Content-Type",
468 "value": "application/json",
473 "value": "application/json",
477 "key": "X-TransactionId",
478 "value": "ONAP-Test",
487 "key": "X-FromAppId",
488 "value": "ONAP-Test",
492 "key": "Authorization",
493 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=",
497 "key": "X-ECOMP-InstanceID",
498 "value": "ONAP-Test",
504 "raw": "{\"userRemarks\": \"certify\"}"
511 "name": "Get VF infos by uniqueId to get new vf_unique_Id (=new version id)",
516 "type": "text/javascript",
518 "tests[\"Status code is 200\"] = responseCode.code === 200;",
520 "var jsonData = JSON.parse(responseBody);",
521 "postman.setGlobalVariable(\"auto_vf_new_unique_id\", \"\"+jsonData[\"metadata\"][\"allVersions\"][\"1.0\"]+\"\");",
529 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/resources/{{auto_vf_unique_id}}/filteredDataByParams?include=metadata",
540 "{{auto_vf_unique_id}}",
541 "filteredDataByParams"
556 "key": "Content-Type",
557 "value": "application/json",
562 "value": "application/json",
566 "key": "X-TransactionId",
567 "value": "ONAP-Test",
576 "key": "X-FromAppId",
577 "value": "ONAP-Test",
581 "key": "Authorization",
582 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=",
586 "key": "x-ecomp-instanceid",
587 "value": "ONAP-Test",
593 "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\": []}"