3 "_postman_id": "aa0955ae-1dd8-48b8-ac63-01117a1c6c2e",
4 "name": "06_Onboard_Service_Macro",
5 "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
9 "name": "check service exists and get infos",
14 "id": "4f27b99e-23ac-4e7c-a1dc-c42ad63d6f65",
16 "pm.test(\"Status code is 200\", function () {",
17 " pm.response.to.have.status(200);",
20 "var jsonData = pm.response.json();",
21 "var service_found = false;",
22 "for (var i = 0; i < jsonData.length; i++) { ",
23 " if (jsonData[i].name === pm.environment.get(\"service_name_macro\")) {",
24 " service_found = true;",
25 " pm.environment.set(\"auto_service_uuid\", \"\"+jsonData[i].uuid+\"\");",
26 " pm.environment.set(\"auto_service_invariant_uuid\", \"\"+jsonData[i].invariantUUID+\"\");",
29 "if (service_found === false) {",
30 " tests[pm.environment.get(\"service_name_macro\")+\" does not exist yet, we continue the run\"] = true;",
34 " tests[pm.environment.get(\"service_name_macro\")+\" already exists, stop the run\"] = false;",
35 " postman.setNextRequest(null);",
38 "type": "text/javascript"
46 "key": "Content-Type",
47 "value": "application/json"
51 "value": "application/json"
54 "key": "X-TransactionId",
66 "key": "Authorization",
67 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
70 "key": "x-ecomp-instanceid",
79 "raw": "{{url-sdc}}/sdc/v1/catalog/services",
94 "name": "Declare a Service in Macro mode",
99 "id": "e6118e78-e476-4049-8e81-f81b53ba625a",
101 "pm.test(\"Status code is 201\", function () {",
102 " pm.response.to.have.status(201);",
105 "var jsonData = pm.response.json();",
106 "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\"]+\"\");",
110 "tests[\"Service status is : \"+jsonData.lifecycleState] = jsonData.lifecycleState === \"NOT_CERTIFIED_CHECKOUT\";"
112 "type": "text/javascript"
120 "key": "Content-Type",
121 "value": "application/json"
125 "value": "application/json"
128 "key": "X-TransactionId",
136 "key": "X-FromAppId",
140 "key": "Authorization",
141 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
144 "key": "x-ecomp-instanceid",
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_name_macro}}\",\r\n\t\"icon\": \"defaulticon\",\r\n\t\"componentInstancesProperties\": {},\r\n\t\"componentInstancesAttributes\": {},\r\n\t\"name\": \"{{service_name_macro}}\",\r\n\t\"tags\": [\"{{service_name_macro}}\"],\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\": \"Macro\",\r\n\t\"environmentContext\": \"General_Revenue-Bearing\"\r\n}"
153 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/services",
170 "name": "check VF exists and get uuid",
175 "id": "87b90661-aefb-4ec9-94fc-fb5277f8c283",
177 "pm.test(\"Status code is 200\", function () {",
178 " pm.response.to.have.status(200);",
181 "var jsonData = pm.response.json();",
182 "var vf_found = false;",
183 "if (jsonData.name === pm.environment.get(\"vf_name\")) {",
185 " pm.environment.set(\"auto_vf_uuid\", \"\"+jsonData.uuid+\"\");",
186 " pm.environment.set(\"auto_vf_invariant_uuid\", \"\"+jsonData.invariantUUID+\"\");",
190 "if (vf_found === false) {",
191 " tests[\"VF \"+pm.environment.get(\"vf_name\")+\" does not exists, we stop the run\"] = false;",
192 " postman.setNextRequest(null);",
197 " tests[\"VF \"+pm.environment.get(\"vf_name\")+\" exists, we continue the run\"] = true;",
200 "type": "text/javascript"
208 "key": "Content-Type",
209 "value": "application/json"
213 "value": "application/json"
216 "key": "X-TransactionId",
224 "key": "X-FromAppId",
228 "key": "Authorization",
229 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
232 "key": "x-ecomp-instanceid",
241 "raw": "{{url-sdc}}/sdc/v1/catalog/resources/{{auto_vf_uuid}}/metadata",
258 "name": "Get VF uniqueId",
263 "id": "16c73747-c973-40d9-ba3f-6061199386ec",
265 "pm.test(\"Status code is 200\", function () {",
266 " pm.response.to.have.status(200);",
268 "var jsonData = pm.response.json();",
269 "var vf_found = false;",
270 "for (var i = 0; i < jsonData.resources.length; i++) { ",
271 " if (jsonData.resources[i].name === pm.environment.get(\"vf_name\")) {",
273 " pm.environment.set(\"auto_vf_unique_id\", \"\"+jsonData.resources[i].uniqueId+\"\");",
278 "type": "text/javascript"
286 "key": "Content-Type",
287 "value": "application/json"
291 "value": "application/json"
294 "key": "X-TransactionId",
302 "key": "X-FromAppId",
306 "key": "Authorization",
307 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
310 "key": "x-ecomp-instanceid",
319 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/screen?excludeTypes=VFCMT&excludeTypes=Configuration",
332 "key": "excludeTypes",
336 "key": "excludeTypes",
337 "value": "Configuration"
345 "name": "Add VF to Service",
350 "id": "897b4588-b2e6-4af6-b469-09ae6ea3b797",
352 "pm.test(\"Status code is 201\", function () {",
353 " pm.response.to.have.status(201);",
355 "var jsonData = pm.response.json();",
356 "pm.environment.set(\"auto_vf_customization_uuid\", \"\"+jsonData.customizationUUID+\"\");",
357 "pm.environment.set(\"auto_vf_name_for_model\", \"\"+jsonData.name+\"\");",
361 "type": "text/javascript"
369 "key": "Content-Type",
370 "value": "application/json"
374 "value": "application/json"
377 "key": "X-TransactionId",
385 "key": "X-FromAppId",
389 "key": "Authorization",
390 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
393 "key": "x-ecomp-instanceid",
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"
402 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/services/{{auto_service_unique_id}}/resourceInstance",
413 "{{auto_service_unique_id}}",
421 "name": "Submit for testing",
426 "id": "f3215da0-5a6c-474c-9cc2-6733b36f1347",
428 "pm.test(\"Status code is 200\", function () {",
429 " pm.response.to.have.status(200);",
432 "var jsonData = pm.response.json();",
434 "tests[\"Service status is : \"+jsonData.lifecycleState] = jsonData.lifecycleState === \"READY_FOR_CERTIFICATION\";",
437 "type": "text/javascript"
445 "key": "Content-Type",
446 "value": "application/json"
450 "value": "application/json"
453 "key": "X-TransactionId",
461 "key": "X-FromAppId",
465 "key": "Authorization",
466 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
469 "key": "x-ecomp-instanceid",
475 "raw": "{\"userRemarks\":\"please test\"}"
478 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/services/{{auto_service_unique_id}}/lifecycleState/certificationRequest",
489 "{{auto_service_unique_id}}",
491 "certificationRequest"
498 "name": "Start Certification",
503 "id": "e9143951-e32e-4d93-b970-20b54ea64fd4",
505 "pm.test(\"Status code is 200\", function () {",
506 " pm.response.to.have.status(200);",
509 "var jsonData = pm.response.json();",
510 "tests[\"Service status is : \"+jsonData.lifecycleState] = jsonData.lifecycleState === \"CERTIFICATION_IN_PROGRESS\";"
512 "type": "text/javascript"
520 "key": "Content-Type",
521 "value": "application/json"
525 "value": "application/json"
528 "key": "X-TransactionId",
536 "key": "X-FromAppId",
540 "key": "Authorization",
541 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
544 "key": "x-ecomp-instanceid",
553 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/services/{{auto_service_unique_id}}/lifecycleState/startCertification",
564 "{{auto_service_unique_id}}",
578 "id": "2ca11efa-040f-4927-b30f-e58912f0db83",
580 "pm.test(\"Status code is 200\", function () {",
581 " pm.response.to.have.status(200);",
584 "var jsonData = pm.response.json();",
586 "tests[\"Service status is : \"+jsonData.lifecycleState] = jsonData.lifecycleState === \"CERTIFIED\";",
588 "pm.environment.set(\"auto_service_new_unique_id\", \"\"+jsonData.uniqueId+\"\");",
591 "type": "text/javascript"
599 "key": "Content-Type",
600 "value": "application/json"
604 "value": "application/json"
607 "key": "X-TransactionId",
615 "key": "X-FromAppId",
619 "key": "Authorization",
620 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
623 "key": "x-ecomp-instanceid",
629 "raw": "{\"userRemarks\":\"ok\"}"
632 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/services/{{auto_service_unique_id}}/lifecycleState/certify",
643 "{{auto_service_unique_id}}",
652 "name": "Get Service infos by uniqueID to get new_service_unique_id",
657 "id": "cecdbf68-2176-4dc1-8321-6285d57a2e8f",
659 "pm.test(\"Status code is 200\", function () {",
660 " pm.response.to.have.status(200);",
663 "var jsonData = pm.response.json();",
664 "pm.environment.set(\"auto_service_new_unique_id\", \"\"+jsonData[\"metadata\"][\"allVersions\"][\"1.0\"]+\"\");",
667 "type": "text/javascript"
675 "key": "Content-Type",
676 "value": "application/json"
680 "value": "application/json"
683 "key": "X-TransactionId",
691 "key": "X-FromAppId",
695 "key": "Authorization",
696 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
699 "key": "x-ecomp-instanceid",
708 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/services/{{auto_service_unique_id}}/filteredDataByParams?include=metadata",
719 "{{auto_service_unique_id}}",
720 "filteredDataByParams"
733 "name": "Approve distribution",
738 "id": "ef5105ec-e9ea-454a-954a-3398364ecb89",
740 "pm.test(\"Status code is 200\", function () {",
741 " pm.response.to.have.status(200);",
744 "var jsonData = pm.response.json();",
746 "tests[\"Distribution status is : \"+jsonData.distributionStatus] = jsonData.distributionStatus === \"DISTRIBUTION_APPROVED\";",
749 "type": "text/javascript"
757 "key": "Content-Type",
758 "value": "application/json"
762 "value": "application/json"
765 "key": "X-TransactionId",
773 "key": "X-FromAppId",
777 "key": "Authorization",
778 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
781 "key": "x-ecomp-instanceid",
787 "raw": "{\"userRemarks\":\"ok\"}"
790 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/services/{{auto_service_new_unique_id}}/distribution-state/approve",
801 "{{auto_service_new_unique_id}}",
802 "distribution-state",
810 "name": "Distribute service",
815 "id": "cf7fe737-3858-4235-88b8-73640775d871",
817 "pm.test(\"Status code is 200\", function () {",
818 " pm.response.to.have.status(200);",
821 "var jsonData = pm.response.json();",
823 "tests[\"Distribution status is : \"+jsonData.distributionStatus] = jsonData.distributionStatus === \"DISTRIBUTED\";",
825 "pm.environment.set(\"auto_vf_module_model_name\", \"\"+jsonData.componentInstances[0].groupInstances[0].groupName+\"\");",
826 "pm.environment.set(\"auto_vf_module_model_customization_name\", \"\"+jsonData.componentInstances[0].groupInstances[0].groupName+\"\");",
827 "pm.environment.set(\"auto_vf_module_model_uuid\", \"\"+jsonData.componentInstances[0].groupInstances[0].groupUUID+\"\");",
828 "pm.environment.set(\"auto_vf_module_model_invariant_uuid\", \"\"+jsonData.componentInstances[0].groupInstances[0].invariantUUID+\"\");",
829 "pm.environment.set(\"auto_vf_module_model_customization_uuid\", \"\"+jsonData.componentInstances[0].groupInstances[0].customizationUUID+\"\");",
832 "type": "text/javascript"
840 "key": "Content-Type",
841 "value": "application/json"
845 "value": "application/json"
848 "key": "X-TransactionId",
856 "key": "X-FromAppId",
860 "key": "Authorization",
861 "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU="
864 "key": "x-ecomp-instanceid",
873 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/services/{{auto_service_new_unique_id}}/distribution/PROD/activate",
884 "{{auto_service_new_unique_id}}",
894 "name": "check distribution",
899 "id": "401f90b3-649f-4f3f-a2bd-ef996a54e47b",
901 "pm.test(\"Status code is 200\", function () {",
902 " pm.response.to.have.status(200);",
905 "var jsonData = pm.response.json();",
906 "var distrib_done = false;",
907 "for (var i = 0; i < jsonData.distributionStatusOfServiceList.length; i++) { ",
908 " if (jsonData.distributionStatusOfServiceList[i].deployementStatus === \"Distributed\") {",
909 " distrib_done = true;",
910 " pm.environment.set(\"auto_distribution_id\", \"\"+jsonData.distributionStatusOfServiceList[i].distributionID+\"\");",
914 "if (distrib_done === false) {",
915 " tests[pm.environment.get(\"service\")+\" not distributed, we stop the run\"] = false;",
916 " postman.setNextRequest(null);",
920 " tests[pm.environment.get(\"service\")+\" distributed\"] = true;",
923 "type": "text/javascript"
931 "key": "Content-Type",
932 "value": "application/json"
936 "value": "application/json"
939 "key": "X-TransactionId",
947 "key": "X-FromAppId",
951 "key": "Authorization",
952 "value": "Basic YmVlcDpib29w"
955 "key": "x-ecomp-instanceid",
964 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/services/{{auto_service_uuid}}/distribution",
975 "{{auto_service_uuid}}",
983 "name": "check distribution fully completed after 60s",
988 "id": "86932912-3b35-409d-bdbf-003550969f10",
990 "tests[\"Status code is 200\"] = responseCode.code === 200;",
992 "var jsonData = pm.response.json();",
993 "var distrib_SO = false;",
994 "var distrib_AAI = false;",
995 "var distrib_SDNC = false;",
996 "var distrib_MultiCloud = false;",
997 "var distrib_CDS = false;",
998 "var distrib_policy = false;",
1000 "for (var i = 0; i < jsonData.distributionStatusList.length; i++) { ",
1001 " if ((jsonData.distributionStatusList[i].omfComponentID === \"SO-COpenSource-Env11\") && (jsonData.distributionStatusList[i].status === \"DOWNLOAD_OK\"))",
1003 " distrib_SO = true;",
1005 " if ((jsonData.distributionStatusList[i].omfComponentID === \"aai-ml\") && (jsonData.distributionStatusList[i].status === \"DOWNLOAD_OK\"))",
1007 " distrib_AAI = true;",
1009 " if ((jsonData.distributionStatusList[i].omfComponentID === \"sdc-COpenSource-Env11-sdnc-dockero\") && (jsonData.distributionStatusList[i].status === \"DOWNLOAD_OK\"))",
1011 " distrib_SDNC = true;",
1013 " if ((jsonData.distributionStatusList[i].omfComponentID === \"multicloud-k8s-id\") && (jsonData.distributionStatusList[i].status === \"DOWNLOAD_OK\"))",
1015 " distrib_MultiCloud = true;",
1017 " if ((jsonData.distributionStatusList[i].omfComponentID === \"cds\") && (jsonData.distributionStatusList[i].status === \"DOWNLOAD_OK\"))",
1019 " distrib_CDS = true;",
1021 " if ((jsonData.distributionStatusList[i].omfComponentID === \"policy-id\") && (jsonData.distributionStatusList[i].status === \"DOWNLOAD_OK\"))",
1023 " distrib_policy = true;",
1028 "if (distrib_SO === false) {",
1029 " tests[pm.globals.get(\"service\")+\" not distributed to SO\"] = false;",
1033 " tests[pm.environment.get(\"service\")+\" distributed to SO\"] = true;",
1036 "if (distrib_AAI === false) {",
1037 " tests[pm.environment.get(\"service\")+\" not distributed to AAI\"] = false;",
1041 " tests[pm.environment.get(\"service\")+\" distributed to AAI\"] = true;",
1044 "if (distrib_SDNC === false) {",
1045 " tests[pm.environment.get(\"service\")+\" not distributed to SDNC\"] = false;",
1049 " tests[pm.environment.get(\"service\")+\" distributed to SDNC\"] = true;",
1051 "if (distrib_MultiCloud === false) {",
1052 " tests[pm.environment.get(\"service\")+\" not distributed to MultiCloud\"] = false;",
1056 " tests[pm.environment.get(\"service\")+\" distributed to MultiCloud\"] = true;",
1058 "if (distrib_CDS === false) {",
1059 " tests[pm.environment.get(\"service\")+\" not distributed to CDS\"] = false;",
1063 " tests[pm.environment.get(\"service\")+\" distributed to CDS\"] = true;",
1065 "if (distrib_policy === false) {",
1066 " tests[pm.environment.get(\"service\")+\" not distributed to Policy\"] = false;",
1070 " tests[pm.environment.get(\"service\")+\" distributed to Policy\"] = true;",
1074 "type": "text/javascript"
1078 "listen": "prerequest",
1080 "id": "9a1093c2-5c2d-47f6-892e-1a049cff8931",
1082 " var date = new Date();",
1083 " var curDate = null;",
1085 " curDate = new Date();",
1087 " while (curDate - date < 10000);"
1089 "type": "text/javascript"
1097 "key": "Content-Type",
1098 "value": "application/json"
1102 "value": "application/json"
1105 "key": "X-TransactionId",
1106 "value": "ONAP-Test"
1113 "key": "X-FromAppId",
1114 "value": "ONAP-Test"
1117 "key": "Authorization",
1118 "value": "Basic YmVlcDpib29w"
1121 "key": "x-ecomp-instanceid",
1122 "value": "ONAP-Test"
1130 "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/services/distribution/{{auto_distribution_id}}",
1142 "{{auto_distribution_id}}"