blob: 557b55727e8fec2a89e749904771882154805698 [file] [log] [blame]
Rene Robert53ef77f2019-01-24 18:24:55 +01001{
Rene Robert53ef77f2019-01-24 18:24:55 +01002 "info": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +02003 "_postman_id": "e226e82c-74b6-42bc-a1e9-1168b860a234",
Rene Robert53ef77f2019-01-24 18:24:55 +01004 "name": "02_Onboard_VSP_part1",
Rene_Robert0ebd04f2019-07-30 17:11:26 +02005 "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
Rene Robert53ef77f2019-01-24 18:24:55 +01006 },
7 "item": [
8 {
9 "name": "check VSP exists",
10 "event": [
11 {
12 "listen": "test",
13 "script": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +020014 "id": "dc866867-2909-4844-9072-01c9e2e4e856",
Rene Robert53ef77f2019-01-24 18:24:55 +010015 "exec": [
Rene_Robert0ebd04f2019-07-30 17:11:26 +020016 "pm.test(\"Status code is 200\", function () {",
17 " pm.response.to.have.status(200);",
18 "});",
Rene Robert53ef77f2019-01-24 18:24:55 +010019 "",
Rene_Robert0ebd04f2019-07-30 17:11:26 +020020 "var jsonData = pm.response.json();",
Rene Robert53ef77f2019-01-24 18:24:55 +010021 "var vsp_found = false;",
Rene_Robert0ebd04f2019-07-30 17:11:26 +020022 "for (var i = 0; i < jsonData.results.length; i++) { ",
23 " if (jsonData.results[i].name === pm.globals.get(\"vsp_name\")) {",
Rene Robert53ef77f2019-01-24 18:24:55 +010024 " vsp_found = true;",
25 " }",
26 "}",
27 "",
28 "if (vsp_found === false) {",
Rene_Robert0ebd04f2019-07-30 17:11:26 +020029 " tests[pm.globals.get(\"vsp_name\")+\" does not yet exist, we continue\"] = true;",
Rene Robert53ef77f2019-01-24 18:24:55 +010030 "}",
31 "",
32 "else {",
Rene_Robert0ebd04f2019-07-30 17:11:26 +020033 " tests[pm.globals.get(\"vsp_name\")+\" already exists, we stop the run\"] = false;",
Rene Robert53ef77f2019-01-24 18:24:55 +010034 " postman.setNextRequest(null);",
35 "}"
Rene_Robert0ebd04f2019-07-30 17:11:26 +020036 ],
37 "type": "text/javascript"
Rene Robert53ef77f2019-01-24 18:24:55 +010038 }
39 }
40 ],
41 "request": {
Rene Robert53ef77f2019-01-24 18:24:55 +010042 "method": "GET",
43 "header": [
44 {
45 "key": "Content-Type",
Rene_Robert0ebd04f2019-07-30 17:11:26 +020046 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +010047 },
48 {
49 "key": "Accept",
Rene_Robert0ebd04f2019-07-30 17:11:26 +020050 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +010051 },
52 {
53 "key": "X-TransactionId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +020054 "value": "robot-ete-ba84612d-c1c6-4c53-9967-7b1dff276c7a"
Rene Robert53ef77f2019-01-24 18:24:55 +010055 },
56 {
57 "key": "USER_ID",
Rene_Robert0ebd04f2019-07-30 17:11:26 +020058 "value": "cs0008"
Rene Robert53ef77f2019-01-24 18:24:55 +010059 },
60 {
61 "key": "X-FromAppId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +020062 "value": "robot-ete"
Rene Robert53ef77f2019-01-24 18:24:55 +010063 }
64 ],
65 "body": {
66 "mode": "raw",
Rene_Robert0ebd04f2019-07-30 17:11:26 +020067 "raw": ""
Rene Robert53ef77f2019-01-24 18:24:55 +010068 },
Rene_Robert0ebd04f2019-07-30 17:11:26 +020069 "url": {
70 "raw": "{{url-sdc2}}/sdc1/feProxy/onboarding-api/v1.0/vendor-software-products",
71 "host": [
72 "{{url-sdc2}}"
73 ],
74 "path": [
75 "sdc1",
76 "feProxy",
77 "onboarding-api",
78 "v1.0",
79 "vendor-software-products"
80 ]
81 }
Rene Robert53ef77f2019-01-24 18:24:55 +010082 },
83 "response": []
84 },
85 {
86 "name": "Get Vendor infos",
87 "event": [
88 {
89 "listen": "test",
90 "script": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +020091 "id": "dbd0ea7f-5f66-4431-8a51-2e5d757647a0",
Rene Robert53ef77f2019-01-24 18:24:55 +010092 "exec": [
Rene_Robert0ebd04f2019-07-30 17:11:26 +020093 "pm.test(\"Status code is 200\", function () {",
94 " pm.response.to.have.status(200);",
95 "});",
Rene Robert53ef77f2019-01-24 18:24:55 +010096 "",
Rene_Robert0ebd04f2019-07-30 17:11:26 +020097 "",
98 "var jsonData = pm.response.json();",
Rene Robert53ef77f2019-01-24 18:24:55 +010099 "var vendor_found = false;",
100 "for (var i = 0; i < jsonData.results.length; i++) { ",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200101 " if (jsonData.results[i].name === pm.globals.get(\"vendor_name\")) {",
Rene Robert53ef77f2019-01-24 18:24:55 +0100102 " vendor_found = true;",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200103 " pm.globals.set(\"auto_vendor_id\", \"\"+jsonData.results[i].id+\"\");",
Rene Robert53ef77f2019-01-24 18:24:55 +0100104 " }",
105 "}",
106 "if (vendor_found === false) {",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200107 " tests[pm.globals.get(\"vendor_name\")+\" does not exists : we stop the run\"] = false;",
Rene Robert53ef77f2019-01-24 18:24:55 +0100108 " postman.setNextRequest(null);",
109 "}",
110 "",
111 "else {",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200112 " tests[pm.globals.get(\"vendor_name\")+\" exists\"] = true;",
Rene Robert53ef77f2019-01-24 18:24:55 +0100113 "}",
114 "",
115 "",
116 ""
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200117 ],
118 "type": "text/javascript"
Rene Robert53ef77f2019-01-24 18:24:55 +0100119 }
120 }
121 ],
122 "request": {
Rene Robert53ef77f2019-01-24 18:24:55 +0100123 "method": "GET",
124 "header": [
125 {
126 "key": "Content-Type",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200127 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100128 },
129 {
130 "key": "Accept",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200131 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100132 },
133 {
134 "key": "X-TransactionId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200135 "value": "robot-ete-ba84612d-c1c6-4c53-9967-7b1dff276c7a"
Rene Robert53ef77f2019-01-24 18:24:55 +0100136 },
137 {
138 "key": "USER_ID",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200139 "value": "cs0008"
Rene Robert53ef77f2019-01-24 18:24:55 +0100140 },
141 {
142 "key": "X-FromAppId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200143 "value": "robot-ete"
Rene Robert53ef77f2019-01-24 18:24:55 +0100144 }
145 ],
146 "body": {
147 "mode": "raw",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200148 "raw": ""
Rene Robert53ef77f2019-01-24 18:24:55 +0100149 },
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200150 "url": {
151 "raw": "{{url-sdc2}}/sdc1/feProxy/onboarding-api/v1.0/vendor-license-models",
152 "host": [
153 "{{url-sdc2}}"
154 ],
155 "path": [
156 "sdc1",
157 "feProxy",
158 "onboarding-api",
159 "v1.0",
160 "vendor-license-models"
161 ]
162 }
Rene Robert53ef77f2019-01-24 18:24:55 +0100163 },
164 "response": []
165 },
166 {
167 "name": "Create VSP",
168 "event": [
169 {
170 "listen": "test",
171 "script": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200172 "id": "739f040c-f4b1-4790-bfce-4f5dae60b637",
Rene Robert53ef77f2019-01-24 18:24:55 +0100173 "exec": [
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200174 "pm.test(\"Status code is 200\", function () {",
175 " pm.response.to.have.status(200);",
176 "});",
Rene Robert53ef77f2019-01-24 18:24:55 +0100177 "",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200178 "var jsonData = pm.response.json();",
179 "pm.globals.set(\"auto_vsp_id\", \"\"+jsonData.itemId+\"\");",
180 "pm.globals.set(\"auto_vsp_version_id\", \"\"+jsonData.version.id+\"\");",
181 "pm.globals.set(\"auto_vsp_version_name\", \"\"+jsonData.version.name+\"\");",
Rene Robert53ef77f2019-01-24 18:24:55 +0100182 "",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200183 "tests[\"VSP version is : \"+jsonData.version.status] = jsonData.version.status === \"Draft\";"
184 ],
185 "type": "text/javascript"
Rene Robert53ef77f2019-01-24 18:24:55 +0100186 }
187 }
188 ],
189 "request": {
Rene Robert53ef77f2019-01-24 18:24:55 +0100190 "method": "POST",
191 "header": [
192 {
193 "key": "Content-Type",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200194 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100195 },
196 {
197 "key": "Accept",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200198 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100199 },
200 {
201 "key": "X-TransactionId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200202 "value": "robot-ete-ba84612d-c1c6-4c53-9967-7b1dff276c7a"
Rene Robert53ef77f2019-01-24 18:24:55 +0100203 },
204 {
205 "key": "USER_ID",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200206 "value": "cs0008"
Rene Robert53ef77f2019-01-24 18:24:55 +0100207 },
208 {
209 "key": "X-FromAppId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200210 "value": "robot-ete"
Rene Robert53ef77f2019-01-24 18:24:55 +0100211 }
212 ],
213 "body": {
214 "mode": "raw",
215 "raw": "{\r\n \"name\": \"{{vsp_name}}\",\r\n \"description\": \"vendor software product\",\r\n \"icon\": \"icon\",\r\n \"category\": \"resourceNewCategory.generic\",\r\n \"subCategory\": \"resourceNewCategory.generic.abstract\",\r\n \"vendorName\": \"{{vendor_name}}\",\r\n \"vendorId\": \"{{auto_vendor_id}}\",\r\n \"licensingData\": {},\r\n \"onboardingMethod\": \"NetworkPackage\"\r\n}"
216 },
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200217 "url": {
218 "raw": "{{url-sdc2}}/sdc1/feProxy/onboarding-api/v1.0/vendor-software-products",
219 "host": [
220 "{{url-sdc2}}"
221 ],
222 "path": [
223 "sdc1",
224 "feProxy",
225 "onboarding-api",
226 "v1.0",
227 "vendor-software-products"
228 ]
229 }
Rene Robert53ef77f2019-01-24 18:24:55 +0100230 },
231 "response": [
232 {
Rene Robert53ef77f2019-01-24 18:24:55 +0100233 "name": "Create Vendor Software Product",
234 "originalRequest": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200235 "method": "GET",
Rene Robert53ef77f2019-01-24 18:24:55 +0100236 "header": [],
237 "body": {
238 "mode": "raw",
239 "raw": ""
240 },
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200241 "url": {
242 "raw": ""
243 }
Rene Robert53ef77f2019-01-24 18:24:55 +0100244 },
245 "status": "OK",
246 "code": 200,
247 "_postman_previewlanguage": "json",
Rene Robert53ef77f2019-01-24 18:24:55 +0100248 "header": [
249 {
Rene Robert53ef77f2019-01-24 18:24:55 +0100250 "key": "access-control-allow-credentials",
251 "value": "true",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200252 "name": "access-control-allow-credentials",
Rene Robert53ef77f2019-01-24 18:24:55 +0100253 "description": "Indicates whether or not the response to the request can be exposed when the credentials flag is true. When used as part of a response to a preflight request, this indicates whether or not the actual request can be made using credentials."
254 },
255 {
Rene Robert53ef77f2019-01-24 18:24:55 +0100256 "key": "access-control-allow-origin",
257 "value": "chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200258 "name": "access-control-allow-origin",
Rene Robert53ef77f2019-01-24 18:24:55 +0100259 "description": "Specifies a URI that may access the resource. For requests without credentials, the server may specify '*' as a wildcard, thereby allowing any origin to access the resource."
260 },
261 {
Rene Robert53ef77f2019-01-24 18:24:55 +0100262 "key": "access-control-expose-headers",
263 "value": "",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200264 "name": "access-control-expose-headers",
Rene Robert53ef77f2019-01-24 18:24:55 +0100265 "description": "Lets a server whitelist headers that browsers are allowed to access."
266 },
267 {
Rene Robert53ef77f2019-01-24 18:24:55 +0100268 "key": "content-type",
269 "value": "application/json",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200270 "name": "content-type",
Rene Robert53ef77f2019-01-24 18:24:55 +0100271 "description": "The mime type of this content"
272 },
273 {
Rene Robert53ef77f2019-01-24 18:24:55 +0100274 "key": "date",
275 "value": "Wed, 06 Jun 2018 15:02:46 GMT",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200276 "name": "date",
Rene Robert53ef77f2019-01-24 18:24:55 +0100277 "description": "The date and time that the message was sent"
278 },
279 {
Rene Robert53ef77f2019-01-24 18:24:55 +0100280 "key": "server",
281 "value": "Jetty(9.3.21.v20170918)",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200282 "name": "server",
Rene Robert53ef77f2019-01-24 18:24:55 +0100283 "description": "A name for the server"
284 },
285 {
Rene Robert53ef77f2019-01-24 18:24:55 +0100286 "key": "transfer-encoding",
287 "value": "chunked",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200288 "name": "transfer-encoding",
Rene Robert53ef77f2019-01-24 18:24:55 +0100289 "description": "The form of encoding used to safely transfer the entity to the user. Currently defined methods are: chunked, compress, deflate, gzip, identity."
290 }
291 ],
292 "cookie": [],
Rene Robert53ef77f2019-01-24 18:24:55 +0100293 "body": "{\"vspId\":\"b3267b0aefbd4e2ea52be0e414139b1c\"}"
294 }
295 ]
296 },
297 {
298 "name": "Get VSP versions",
299 "event": [
300 {
301 "listen": "test",
302 "script": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200303 "id": "5e55115d-c797-4b34-bfaf-d2af24d62c01",
Rene Robert53ef77f2019-01-24 18:24:55 +0100304 "exec": [
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200305 "pm.test(\"Status code is 200\", function () {",
306 " pm.response.to.have.status(200);",
307 "});"
308 ],
309 "type": "text/javascript"
Rene Robert53ef77f2019-01-24 18:24:55 +0100310 }
311 }
312 ],
313 "request": {
Rene Robert53ef77f2019-01-24 18:24:55 +0100314 "method": "GET",
315 "header": [
316 {
317 "key": "Content-Type",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200318 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100319 },
320 {
321 "key": "Accept",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200322 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100323 },
324 {
325 "key": "X-TransactionId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200326 "value": "robot-ete-ba84612d-c1c6-4c53-9967-7b1dff276c7a"
Rene Robert53ef77f2019-01-24 18:24:55 +0100327 },
328 {
329 "key": "USER_ID",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200330 "value": "cs0008"
Rene Robert53ef77f2019-01-24 18:24:55 +0100331 },
332 {
333 "key": "X-FromAppId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200334 "value": "robot-ete"
Rene Robert53ef77f2019-01-24 18:24:55 +0100335 }
336 ],
337 "body": {
338 "mode": "raw",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200339 "raw": ""
Rene Robert53ef77f2019-01-24 18:24:55 +0100340 },
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200341 "url": {
342 "raw": "{{url-sdc2}}/sdc1/feProxy/onboarding-api/v1.0/items/{{auto_vsp_id}}/versions",
343 "host": [
344 "{{url-sdc2}}"
345 ],
346 "path": [
347 "sdc1",
348 "feProxy",
349 "onboarding-api",
350 "v1.0",
351 "items",
352 "{{auto_vsp_id}}",
353 "versions"
354 ]
355 }
Rene Robert53ef77f2019-01-24 18:24:55 +0100356 },
357 "response": []
358 },
359 {
360 "name": "Get VSP status",
361 "event": [
362 {
363 "listen": "test",
364 "script": {
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200365 "id": "2492d06b-4b31-4d93-aaf2-3417419c6e14",
Rene Robert53ef77f2019-01-24 18:24:55 +0100366 "exec": [
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200367 "pm.test(\"Status code is 200\", function () {",
368 " pm.response.to.have.status(200);",
369 "});",
370 ""
371 ],
372 "type": "text/javascript"
Rene Robert53ef77f2019-01-24 18:24:55 +0100373 }
374 }
375 ],
376 "request": {
Rene Robert53ef77f2019-01-24 18:24:55 +0100377 "method": "GET",
378 "header": [
379 {
380 "key": "Content-Type",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200381 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100382 },
383 {
384 "key": "Accept",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200385 "value": "application/json"
Rene Robert53ef77f2019-01-24 18:24:55 +0100386 },
387 {
388 "key": "X-TransactionId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200389 "value": "robot-ete-ba84612d-c1c6-4c53-9967-7b1dff276c7a"
Rene Robert53ef77f2019-01-24 18:24:55 +0100390 },
391 {
392 "key": "USER_ID",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200393 "value": "cs0008"
Rene Robert53ef77f2019-01-24 18:24:55 +0100394 },
395 {
396 "key": "X-FromAppId",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200397 "value": "robot-ete"
Rene Robert53ef77f2019-01-24 18:24:55 +0100398 }
399 ],
400 "body": {
401 "mode": "raw",
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200402 "raw": ""
Rene Robert53ef77f2019-01-24 18:24:55 +0100403 },
Rene_Robert0ebd04f2019-07-30 17:11:26 +0200404 "url": {
405 "raw": "{{url-sdc2}}/sdc1/feProxy/onboarding-api/v1.0/items/{{auto_vsp_id}}/versions/{{auto_vsp_version_id}}",
406 "host": [
407 "{{url-sdc2}}"
408 ],
409 "path": [
410 "sdc1",
411 "feProxy",
412 "onboarding-api",
413 "v1.0",
414 "items",
415 "{{auto_vsp_id}}",
416 "versions",
417 "{{auto_vsp_version_id}}"
418 ]
419 }
Rene Robert53ef77f2019-01-24 18:24:55 +0100420 },
421 "response": []
422 }
423 ]
424}