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 | 11c5783 | 2019-10-22 17:27:21 +0200 | [diff] [blame^] | 3 | "_postman_id": "8f0c4ff0-c762-4289-8547-daa0def307c1", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 4 | "name": "05_Onboard_VF", |
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 vf exists and get id", |
| 10 | "event": [ |
| 11 | { |
| 12 | "listen": "test", |
| 13 | "script": { |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 14 | "id": "a7d64193-edcb-4540-bcac-dde0f33a637f", |
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 | "", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 17 | "var vf_found = false;", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 18 | "if (pm.response.code === 404) {", |
Rene_Robert | 11c5783 | 2019-10-22 17:27:21 +0200 | [diff] [blame^] | 19 | " tests[pm.environment.get(\"vf_name\")+\" does not exists\"] = true;", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 20 | "}", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 21 | "else {", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 22 | " if (pm.response.code === 200) {", |
Rene Robert | 6edc789 | 2019-01-25 15:36:40 +0100 | [diff] [blame] | 23 | " tests[\"Status code is 200\"] = responseCode.code === 200;", |
| 24 | " }", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 25 | " var jsonData = pm.response.json();", |
Rene Robert | 6edc789 | 2019-01-25 15:36:40 +0100 | [diff] [blame] | 26 | " for (var i = 0; i < jsonData.length; i++) { ", |
Rene_Robert | 11c5783 | 2019-10-22 17:27:21 +0200 | [diff] [blame^] | 27 | " if (jsonData[i].name === pm.environment.get(\"vf_name\")) {", |
Rene Robert | 6edc789 | 2019-01-25 15:36:40 +0100 | [diff] [blame] | 28 | " vf_found = true;", |
Rene_Robert | 11c5783 | 2019-10-22 17:27:21 +0200 | [diff] [blame^] | 29 | " pm.environment.set(\"auto_vf_uuid\", \"\"+jsonData[i].uuid+\"\");", |
| 30 | " pm.environment.set(\"auto_vf_invariant_uuid\", \"\"+jsonData[i].invariantUUID+\"\");", |
Rene Robert | 6edc789 | 2019-01-25 15:36:40 +0100 | [diff] [blame] | 31 | " }", |
| 32 | " }", |
| 33 | " if (vf_found === false) {", |
Rene_Robert | 11c5783 | 2019-10-22 17:27:21 +0200 | [diff] [blame^] | 34 | " tests[pm.environment.get(\"vf_name\")+\" does not yet exists, we continue the run\"] = true;", |
Rene Robert | 6edc789 | 2019-01-25 15:36:40 +0100 | [diff] [blame] | 35 | " }", |
| 36 | " ", |
| 37 | " else {", |
Rene_Robert | 11c5783 | 2019-10-22 17:27:21 +0200 | [diff] [blame^] | 38 | " tests[pm.environment.get(\"vf_name\")+\" already exists, stop the run\"] = false;", |
Rene Robert | 6edc789 | 2019-01-25 15:36:40 +0100 | [diff] [blame] | 39 | " postman.setNextRequest(null);", |
| 40 | " }", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 41 | "}" |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 42 | ], |
| 43 | "type": "text/javascript" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 44 | } |
| 45 | } |
| 46 | ], |
| 47 | "request": { |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 48 | "method": "GET", |
| 49 | "header": [ |
| 50 | { |
| 51 | "key": "Content-Type", |
| 52 | "value": "application/json" |
| 53 | }, |
| 54 | { |
| 55 | "key": "Accept", |
| 56 | "value": "application/json" |
| 57 | }, |
| 58 | { |
| 59 | "key": "X-TransactionId", |
| 60 | "value": "ONAP-Test" |
| 61 | }, |
| 62 | { |
| 63 | "key": "USER_ID", |
| 64 | "value": "cs0008" |
| 65 | }, |
| 66 | { |
| 67 | "key": "X-FromAppId", |
| 68 | "value": "ONAP-Test" |
| 69 | }, |
| 70 | { |
| 71 | "key": "Authorization", |
| 72 | "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=" |
| 73 | }, |
| 74 | { |
| 75 | "key": "x-ecomp-instanceid", |
| 76 | "value": "ONAP-Test" |
| 77 | } |
| 78 | ], |
| 79 | "body": { |
| 80 | "mode": "raw", |
| 81 | "raw": "" |
| 82 | }, |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 83 | "url": { |
| 84 | "raw": "{{url-sdc}}/sdc/v1/catalog/resources?resourceType=VF", |
| 85 | "host": [ |
| 86 | "{{url-sdc}}" |
| 87 | ], |
| 88 | "path": [ |
| 89 | "sdc", |
| 90 | "v1", |
| 91 | "catalog", |
| 92 | "resources" |
| 93 | ], |
| 94 | "query": [ |
| 95 | { |
| 96 | "key": "resourceType", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 97 | "value": "VF" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 98 | } |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 99 | ] |
| 100 | } |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 101 | }, |
| 102 | "response": [] |
| 103 | }, |
| 104 | { |
| 105 | "name": "check VSP exists and get infos", |
| 106 | "event": [ |
| 107 | { |
| 108 | "listen": "test", |
| 109 | "script": { |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 110 | "id": "ff2f00ca-80fc-40d6-b6ec-aac08eb91759", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 111 | "exec": [ |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 112 | "pm.test(\"Status code is 200\", function () {", |
| 113 | " pm.response.to.have.status(200);", |
| 114 | "});", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 115 | "", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 116 | "var jsonData = pm.response.json();", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 117 | "var vsp_found = false;", |
| 118 | "for (var i = 0; i < jsonData.results.length; i++) { ", |
Rene_Robert | 11c5783 | 2019-10-22 17:27:21 +0200 | [diff] [blame^] | 119 | " if (jsonData.results[i].name === pm.environment.get(\"vsp_name\")) {", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 120 | " vsp_found = true;", |
Rene_Robert | 11c5783 | 2019-10-22 17:27:21 +0200 | [diff] [blame^] | 121 | " pm.environment.set(\"auto_vsp_id\", \"\"+jsonData.results[i].id+\"\");", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 122 | "", |
| 123 | " }", |
| 124 | "}", |
| 125 | "if (vsp_found === false) {", |
Rene_Robert | 11c5783 | 2019-10-22 17:27:21 +0200 | [diff] [blame^] | 126 | " tests[\"VSP \"+pm.environment.get(\"vsp_name\")+\" does not exists, we stop the run\"] = false;", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 127 | " postman.setNextRequest(null); ", |
| 128 | "}", |
| 129 | "", |
| 130 | "else {", |
Rene_Robert | 11c5783 | 2019-10-22 17:27:21 +0200 | [diff] [blame^] | 131 | " tests[\"VSP \"+pm.environment.get(\"vsp_name\")+\" exists, we can continue\"] = true;", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 132 | "}" |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 133 | ], |
| 134 | "type": "text/javascript" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 135 | } |
| 136 | } |
| 137 | ], |
| 138 | "request": { |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 139 | "method": "GET", |
| 140 | "header": [ |
| 141 | { |
| 142 | "key": "Content-Type", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 143 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 144 | }, |
| 145 | { |
| 146 | "key": "Accept", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 147 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 148 | }, |
| 149 | { |
| 150 | "key": "X-TransactionId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 151 | "value": "robot-ete-ba84612d-c1c6-4c53-9967-7b1dff276c7a" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 152 | }, |
| 153 | { |
| 154 | "key": "USER_ID", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 155 | "value": "cs0008" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 156 | }, |
| 157 | { |
| 158 | "key": "X-FromAppId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 159 | "value": "robot-ete" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 160 | } |
| 161 | ], |
| 162 | "body": { |
| 163 | "mode": "raw", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 164 | "raw": "" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 165 | }, |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 166 | "url": { |
| 167 | "raw": "{{url-sdc2}}/sdc1/feProxy/onboarding-api/v1.0/vendor-software-products", |
| 168 | "host": [ |
| 169 | "{{url-sdc2}}" |
| 170 | ], |
| 171 | "path": [ |
| 172 | "sdc1", |
| 173 | "feProxy", |
| 174 | "onboarding-api", |
| 175 | "v1.0", |
| 176 | "vendor-software-products" |
| 177 | ] |
| 178 | } |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 179 | }, |
| 180 | "response": [] |
| 181 | }, |
| 182 | { |
| 183 | "name": "Get VSP versions", |
| 184 | "event": [ |
| 185 | { |
| 186 | "listen": "test", |
| 187 | "script": { |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 188 | "id": "f16c158f-aceb-490c-924d-3ea83c2b9431", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 189 | "exec": [ |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 190 | "pm.test(\"Status code is 200\", function () {", |
| 191 | " pm.response.to.have.status(200);", |
| 192 | "});", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 193 | "", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 194 | "var jsonData = pm.response.json();", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 195 | "var vsp_found = false;", |
| 196 | "for (var i = 0; i < jsonData.results.length; i++) { ", |
Rene_Robert | 11c5783 | 2019-10-22 17:27:21 +0200 | [diff] [blame^] | 197 | " if (jsonData.results[i].name === pm.environment.get(\"vsp_name\")) {", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 198 | " vsp_found = true;", |
Rene_Robert | 11c5783 | 2019-10-22 17:27:21 +0200 | [diff] [blame^] | 199 | " pm.environment.set(\"auto_vsp_version_id\", \"\"+jsonData.results[i].id+\"\");", |
| 200 | " pm.environment.set(\"auto_vsp_version_name\", \"\"+jsonData.results[i].name+\"\");", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 201 | " }", |
| 202 | "}" |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 203 | ], |
| 204 | "type": "text/javascript" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 205 | } |
| 206 | } |
| 207 | ], |
| 208 | "request": { |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 209 | "method": "GET", |
| 210 | "header": [ |
| 211 | { |
| 212 | "key": "Content-Type", |
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": "Accept", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 217 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 218 | }, |
| 219 | { |
| 220 | "key": "X-TransactionId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 221 | "value": "robot-ete-ba84612d-c1c6-4c53-9967-7b1dff276c7a" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 222 | }, |
| 223 | { |
| 224 | "key": "USER_ID", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 225 | "value": "cs0008" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 226 | }, |
| 227 | { |
| 228 | "key": "X-FromAppId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 229 | "value": "robot-ete" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 230 | } |
| 231 | ], |
| 232 | "body": { |
| 233 | "mode": "raw", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 234 | "raw": "" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 235 | }, |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 236 | "url": { |
| 237 | "raw": "{{url-sdc2}}/sdc1/feProxy/onboarding-api/v1.0/items/{{auto_vsp_id}}/versions", |
| 238 | "host": [ |
| 239 | "{{url-sdc2}}" |
| 240 | ], |
| 241 | "path": [ |
| 242 | "sdc1", |
| 243 | "feProxy", |
| 244 | "onboarding-api", |
| 245 | "v1.0", |
| 246 | "items", |
| 247 | "{{auto_vsp_id}}", |
| 248 | "versions" |
| 249 | ] |
| 250 | } |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 251 | }, |
| 252 | "response": [] |
| 253 | }, |
| 254 | { |
| 255 | "name": "Get Vendor infos", |
| 256 | "event": [ |
| 257 | { |
| 258 | "listen": "test", |
| 259 | "script": { |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 260 | "id": "ed512660-e7af-450f-aa7e-b503c7e21a72", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 261 | "exec": [ |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 262 | "pm.test(\"Status code is 200\", function () {", |
| 263 | " pm.response.to.have.status(200);", |
| 264 | "});", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 265 | "", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 266 | "var jsonData = pm.response.json();", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 267 | "var vendor_found = false;", |
| 268 | "for (var i = 0; i < jsonData.results.length; i++) { ", |
Rene_Robert | 11c5783 | 2019-10-22 17:27:21 +0200 | [diff] [blame^] | 269 | " if (jsonData.results[i][\"name\"] === pm.environment.get(\"vendor_name\")) {", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 270 | " vendor_found = true;", |
Rene_Robert | 11c5783 | 2019-10-22 17:27:21 +0200 | [diff] [blame^] | 271 | " pm.environment.set(\"auto_vendor_id\", \"\"+jsonData.results[i][\"id\"]+\"\");", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 272 | " }", |
| 273 | "}", |
| 274 | "if (vendor_found === false) {", |
Rene_Robert | 11c5783 | 2019-10-22 17:27:21 +0200 | [diff] [blame^] | 275 | " tests[pm.environment.get(\"vendor_name\")+\" does not exists : we stop the run\"] = false;", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 276 | " postman.setNextRequest(null);", |
| 277 | "}", |
| 278 | "", |
| 279 | "else {", |
Rene_Robert | 11c5783 | 2019-10-22 17:27:21 +0200 | [diff] [blame^] | 280 | " tests[pm.environment.get(\"vendor_name\")+\" exists\"] = true;", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 281 | "}", |
| 282 | "", |
| 283 | "", |
| 284 | "" |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 285 | ], |
| 286 | "type": "text/javascript" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 287 | } |
| 288 | } |
| 289 | ], |
| 290 | "request": { |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 291 | "method": "GET", |
| 292 | "header": [ |
| 293 | { |
| 294 | "key": "Content-Type", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 295 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 296 | }, |
| 297 | { |
| 298 | "key": "Accept", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 299 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 300 | }, |
| 301 | { |
| 302 | "key": "X-TransactionId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 303 | "value": "robot-ete-ba84612d-c1c6-4c53-9967-7b1dff276c7a" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 304 | }, |
| 305 | { |
| 306 | "key": "USER_ID", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 307 | "value": "cs0008" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 308 | }, |
| 309 | { |
| 310 | "key": "X-FromAppId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 311 | "value": "robot-ete" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 312 | } |
| 313 | ], |
| 314 | "body": { |
| 315 | "mode": "raw", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 316 | "raw": "" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 317 | }, |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 318 | "url": { |
| 319 | "raw": "{{url-sdc2}}/sdc1/feProxy/onboarding-api/v1.0/vendor-license-models", |
| 320 | "host": [ |
| 321 | "{{url-sdc2}}" |
| 322 | ], |
| 323 | "path": [ |
| 324 | "sdc1", |
| 325 | "feProxy", |
| 326 | "onboarding-api", |
| 327 | "v1.0", |
| 328 | "vendor-license-models" |
| 329 | ] |
| 330 | } |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 331 | }, |
| 332 | "response": [] |
| 333 | }, |
| 334 | { |
| 335 | "name": "Create VF resource", |
| 336 | "event": [ |
| 337 | { |
| 338 | "listen": "test", |
| 339 | "script": { |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 340 | "id": "78a4913a-db8c-4c41-8fae-28e5bf6d90b4", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 341 | "exec": [ |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 342 | "pm.test(\"Status code is 201\", function () {", |
| 343 | " pm.response.to.have.status(201);", |
| 344 | "});", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 345 | "", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 346 | "var jsonData = pm.response.json();", |
Rene_Robert | 11c5783 | 2019-10-22 17:27:21 +0200 | [diff] [blame^] | 347 | "pm.environment.set(\"auto_vf_invariant_uuid\", \"\"+jsonData.invariantUUID+\"\");", |
| 348 | "pm.environment.set(\"auto_vf_uuid\", \"\"+jsonData.uuid+\"\");", |
| 349 | "pm.environment.set(\"auto_vf_unique_id\", \"\"+jsonData.uniqueId+\"\");", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 350 | "", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 351 | "tests[\"VF status is : \"+jsonData.lifecycleState] = jsonData.lifecycleState === \"NOT_CERTIFIED_CHECKOUT\";" |
| 352 | ], |
| 353 | "type": "text/javascript" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 354 | } |
| 355 | } |
| 356 | ], |
| 357 | "request": { |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 358 | "method": "POST", |
| 359 | "header": [ |
| 360 | { |
| 361 | "key": "Content-Type", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 362 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 363 | }, |
| 364 | { |
| 365 | "key": "Accept", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 366 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 367 | }, |
| 368 | { |
| 369 | "key": "X-TransactionId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 370 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 371 | }, |
| 372 | { |
| 373 | "key": "USER_ID", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 374 | "value": "cs0008" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 375 | }, |
| 376 | { |
| 377 | "key": "X-FromAppId", |
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": "Authorization", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 382 | "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 383 | }, |
| 384 | { |
| 385 | "key": "x-ecomp-instanceid", |
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 | "body": { |
| 390 | "mode": "raw", |
| 391 | "raw": "{\r\n\t\"artifacts\": {},\r\n\t\"toscaArtifacts\": {},\r\n\t\"contactId\": \"cs0008\",\r\n\t\"categories\": [{\r\n\t\t\"name\": \"Generic\",\r\n\t\t\"normalizedName\": \"generic\",\r\n\t\t\"uniqueId\": \"resourceNewCategory.generic\",\r\n\t\t\"icons\": null,\r\n\t\t\"subcategories\": [{\r\n\t\t\t\"name\": \"Abstract\",\r\n\t\t\t\"normalizedName\": \"abstract\",\r\n\t\t\t\"uniqueId\": \"resourceNewCategory.generic.abstract\",\r\n\t\t\t\"icons\": [\"objectStorage\", \"compute\"],\r\n\t\t\t\"groupings\": null,\r\n\t\t\t\"ownerId\": null,\r\n\t\t\t\"empty\": false\r\n\t\t}],\r\n\t\t\"ownerId\": null,\r\n\t\t\"empty\": false\r\n\t}],\r\n\t\"description\": \"VF named {{vf_name}}\",\r\n\t\"icon\": \"defaulticon\",\r\n\t\"componentInstancesProperties\": {},\r\n\t\"componentInstancesAttributes\": {},\r\n\t\"name\": \"{{vf_name}}\",\r\n\t\"tags\": [\"{{vf_name}}\"],\r\n\t\"capabilities\": {},\r\n\t\"requirements\": {},\r\n\t\"deploymentArtifacts\": {},\r\n\t\"componentType\": \"RESOURCE\",\r\n\t\"vendorName\": \"{{vendor_name}}\",\r\n\t\"vendorRelease\": \"1.0\",\r\n\t\"componentInstances\": [],\r\n\t\"properties\": [],\r\n\t\"attributes\": [],\r\n\t\"groups\": [],\r\n\t\"resourceType\": \"VF\",\r\n\t\"csarUUID\": \"{{auto_vsp_id}}\",\r\n\t\"csarVersion\": \"{{auto_vsp_version_name}}\"\r\n}" |
| 392 | }, |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 393 | "url": { |
| 394 | "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/resources", |
| 395 | "host": [ |
| 396 | "{{url-sdc2}}" |
| 397 | ], |
| 398 | "path": [ |
| 399 | "sdc1", |
| 400 | "feProxy", |
| 401 | "rest", |
| 402 | "v1", |
| 403 | "catalog", |
| 404 | "resources" |
| 405 | ] |
| 406 | } |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 407 | }, |
| 408 | "response": [] |
| 409 | }, |
| 410 | { |
| 411 | "name": "Checkin VF resource", |
| 412 | "event": [ |
| 413 | { |
| 414 | "listen": "test", |
| 415 | "script": { |
| 416 | "type": "text/javascript", |
| 417 | "exec": [ |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 418 | "var jsonData = pm.response.json();", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 419 | "", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 420 | "tests[\"VF status is : \"+jsonData.lifecycleState] = jsonData.lifecycleState === \"NOT_CERTIFIED_CHECKIN\";" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 421 | ] |
| 422 | } |
| 423 | } |
| 424 | ], |
| 425 | "request": { |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 426 | "method": "POST", |
| 427 | "header": [ |
| 428 | { |
| 429 | "key": "Content-Type", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 430 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 431 | }, |
| 432 | { |
| 433 | "key": "Accept", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 434 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 435 | }, |
| 436 | { |
| 437 | "key": "X-TransactionId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 438 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 439 | }, |
| 440 | { |
| 441 | "key": "USER_ID", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 442 | "value": "cs0008" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 443 | }, |
| 444 | { |
| 445 | "key": "X-FromAppId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 446 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 447 | }, |
| 448 | { |
| 449 | "key": "X-ECOMP-InstanceID", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 450 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 451 | }, |
| 452 | { |
| 453 | "key": "Authorization", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 454 | "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 455 | } |
| 456 | ], |
| 457 | "body": { |
| 458 | "mode": "raw", |
| 459 | "raw": "{\"userRemarks\": \"ONAP-Test checkin\"}" |
| 460 | }, |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 461 | "url": { |
| 462 | "raw": "{{url-sdc}}/sdc/v1/catalog/resources/{{auto_vf_uuid}}/lifecycleState/checkin", |
| 463 | "host": [ |
| 464 | "{{url-sdc}}" |
| 465 | ], |
| 466 | "path": [ |
| 467 | "sdc", |
| 468 | "v1", |
| 469 | "catalog", |
| 470 | "resources", |
| 471 | "{{auto_vf_uuid}}", |
| 472 | "lifecycleState", |
| 473 | "checkin" |
| 474 | ] |
| 475 | } |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 476 | }, |
| 477 | "response": [] |
| 478 | }, |
| 479 | { |
| 480 | "name": "Certify VF resource", |
| 481 | "event": [ |
| 482 | { |
| 483 | "listen": "test", |
| 484 | "script": { |
| 485 | "type": "text/javascript", |
| 486 | "exec": [ |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 487 | "var jsonData = pm.response.json();", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 488 | "", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 489 | "tests[\"VF status is : \"+jsonData.lifecycleState] = jsonData.lifecycleState === \"CERTIFIED\";" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 490 | ] |
| 491 | } |
| 492 | } |
| 493 | ], |
| 494 | "request": { |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 495 | "method": "POST", |
| 496 | "header": [ |
| 497 | { |
| 498 | "key": "Content-Type", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 499 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 500 | }, |
| 501 | { |
| 502 | "key": "Accept", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 503 | "value": "application/json" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 504 | }, |
| 505 | { |
| 506 | "key": "X-TransactionId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 507 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 508 | }, |
| 509 | { |
| 510 | "key": "USER_ID", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 511 | "value": "cs0008" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 512 | }, |
| 513 | { |
| 514 | "key": "X-FromAppId", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 515 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 516 | }, |
| 517 | { |
| 518 | "key": "Authorization", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 519 | "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 520 | }, |
| 521 | { |
| 522 | "key": "X-ECOMP-InstanceID", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 523 | "value": "ONAP-Test" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 524 | } |
| 525 | ], |
| 526 | "body": { |
| 527 | "mode": "raw", |
| 528 | "raw": "{\"userRemarks\": \"certify\"}" |
| 529 | }, |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 530 | "url": { |
| 531 | "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/resources/{{auto_vf_unique_id}}/lifecycleState/certify", |
| 532 | "host": [ |
| 533 | "{{url-sdc2}}" |
| 534 | ], |
| 535 | "path": [ |
| 536 | "sdc1", |
| 537 | "feProxy", |
| 538 | "rest", |
| 539 | "v1", |
| 540 | "catalog", |
| 541 | "resources", |
| 542 | "{{auto_vf_unique_id}}", |
| 543 | "lifecycleState", |
| 544 | "certify" |
| 545 | ] |
| 546 | } |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 547 | }, |
| 548 | "response": [] |
| 549 | }, |
| 550 | { |
| 551 | "name": "Get VF infos by uniqueId to get new vf_unique_Id (=new version id)", |
| 552 | "event": [ |
| 553 | { |
| 554 | "listen": "test", |
| 555 | "script": { |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 556 | "id": "8d831aa8-7760-44b4-aab4-da4724e8dfc9", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 557 | "exec": [ |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 558 | "pm.test(\"Status code is 200\", function () {", |
| 559 | " pm.response.to.have.status(200);", |
| 560 | "});", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 561 | "", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 562 | "var jsonData = pm.response.json();", |
Rene_Robert | 11c5783 | 2019-10-22 17:27:21 +0200 | [diff] [blame^] | 563 | "pm.environment.set(\"auto_vf_new_unique_id\", \"\"+jsonData[\"metadata\"][\"allVersions\"][\"1.0\"]+\"\");", |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 564 | "" |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 565 | ], |
| 566 | "type": "text/javascript" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 567 | } |
| 568 | } |
| 569 | ], |
| 570 | "request": { |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 571 | "method": "GET", |
| 572 | "header": [ |
| 573 | { |
| 574 | "key": "Content-Type", |
| 575 | "value": "application/json" |
| 576 | }, |
| 577 | { |
| 578 | "key": "Accept", |
| 579 | "value": "application/json" |
| 580 | }, |
| 581 | { |
| 582 | "key": "X-TransactionId", |
| 583 | "value": "ONAP-Test" |
| 584 | }, |
| 585 | { |
| 586 | "key": "USER_ID", |
| 587 | "value": "cs0008" |
| 588 | }, |
| 589 | { |
| 590 | "key": "X-FromAppId", |
| 591 | "value": "ONAP-Test" |
| 592 | }, |
| 593 | { |
| 594 | "key": "Authorization", |
| 595 | "value": "Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=" |
| 596 | }, |
| 597 | { |
| 598 | "key": "x-ecomp-instanceid", |
| 599 | "value": "ONAP-Test" |
| 600 | } |
| 601 | ], |
| 602 | "body": { |
| 603 | "mode": "raw", |
| 604 | "raw": "" |
| 605 | }, |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 606 | "url": { |
| 607 | "raw": "{{url-sdc2}}/sdc1/feProxy/rest/v1/catalog/resources/{{auto_vf_unique_id}}/filteredDataByParams?include=metadata", |
| 608 | "host": [ |
| 609 | "{{url-sdc2}}" |
| 610 | ], |
| 611 | "path": [ |
| 612 | "sdc1", |
| 613 | "feProxy", |
| 614 | "rest", |
| 615 | "v1", |
| 616 | "catalog", |
| 617 | "resources", |
| 618 | "{{auto_vf_unique_id}}", |
| 619 | "filteredDataByParams" |
| 620 | ], |
| 621 | "query": [ |
| 622 | { |
| 623 | "key": "include", |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 624 | "value": "metadata" |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 625 | } |
Rene_Robert | 0ebd04f | 2019-07-30 17:11:26 +0200 | [diff] [blame] | 626 | ] |
| 627 | } |
Rene Robert | 53ef77f | 2019-01-24 18:24:55 +0100 | [diff] [blame] | 628 | }, |
| 629 | "response": [] |
| 630 | } |
| 631 | ] |
| 632 | } |