Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1 | { |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 2 | "info": { |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 3 | "_postman_id": "4421ffe4-0af9-4957-949a-a183a02ad0c9", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 4 | "name": "06_Onboard_Service", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 5 | "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 6 | }, |
| 7 | "item": [ |
| 8 | { |
| 9 | "name": "check service exists and get infos", |
| 10 | "event": [ |
| 11 | { |
| 12 | "listen": "test", |
| 13 | "script": { |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 14 | "id": "4f27b99e-23ac-4e7c-a1dc-c42ad63d6f65", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 15 | "exec": [ |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 16 | "pm.test(\"Status code is 200\", function () {", |
| 17 | " pm.response.to.have.status(200);", |
| 18 | "});", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 19 | "", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 20 | "var jsonData = pm.response.json();", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 21 | "var service_found = false;", |
| 22 | "for (var i = 0; i < jsonData.length; i++) { ", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 23 | " if (jsonData[i].name === pm.globals.get(\"service\")) {", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 24 | " service_found = true;", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 25 | " pm.globals.set(\"auto_service_uuid\", \"\"+jsonData[i].uuid+\"\");", |
| 26 | " pm.globals.set(\"auto_service_invariant_uuid\", \"\"+jsonData[i].invariantUUID+\"\");", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 27 | " }", |
| 28 | "}", |
| 29 | "if (service_found === false) {", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 30 | " tests[pm.globals.get(\"service\")+\" does not exist yet, we continue the run\"] = true;", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 31 | "}", |
| 32 | "", |
| 33 | "else {", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 34 | " tests[pm.globals.get(\"service\")+\" already exists, stop the run\"] = false;", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 35 | " postman.setNextRequest(null);", |
| 36 | "}" |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 37 | ], |
| 38 | "type": "text/javascript" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 39 | } |
| 40 | } |
| 41 | ], |
| 42 | "request": { |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 43 | "method": "GET", |
| 44 | "header": [ |
| 45 | { |
| 46 | "key": "Content-Type", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 47 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 48 | }, |
| 49 | { |
| 50 | "key": "Accept", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 51 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 52 | }, |
| 53 | { |
| 54 | "key": "X-TransactionId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 55 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 56 | }, |
| 57 | { |
| 58 | "key": "USER_ID", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 59 | "value": "cs0008" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 60 | }, |
| 61 | { |
| 62 | "key": "X-FromAppId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 63 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 64 | }, |
| 65 | { |
| 66 | "key": "Authorization", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 67 | "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 68 | }, |
| 69 | { |
| 70 | "key": "x-ecomp-instanceid", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 71 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 72 | } |
| 73 | ], |
| 74 | "body": { |
| 75 | "mode": "raw", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 76 | "raw": "" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 77 | }, |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 78 | "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 Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 90 | }, |
| 91 | "response": [] |
| 92 | }, |
| 93 | { |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 94 | "name": "Declare an aLaCarte Service", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 95 | "event": [ |
| 96 | { |
| 97 | "listen": "test", |
| 98 | "script": { |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 99 | "id": "e6118e78-e476-4049-8e81-f81b53ba625a", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 100 | "exec": [ |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 101 | "pm.test(\"Status code is 201\", function () {", |
| 102 | " pm.response.to.have.status(201);", |
| 103 | "});", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 104 | "", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 105 | "var jsonData = pm.response.json();", |
| 106 | "pm.globals.set(\"auto_service_invariant_uuid\", \"\"+jsonData[\"invariantUUID\"]+\"\");", |
| 107 | "pm.globals.set(\"auto_service_uuid\", \"\"+jsonData[\"uuid\"]+\"\");", |
| 108 | "pm.globals.set(\"auto_service_unique_id\", \"\"+jsonData[\"uniqueId\"]+\"\");", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 109 | "", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 110 | "tests[\"Service status is : \"+jsonData.lifecycleState] = jsonData.lifecycleState === \"NOT_CERTIFIED_CHECKOUT\";" |
| 111 | ], |
| 112 | "type": "text/javascript" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 113 | } |
| 114 | } |
| 115 | ], |
| 116 | "request": { |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 117 | "method": "POST", |
| 118 | "header": [ |
| 119 | { |
| 120 | "key": "Content-Type", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 121 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 122 | }, |
| 123 | { |
| 124 | "key": "Accept", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 125 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 126 | }, |
| 127 | { |
| 128 | "key": "X-TransactionId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 129 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 130 | }, |
| 131 | { |
| 132 | "key": "USER_ID", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 133 | "value": "cs0008" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 134 | }, |
| 135 | { |
| 136 | "key": "X-FromAppId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 137 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 138 | }, |
| 139 | { |
| 140 | "key": "Authorization", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 141 | "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 142 | }, |
| 143 | { |
| 144 | "key": "x-ecomp-instanceid", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 145 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 146 | } |
| 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_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 152 | "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 Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 166 | }, |
| 167 | "response": [] |
| 168 | }, |
| 169 | { |
| 170 | "name": "check VF exists and get uuid", |
| 171 | "event": [ |
| 172 | { |
| 173 | "listen": "test", |
| 174 | "script": { |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 175 | "id": "87b90661-aefb-4ec9-94fc-fb5277f8c283", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 176 | "exec": [ |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 177 | "pm.test(\"Status code is 200\", function () {", |
| 178 | " pm.response.to.have.status(200);", |
| 179 | "});", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 180 | "", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 181 | "var jsonData = pm.response.json();", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 182 | "var vf_found = false;", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 183 | "if (jsonData.name === pm.globals.get(\"vf_name\")) {", |
| 184 | " vf_found = true;", |
| 185 | " pm.globals.set(\"auto_vf_uuid\", \"\"+jsonData.uuid+\"\");", |
| 186 | " pm.globals.set(\"auto_vf_invariant_uuid\", \"\"+jsonData.invariantUUID+\"\");", |
| 187 | " ", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 188 | "}", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 189 | "", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 190 | "if (vf_found === false) {", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 191 | " tests[\"VF \"+pm.globals.get(\"vf_name\")+\" does not exists, we stop the run\"] = false;", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 192 | " postman.setNextRequest(null);", |
| 193 | "", |
| 194 | "}", |
| 195 | "", |
| 196 | "else {", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 197 | " tests[\"VF \"+pm.globals.get(\"vf_name\")+\" exists, we continue the run\"] = true;", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 198 | "}" |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 199 | ], |
| 200 | "type": "text/javascript" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 201 | } |
| 202 | } |
| 203 | ], |
| 204 | "request": { |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 205 | "method": "GET", |
| 206 | "header": [ |
| 207 | { |
| 208 | "key": "Content-Type", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 209 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 210 | }, |
| 211 | { |
| 212 | "key": "Accept", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 213 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 214 | }, |
| 215 | { |
| 216 | "key": "X-TransactionId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 217 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 218 | }, |
| 219 | { |
| 220 | "key": "USER_ID", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 221 | "value": "cs0008" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 222 | }, |
| 223 | { |
| 224 | "key": "X-FromAppId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 225 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 226 | }, |
| 227 | { |
| 228 | "key": "Authorization", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 229 | "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 230 | }, |
| 231 | { |
| 232 | "key": "x-ecomp-instanceid", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 233 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 234 | } |
| 235 | ], |
| 236 | "body": { |
| 237 | "mode": "raw", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 238 | "raw": "" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 239 | }, |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 240 | "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 Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 254 | }, |
| 255 | "response": [] |
| 256 | }, |
| 257 | { |
| 258 | "name": "Get VF uniqueId", |
| 259 | "event": [ |
| 260 | { |
| 261 | "listen": "test", |
| 262 | "script": { |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 263 | "id": "16c73747-c973-40d9-ba3f-6061199386ec", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 264 | "exec": [ |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 265 | "pm.test(\"Status code is 200\", function () {", |
| 266 | " pm.response.to.have.status(200);", |
| 267 | "});", |
| 268 | "var jsonData = pm.response.json();", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 269 | "var vf_found = false;", |
| 270 | "for (var i = 0; i < jsonData.resources.length; i++) { ", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 271 | " if (jsonData.resources[i].name === pm.globals.get(\"vf_name\")) {", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 272 | " vf_found = true;", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 273 | " pm.globals.set(\"auto_vf_unique_id\", \"\"+jsonData.resources[i].uniqueId+\"\");", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 274 | " }", |
| 275 | "}", |
| 276 | "" |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 277 | ], |
| 278 | "type": "text/javascript" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 279 | } |
| 280 | } |
| 281 | ], |
| 282 | "request": { |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 283 | "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 Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 318 | "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_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 333 | "value": "VFCMT" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 334 | }, |
| 335 | { |
| 336 | "key": "excludeTypes", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 337 | "value": "Configuration" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 338 | } |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 339 | ] |
| 340 | } |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 341 | }, |
| 342 | "response": [] |
| 343 | }, |
| 344 | { |
| 345 | "name": "Add VF to Service", |
| 346 | "event": [ |
| 347 | { |
| 348 | "listen": "test", |
| 349 | "script": { |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 350 | "id": "897b4588-b2e6-4af6-b469-09ae6ea3b797", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 351 | "exec": [ |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 352 | "pm.test(\"Status code is 201\", function () {", |
| 353 | " pm.response.to.have.status(201);", |
| 354 | "});", |
| 355 | "var jsonData = pm.response.json();", |
| 356 | "pm.globals.set(\"auto_vf_customization_uuid\", \"\"+jsonData.customizationUUID+\"\");", |
| 357 | "pm.globals.set(\"auto_vf_name_for_model\", \"\"+jsonData.name+\"\");", |
| 358 | "", |
| 359 | "" |
| 360 | ], |
| 361 | "type": "text/javascript" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 362 | } |
| 363 | } |
| 364 | ], |
| 365 | "request": { |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 366 | "method": "POST", |
| 367 | "header": [ |
| 368 | { |
| 369 | "key": "Content-Type", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 370 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 371 | }, |
| 372 | { |
| 373 | "key": "Accept", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 374 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 375 | }, |
| 376 | { |
| 377 | "key": "X-TransactionId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 378 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 379 | }, |
| 380 | { |
| 381 | "key": "USER_ID", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 382 | "value": "cs0008" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 383 | }, |
| 384 | { |
| 385 | "key": "X-FromAppId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 386 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 387 | }, |
| 388 | { |
| 389 | "key": "Authorization", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 390 | "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 391 | }, |
| 392 | { |
| 393 | "key": "x-ecomp-instanceid", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 394 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 395 | } |
| 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_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 401 | "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) {", |
| 430 | " tests[pm.globals.get(\"virtual_link_type\")+\" does not exists\"] = true;", |
| 431 | "}", |
| 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++) { ", |
| 438 | " if (jsonData[i].name === pm.globals.get(\"virtual_link_type\")) {", |
| 439 | " vl_found = true;", |
| 440 | " pm.globals.set(\"auto_virtual_link_uuid\", \"\"+jsonData[i].uuid+\"\");", |
| 441 | " pm.globals.set(\"auto_virtual_link_invariant_uuid\", \"\"+jsonData[i].invariantUUID+\"\");", |
| 442 | " }", |
| 443 | " }", |
| 444 | " if (vl_found === false) {", |
| 445 | " tests[pm.globals.get(\"virtual_link_type\")+\" does not exists, we stop the run\"] = false;", |
| 446 | " postman.setNextRequest(null);", |
| 447 | " }", |
| 448 | " ", |
| 449 | " else {", |
| 450 | " tests[pm.globals.get(\"virtual_link_type\")+\" exists, we continue the run\"] = true;", |
| 451 | " }", |
| 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++) { ", |
| 530 | " if (jsonData.resources[i].name === pm.globals.get(\"virtual_link_type\")) {", |
| 531 | " vl_found = true;", |
| 532 | " pm.globals.set(\"auto_virtual_link_unique_id\", \"\"+jsonData.resources[i].uniqueId+\"\");", |
| 533 | " tests[\"Virtual Link : \"+pm.globals.get(\"virtual_link_type\")+\" found in SDC catalog with uniqueId = \"+pm.globals.get(\"auto_virtual_link_unique_id\")] = true;", |
| 534 | " }", |
| 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();", |
| 617 | "pm.globals.set(\"auto_virtual_link_customization_uuid\", \"\"+jsonData.customizationUUID+\"\");", |
| 618 | "pm.globals.set(\"auto_virtual_link_name_for_model\", \"\"+jsonData.name+\"\");", |
| 619 | "", |
| 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 Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 678 | }, |
| 679 | "response": [] |
| 680 | }, |
| 681 | { |
| 682 | "name": "Submit for testing", |
| 683 | "event": [ |
| 684 | { |
| 685 | "listen": "test", |
| 686 | "script": { |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 687 | "id": "f3215da0-5a6c-474c-9cc2-6733b36f1347", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 688 | "exec": [ |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 689 | "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 Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 699 | } |
| 700 | } |
| 701 | ], |
| 702 | "request": { |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 703 | "method": "POST", |
| 704 | "header": [ |
| 705 | { |
| 706 | "key": "Content-Type", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 707 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 708 | }, |
| 709 | { |
| 710 | "key": "Accept", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 711 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 712 | }, |
| 713 | { |
| 714 | "key": "X-TransactionId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 715 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 716 | }, |
| 717 | { |
| 718 | "key": "USER_ID", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 719 | "value": "cs0008" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 720 | }, |
| 721 | { |
| 722 | "key": "X-FromAppId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 723 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 724 | }, |
| 725 | { |
| 726 | "key": "Authorization", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 727 | "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 728 | }, |
| 729 | { |
| 730 | "key": "x-ecomp-instanceid", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 731 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 732 | } |
| 733 | ], |
| 734 | "body": { |
| 735 | "mode": "raw", |
| 736 | "raw": "{\"userRemarks\":\"please test\"}" |
| 737 | }, |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 738 | "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 Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 755 | }, |
| 756 | "response": [] |
| 757 | }, |
| 758 | { |
| 759 | "name": "Start Certification", |
| 760 | "event": [ |
| 761 | { |
| 762 | "listen": "test", |
| 763 | "script": { |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 764 | "id": "e9143951-e32e-4d93-b970-20b54ea64fd4", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 765 | "exec": [ |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 766 | "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 Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 774 | } |
| 775 | } |
| 776 | ], |
| 777 | "request": { |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 778 | "method": "POST", |
| 779 | "header": [ |
| 780 | { |
| 781 | "key": "Content-Type", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 782 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 783 | }, |
| 784 | { |
| 785 | "key": "Accept", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 786 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 787 | }, |
| 788 | { |
| 789 | "key": "X-TransactionId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 790 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 791 | }, |
| 792 | { |
| 793 | "key": "USER_ID", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 794 | "value": "jm0007" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 795 | }, |
| 796 | { |
| 797 | "key": "X-FromAppId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 798 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 799 | }, |
| 800 | { |
| 801 | "key": "Authorization", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 802 | "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 803 | }, |
| 804 | { |
| 805 | "key": "x-ecomp-instanceid", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 806 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 807 | } |
| 808 | ], |
| 809 | "body": { |
| 810 | "mode": "raw", |
| 811 | "raw": "{}" |
| 812 | }, |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 813 | "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 Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 830 | }, |
| 831 | "response": [] |
| 832 | }, |
| 833 | { |
| 834 | "name": "Certify", |
| 835 | "event": [ |
| 836 | { |
| 837 | "listen": "test", |
| 838 | "script": { |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 839 | "id": "2ca11efa-040f-4927-b30f-e58912f0db83", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 840 | "exec": [ |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 841 | "pm.test(\"Status code is 200\", function () {", |
| 842 | " pm.response.to.have.status(200);", |
| 843 | "});", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 844 | "", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 845 | "var jsonData = pm.response.json();", |
| 846 | "", |
| 847 | "tests[\"Service status is : \"+jsonData.lifecycleState] = jsonData.lifecycleState === \"CERTIFIED\";", |
| 848 | "", |
| 849 | "pm.globals.set(\"auto_service_new_unique_id\", \"\"+jsonData.uniqueId+\"\");", |
| 850 | "" |
| 851 | ], |
| 852 | "type": "text/javascript" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 853 | } |
| 854 | } |
| 855 | ], |
| 856 | "request": { |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 857 | "method": "POST", |
| 858 | "header": [ |
| 859 | { |
| 860 | "key": "Content-Type", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 861 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 862 | }, |
| 863 | { |
| 864 | "key": "Accept", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 865 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 866 | }, |
| 867 | { |
| 868 | "key": "X-TransactionId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 869 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 870 | }, |
| 871 | { |
| 872 | "key": "USER_ID", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 873 | "value": "jm0007" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 874 | }, |
| 875 | { |
| 876 | "key": "X-FromAppId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 877 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 878 | }, |
| 879 | { |
| 880 | "key": "Authorization", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 881 | "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 882 | }, |
| 883 | { |
| 884 | "key": "x-ecomp-instanceid", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 885 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 886 | } |
| 887 | ], |
| 888 | "body": { |
| 889 | "mode": "raw", |
| 890 | "raw": "{\"userRemarks\":\"ok\"}" |
| 891 | }, |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 892 | "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 Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 909 | }, |
| 910 | "response": [] |
| 911 | }, |
| 912 | { |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 913 | "name": "Get Service infos by uniqueID to get new_service_unique_id", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 914 | "event": [ |
| 915 | { |
| 916 | "listen": "test", |
| 917 | "script": { |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 918 | "id": "cecdbf68-2176-4dc1-8321-6285d57a2e8f", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 919 | "exec": [ |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 920 | "pm.test(\"Status code is 200\", function () {", |
| 921 | " pm.response.to.have.status(200);", |
| 922 | "});", |
| 923 | "", |
| 924 | "var jsonData = pm.response.json();", |
| 925 | "pm.globals.set(\"auto_service_new_unique_id\", \"\"+jsonData[\"metadata\"][\"allVersions\"][\"1.0\"]+\"\");", |
| 926 | "" |
| 927 | ], |
| 928 | "type": "text/javascript" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 929 | } |
| 930 | } |
| 931 | ], |
| 932 | "request": { |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 933 | "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 Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1015 | "method": "POST", |
| 1016 | "header": [ |
| 1017 | { |
| 1018 | "key": "Content-Type", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1019 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1020 | }, |
| 1021 | { |
| 1022 | "key": "Accept", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1023 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1024 | }, |
| 1025 | { |
| 1026 | "key": "X-TransactionId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1027 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1028 | }, |
| 1029 | { |
| 1030 | "key": "USER_ID", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1031 | "value": "gv0001" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1032 | }, |
| 1033 | { |
| 1034 | "key": "X-FromAppId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1035 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1036 | }, |
| 1037 | { |
| 1038 | "key": "Authorization", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1039 | "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1040 | }, |
| 1041 | { |
| 1042 | "key": "x-ecomp-instanceid", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1043 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1044 | } |
| 1045 | ], |
| 1046 | "body": { |
| 1047 | "mode": "raw", |
| 1048 | "raw": "{\"userRemarks\":\"ok\"}" |
| 1049 | }, |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1050 | "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 Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1067 | }, |
| 1068 | "response": [] |
| 1069 | }, |
| 1070 | { |
| 1071 | "name": "Distribute service", |
| 1072 | "event": [ |
| 1073 | { |
| 1074 | "listen": "test", |
| 1075 | "script": { |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1076 | "id": "cf7fe737-3858-4235-88b8-73640775d871", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1077 | "exec": [ |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1078 | "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 | "", |
| 1086 | "pm.globals.set(\"auto_vf_module_model_name\", \"\"+jsonData.componentInstances[0].groupInstances[0].groupName+\"\");", |
| 1087 | "pm.globals.set(\"auto_vf_module_model_customization_name\", \"\"+jsonData.componentInstances[0].groupInstances[0].groupName+\"\");", |
| 1088 | "pm.globals.set(\"auto_vf_module_model_uuid\", \"\"+jsonData.componentInstances[0].groupInstances[0].groupUUID+\"\");", |
| 1089 | "pm.globals.set(\"auto_vf_module_model_invariant_uuid\", \"\"+jsonData.componentInstances[0].groupInstances[0].invariantUUID+\"\");", |
| 1090 | "pm.globals.set(\"auto_vf_module_model_customization_uuid\", \"\"+jsonData.componentInstances[0].groupInstances[0].customizationUUID+\"\");", |
| 1091 | "pm.globals.set(\"auto_virtual_link_model_customization_uuid\", \"\"+jsonData.componentInstances[1].customizationUUID+\"\");" |
| 1092 | ], |
| 1093 | "type": "text/javascript" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1094 | } |
| 1095 | } |
| 1096 | ], |
| 1097 | "request": { |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1098 | "method": "POST", |
| 1099 | "header": [ |
| 1100 | { |
| 1101 | "key": "Content-Type", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1102 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1103 | }, |
| 1104 | { |
| 1105 | "key": "Accept", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1106 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1107 | }, |
| 1108 | { |
| 1109 | "key": "X-TransactionId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1110 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1111 | }, |
| 1112 | { |
| 1113 | "key": "USER_ID", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1114 | "value": "op0001" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1115 | }, |
| 1116 | { |
| 1117 | "key": "X-FromAppId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1118 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1119 | }, |
| 1120 | { |
| 1121 | "key": "Authorization", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1122 | "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1123 | }, |
| 1124 | { |
| 1125 | "key": "x-ecomp-instanceid", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1126 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1127 | } |
| 1128 | ], |
| 1129 | "body": { |
| 1130 | "mode": "raw", |
| 1131 | "raw": "{}" |
| 1132 | }, |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1133 | "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 Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1151 | }, |
| 1152 | "response": [] |
| 1153 | }, |
| 1154 | { |
| 1155 | "name": "check distribution", |
| 1156 | "event": [ |
| 1157 | { |
| 1158 | "listen": "test", |
| 1159 | "script": { |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1160 | "id": "401f90b3-649f-4f3f-a2bd-ef996a54e47b", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1161 | "exec": [ |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1162 | "pm.test(\"Status code is 200\", function () {", |
| 1163 | " pm.response.to.have.status(200);", |
| 1164 | "});", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1165 | "", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1166 | "var jsonData = pm.response.json();", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1167 | "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_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1171 | " pm.globals.set(\"auto_distribution_id\", \"\"+jsonData.distributionStatusOfServiceList[i].distributionID+\"\");", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1172 | "", |
| 1173 | " }", |
| 1174 | "}", |
| 1175 | "if (distrib_done === false) {", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1176 | " tests[pm.globals.get(\"service\")+\" not distributed, we stop the run\"] = false;", |
| 1177 | " postman.setNextRequest(null);", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1178 | "}", |
| 1179 | "", |
| 1180 | "else {", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1181 | " tests[pm.globals.get(\"service\")+\" distributed\"] = true;", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1182 | "}" |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1183 | ], |
| 1184 | "type": "text/javascript" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1185 | } |
| 1186 | } |
| 1187 | ], |
| 1188 | "request": { |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1189 | "method": "GET", |
| 1190 | "header": [ |
| 1191 | { |
| 1192 | "key": "Content-Type", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1193 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1194 | }, |
| 1195 | { |
| 1196 | "key": "Accept", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1197 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1198 | }, |
| 1199 | { |
| 1200 | "key": "X-TransactionId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1201 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1202 | }, |
| 1203 | { |
| 1204 | "key": "USER_ID", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1205 | "value": "op0001" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1206 | }, |
| 1207 | { |
| 1208 | "key": "X-FromAppId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1209 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1210 | }, |
| 1211 | { |
| 1212 | "key": "Authorization", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1213 | "value": "Basic YmVlcDpib29w" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1214 | }, |
| 1215 | { |
| 1216 | "key": "x-ecomp-instanceid", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1217 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1218 | } |
| 1219 | ], |
| 1220 | "body": { |
| 1221 | "mode": "raw", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1222 | "raw": "" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1223 | }, |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1224 | "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 Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1240 | }, |
| 1241 | "response": [] |
| 1242 | }, |
| 1243 | { |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1244 | "name": "check distribution fully completed after 60s", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1245 | "event": [ |
| 1246 | { |
| 1247 | "listen": "test", |
| 1248 | "script": { |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1249 | "id": "86932912-3b35-409d-bdbf-003550969f10", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1250 | "exec": [ |
| 1251 | "tests[\"Status code is 200\"] = responseCode.code === 200;", |
| 1252 | "", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1253 | "var jsonData = pm.response.json();", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1254 | "var distrib_SO = false;", |
| 1255 | "var distrib_AAI = false;", |
| 1256 | "var distrib_SDNC = false;", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1257 | "var distrib_MultiCloud = false;", |
| 1258 | "var distrib_CDS = false;", |
| 1259 | "var distrib_policy = false;", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1260 | "", |
| 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_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1274 | " 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 Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1286 | "}", |
| 1287 | "", |
| 1288 | "", |
| 1289 | "if (distrib_SO === false) {", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1290 | " tests[pm.globals.get(\"service\")+\" not distributed to SO\"] = false;", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1291 | "}", |
| 1292 | "", |
| 1293 | "else {", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1294 | " tests[pm.globals.get(\"service\")+\" distributed to SO\"] = true;", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1295 | "}", |
| 1296 | "", |
| 1297 | "if (distrib_AAI === false) {", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1298 | " tests[pm.globals.get(\"service\")+\" not distributed to AAI\"] = false;", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1299 | "}", |
| 1300 | "", |
| 1301 | "else {", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1302 | " tests[pm.globals.get(\"service\")+\" distributed to AAI\"] = true;", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1303 | "}", |
| 1304 | "", |
| 1305 | "if (distrib_SDNC === false) {", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1306 | " tests[pm.globals.get(\"service\")+\" not distributed to SDNC\"] = false;", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1307 | "}", |
| 1308 | "", |
| 1309 | "else {", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1310 | " tests[pm.globals.get(\"service\")+\" distributed to SDNC\"] = true;", |
| 1311 | "}", |
| 1312 | "if (distrib_MultiCloud === false) {", |
| 1313 | " tests[pm.globals.get(\"service\")+\" not distributed to MultiCloud\"] = false;", |
| 1314 | "}", |
| 1315 | "", |
| 1316 | "else {", |
| 1317 | " tests[pm.globals.get(\"service\")+\" distributed to MultiCloud\"] = true;", |
| 1318 | "}", |
| 1319 | "if (distrib_CDS === false) {", |
| 1320 | " tests[pm.globals.get(\"service\")+\" not distributed to CDS\"] = false;", |
| 1321 | "}", |
| 1322 | "", |
| 1323 | "else {", |
| 1324 | " tests[pm.globals.get(\"service\")+\" distributed to CDS\"] = true;", |
| 1325 | "}", |
| 1326 | "if (distrib_policy === false) {", |
| 1327 | " tests[pm.globals.get(\"service\")+\" not distributed to Policy\"] = false;", |
| 1328 | "}", |
| 1329 | "", |
| 1330 | "else {", |
| 1331 | " tests[pm.globals.get(\"service\")+\" distributed to Policy\"] = true;", |
| 1332 | "}", |
| 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 Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1351 | } |
| 1352 | } |
| 1353 | ], |
| 1354 | "request": { |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1355 | "method": "GET", |
| 1356 | "header": [ |
| 1357 | { |
| 1358 | "key": "Content-Type", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1359 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1360 | }, |
| 1361 | { |
| 1362 | "key": "Accept", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1363 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1364 | }, |
| 1365 | { |
| 1366 | "key": "X-TransactionId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1367 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1368 | }, |
| 1369 | { |
| 1370 | "key": "USER_ID", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1371 | "value": "op0001" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1372 | }, |
| 1373 | { |
| 1374 | "key": "X-FromAppId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1375 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1376 | }, |
| 1377 | { |
| 1378 | "key": "Authorization", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1379 | "value": "Basic YmVlcDpib29w" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1380 | }, |
| 1381 | { |
| 1382 | "key": "x-ecomp-instanceid", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1383 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1384 | } |
| 1385 | ], |
| 1386 | "body": { |
| 1387 | "mode": "raw", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1388 | "raw": "" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1389 | }, |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 1390 | "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 Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 1406 | }, |
| 1407 | "response": [] |
| 1408 | } |
| 1409 | ] |
| 1410 | } |