blob: b0a0d8c713cd9e826f6a638377bf2fb9a62c7088 [file] [log] [blame]
Rene_Robert0ebd04f2019-07-30 17:11:26 +02001{
2 "info": {
3 "_postman_id": "45694934-9bf1-485a-8b98-53f3da0b5bb8",
4 "name": "11_delete_instances",
5 "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
6 },
7 "item": [
8 {
9 "name": "SO Delete vf-module",
10 "event": [
11 {
12 "listen": "test",
13 "script": {
14 "id": "2c20c606-a034-47e0-8a66-fc4f1b8ed1c8",
15 "exec": [
16 "pm.test(\"Status code is 202\", function () {",
17 " pm.response.to.have.status(202);",
18 "});",
19 "",
20 "var jsonData = pm.response.json();",
21 "",
22 "pm.globals.set(\"auto_so_request_id\", \"\"+jsonData.requestReferences.requestId+\"\");",
23 ""
24 ],
25 "type": "text/javascript"
26 }
27 }
28 ],
29 "request": {
30 "method": "DELETE",
31 "header": [
32 {
33 "key": "Accept",
34 "value": "application/json"
35 },
36 {
37 "key": "Content-Type",
38 "value": "application/json"
39 },
40 {
41 "key": "X-FromAppId",
42 "value": "AAI"
43 },
44 {
45 "key": "X-TransactionId",
46 "value": "get_aai_subscr"
47 },
48 {
49 "key": "Authorization",
50 "value": "Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA=="
51 }
52 ],
53 "body": {
54 "mode": "raw",
55 "raw": "{\n\t\"requestDetails\": {\n\t\t\"requestInfo\": {\n\t\t\t\"source\": \"VID\",\n\t\t\t\"requestorId\": \"test\"\n\t\t},\n\t\t\"modelInfo\": {\n\t\t\"modelType\": \"vfModule\",\n\t\t\"modelInvariantId\": \"{{auto_vf_module_model_invariant_uuid}}\",\n\t\t\"modelVersionId\": \"{{auto_vf_module_model_uuid}}\",\n\t\t\"modelName\": \"{{auto_vf_module_model_name}}\",\n\t\t\"modelVersion\": \"1\",\n\t\t\"modelCustomizationId\": \"{{auto_vf_module_model_customization_uuid}}\",\n\t\t\"modelCustomizationName\": \"{{auto_vf_module_model_name}}\"\n\t\t},\n\t\t\"requestParameters\": {\n\t\t\t\"testApi\": \"VNF_API\"\n\t\t},\n\t\t\"cloudConfiguration\": {\n\t\t\t\"lcpCloudRegionId\": \"{{onap_cloud_region_id}}\",\n\t\t\t\"tenantId\": \"{{tenant_id}}\"\n\t\t}\n\t}\n}\n\n"
56 },
57 "url": {
58 "raw": "{{url-so}}/onap/so/infra/serviceInstances/v7/{{auto_service_instance_id}}/vnfs/{{auto_vnf_instance_id}}/vfModules/{{auto_vfmodule_instance_id}}",
59 "host": [
60 "{{url-so}}"
61 ],
62 "path": [
63 "onap",
64 "so",
65 "infra",
66 "serviceInstances",
67 "v7",
68 "{{auto_service_instance_id}}",
69 "vnfs",
70 "{{auto_vnf_instance_id}}",
71 "vfModules",
72 "{{auto_vfmodule_instance_id}}"
73 ]
74 }
75 },
76 "response": []
77 },
78 {
79 "name": "SO orchestrationRequests after 30s",
80 "event": [
81 {
82 "listen": "test",
83 "script": {
84 "id": "2ca20cdd-fbb0-46a3-b6af-eb36d388448c",
85 "exec": [
86 "",
87 "pm.test(\"Status code is 200\", function () {",
88 " pm.response.to.have.status(200);",
89 "});",
90 "var jsonData = pm.response.json();",
91 "",
92 "tests[\"requestState is : \"+jsonData.request.requestStatus.requestState] = jsonData.request.requestStatus.requestState === \"COMPLETE\";",
93 "",
94 "tests[\"statusMessage is : \"+jsonData.request.requestStatus.statusMessage] = jsonData.request.requestStatus.statusMessage === \"Vf Module has been deleted successfully.\";"
95 ],
96 "type": "text/javascript"
97 }
98 },
99 {
100 "listen": "prerequest",
101 "script": {
102 "id": "0fc6bd97-ca45-4caa-bdc5-346d661a5409",
103 "exec": [
104 " var date = new Date();",
105 " var curDate = null;",
106 " do {",
107 " curDate = new Date();",
108 " }",
109 " while (curDate - date < 10000);"
110 ],
111 "type": "text/javascript"
112 }
113 }
114 ],
115 "request": {
116 "method": "GET",
117 "header": [
118 {
119 "key": "Accept",
120 "value": "application/json"
121 },
122 {
123 "key": "Content-Type",
124 "value": "application/json"
125 },
126 {
127 "key": "X-FromAppId",
128 "value": "AAI"
129 },
130 {
131 "key": "X-TransactionId",
132 "value": "get_aai_subscr"
133 },
134 {
135 "key": "Authorization",
136 "value": "Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA=="
137 }
138 ],
139 "body": {
140 "mode": "raw",
141 "raw": ""
142 },
143 "url": {
144 "raw": "{{url-so}}/onap/so/infra/orchestrationRequests/v7/{{auto_so_request_id}}",
145 "host": [
146 "{{url-so}}"
147 ],
148 "path": [
149 "onap",
150 "so",
151 "infra",
152 "orchestrationRequests",
153 "v7",
154 "{{auto_so_request_id}}"
155 ]
156 }
157 },
158 "response": []
159 },
160 {
161 "name": "check vfmodule instance in inventory via AAI request",
162 "event": [
163 {
164 "listen": "test",
165 "script": {
166 "id": "6244395e-23bd-4d4b-9f31-cd9b1e4102f6",
167 "exec": [
168 "",
169 "var jsonData = pm.response.json();",
170 "",
171 "",
172 "var vfmodule_instance_found = false;",
173 "",
174 "if (pm.response.code === 200){",
175 " for (var i = 0; i < jsonData[\"vf-module\"].length; i++) { ",
176 " if (jsonData[\"vf-module\"][i][\"vf-module-name\"] === pm.globals.get(\"vfmodule_instance_name\")) {",
177 " vfmodule_instance_found = true;",
178 " }",
179 " }",
180 "}",
181 "",
182 "",
183 "tests[\"vfmodule Instance : \"+ pm.globals.get(\"vfmodule_instance_name\") +\" no longer exists in AAI inventory\"] = vfmodule_instance_found === false;"
184 ],
185 "type": "text/javascript"
186 }
187 }
188 ],
189 "request": {
190 "method": "GET",
191 "header": [
192 {
193 "key": "Authorization",
194 "value": "Basic QUFJOkFBSQ=="
195 },
196 {
197 "key": "X-FromAppId",
198 "value": "AAI"
199 },
200 {
201 "key": "Accept",
202 "value": "application/json"
203 },
204 {
205 "key": "X-TransactionId",
206 "value": "get_aai_subscr"
207 },
208 {
209 "key": "Content-Type",
210 "value": "application/json"
211 }
212 ],
213 "body": {
214 "mode": "raw",
215 "raw": ""
216 },
217 "url": {
218 "raw": "{{url-aai}}/aai/v16/network/generic-vnfs/generic-vnf/{{auto_vnf_instance_id}}/vf-modules",
219 "host": [
220 "{{url-aai}}"
221 ],
222 "path": [
223 "aai",
224 "v16",
225 "network",
226 "generic-vnfs",
227 "generic-vnf",
228 "{{auto_vnf_instance_id}}",
229 "vf-modules"
230 ]
231 }
232 },
233 "response": []
234 },
235 {
236 "name": "SO Delete vnf_instance",
237 "event": [
238 {
239 "listen": "test",
240 "script": {
241 "id": "eab54e34-7898-452e-ad8e-6ac68c3efd36",
242 "exec": [
243 "pm.test(\"Status code is 202\", function () {",
244 " pm.response.to.have.status(202);",
245 "});",
246 "var jsonData = pm.response.json();",
247 "",
248 "pm.globals.set(\"auto_so_request_id\", \"\"+jsonData.requestReferences.requestId+\"\");",
249 ""
250 ],
251 "type": "text/javascript"
252 }
253 }
254 ],
255 "request": {
256 "method": "DELETE",
257 "header": [
258 {
259 "key": "Accept",
260 "value": "application/json"
261 },
262 {
263 "key": "Content-Type",
264 "value": "application/json"
265 },
266 {
267 "key": "X-FromAppId",
268 "value": "AAI"
269 },
270 {
271 "key": "X-TransactionId",
272 "value": "get_aai_subscr"
273 },
274 {
275 "key": "Authorization",
276 "value": "Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA=="
277 }
278 ],
279 "body": {
280 "mode": "raw",
281 "raw": "{\n\t\"requestDetails\": {\n\t\t\"requestInfo\": {\n\t\t\t\"source\": \"VID\",\n\t\t\t\"requestorId\": \"test\"\n\t\t},\n\t\t\"modelInfo\": {\n\t\t\t\"modelType\": \"vnf\",\n\t\t\t\"modelInvariantId\": \"{{auto_vf_invariant_uuid}}\",\n\t\t\t\"modelVersionId\": \"{{auto_vf_uuid}}\",\n\t\t\t\"modelName\": \"{{vf_name}}\",\n\t\t\t\"modelVersion\": \"1.0\",\n\t\t\t\"modelCustomizationId\": \"{{auto_vf_customization_id}}\",\n\t\t\t\"modelCustomizationName\": \"{{vf_name}} 0\"\n\t\t},\n\t\t\"requestParameters\": {\n\t\t\t\"testApi\": \"VNF_API\"\n\t\t},\n\t\t\"cloudConfiguration\": {\n\t\t\t\"lcpCloudRegionId\": \"{{onap_cloud_region_id}}\",\n\t\t\t\"tenantId\": \"{{tenant_id}}\"\n\t\t}\n\t}\n}\n\n"
282 },
283 "url": {
284 "raw": "{{url-so}}/onap/so/infra/serviceInstances/v7/{{auto_service_instance_id}}/vnfs/{{auto_vnf_instance_id}}",
285 "host": [
286 "{{url-so}}"
287 ],
288 "path": [
289 "onap",
290 "so",
291 "infra",
292 "serviceInstances",
293 "v7",
294 "{{auto_service_instance_id}}",
295 "vnfs",
296 "{{auto_vnf_instance_id}}"
297 ]
298 }
299 },
300 "response": []
301 },
302 {
303 "name": "SO Delete network",
304 "event": [
305 {
306 "listen": "test",
307 "script": {
308 "id": "eab54e34-7898-452e-ad8e-6ac68c3efd36",
309 "exec": [
310 ""
311 ],
312 "type": "text/javascript"
313 }
314 }
315 ],
316 "request": {
317 "method": "DELETE",
318 "header": [
319 {
320 "key": "Accept",
321 "value": "application/json"
322 },
323 {
324 "key": "Content-Type",
325 "value": "application/json"
326 },
327 {
328 "key": "X-FromAppId",
329 "value": "AAI"
330 },
331 {
332 "key": "X-TransactionId",
333 "value": "get_aai_subscr"
334 },
335 {
336 "key": "Authorization",
337 "value": "Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA=="
338 }
339 ],
340 "body": {
341 "mode": "raw",
342 "raw": " {\n \t\"requestDetails\": {\n \t\t\"modelInfo\": {\n \t\t\t\"modelType\": \"network\"\n \t\t},\n \t\t\"requestInfo\": {\n \t\t\t\"source\": \"VID\",\n \t\t\t\"requestorId\": \"demo\"\n \t\t},\n \t\t\"requestParameters\": {\n \t\t\t\"testApi\": \"VNF_API\"\n \t\t},\n\t\t\"cloudConfiguration\": {\n\t\t\t\"lcpCloudRegionId\": \"{{onap_cloud_region_id}}\",\n\t\t\t\"tenantId\": \"{{tenant_id}}\"\n\t\t}\n\t}\n}\n\n"
343 },
344 "url": {
345 "raw": "{{url-so}}/onap/so/infra/serviceInstances/v7/{{auto_service_instance_id}}/networks/{{auto_virtual_link_instance_id}}",
346 "host": [
347 "{{url-so}}"
348 ],
349 "path": [
350 "onap",
351 "so",
352 "infra",
353 "serviceInstances",
354 "v7",
355 "{{auto_service_instance_id}}",
356 "networks",
357 "{{auto_virtual_link_instance_id}}"
358 ]
359 }
360 },
361 "response": []
362 },
363 {
364 "name": "SO orchestrationRequests after 10s",
365 "event": [
366 {
367 "listen": "test",
368 "script": {
369 "id": "68a5392d-2904-416b-9cf0-a89c971aa341",
370 "exec": [
371 "pm.test(\"Status code is 200\", function () {",
372 " pm.response.to.have.status(200);",
373 "});",
374 "",
375 "var jsonData = pm.response.json();",
376 "",
377 "tests[\"requestState is : \"+jsonData.request.requestStatus.requestState] = jsonData.request.requestStatus.requestState === \"COMPLETE\";",
378 "",
379 "tests[\"statusMessage is : \"+jsonData.request.requestStatus.statusMessage] = jsonData.request.requestStatus.statusMessage === \"Vnf has been deleted successfully.\";"
380 ],
381 "type": "text/javascript"
382 }
383 },
384 {
385 "listen": "prerequest",
386 "script": {
387 "id": "0f9f067e-d8d4-4b69-a7eb-71f1e73b8196",
388 "exec": [
389 " var date = new Date();",
390 " var curDate = null;",
391 " do {",
392 " curDate = new Date();",
393 " }",
394 " while (curDate - date < 10000);"
395 ],
396 "type": "text/javascript"
397 }
398 }
399 ],
400 "request": {
401 "method": "GET",
402 "header": [
403 {
404 "key": "Accept",
405 "value": "application/json"
406 },
407 {
408 "key": "Content-Type",
409 "value": "application/json"
410 },
411 {
412 "key": "X-FromAppId",
413 "value": "AAI"
414 },
415 {
416 "key": "X-TransactionId",
417 "value": "get_aai_subscr"
418 },
419 {
420 "key": "Authorization",
421 "value": "Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA=="
422 }
423 ],
424 "body": {
425 "mode": "raw",
426 "raw": ""
427 },
428 "url": {
429 "raw": "{{url-so}}/onap/so/infra/orchestrationRequests/v7/{{auto_so_request_id}}",
430 "host": [
431 "{{url-so}}"
432 ],
433 "path": [
434 "onap",
435 "so",
436 "infra",
437 "orchestrationRequests",
438 "v7",
439 "{{auto_so_request_id}}"
440 ]
441 }
442 },
443 "response": []
444 },
445 {
446 "name": "check vnf instance in inventory via AAI request",
447 "event": [
448 {
449 "listen": "test",
450 "script": {
451 "id": "851c2dff-10fb-4f6a-a346-4bab48868d3a",
452 "exec": [
453 "",
454 "var jsonData = pm.response.json();",
455 "",
456 "var vnf_instance_found = false;",
457 "",
458 "if (pm.response.code === 200){",
459 "for (var i = 0; i < jsonData[\"generic-vnf\"].length; i++) { ",
460 " if (jsonData[\"generic-vnf\"][i][\"vnf-name\"] === pm.globals.get(\"vnf_instance_name\")) {",
461 " vnf_instance_found = true;",
462 " }",
463 "}",
464 "}",
465 "tests[\"VNF Instance : \"+ pm.globals.get(\"vnf_instance_name\") +\" no longer exists in AAI inventory\"] = vnf_instance_found === false;"
466 ],
467 "type": "text/javascript"
468 }
469 }
470 ],
471 "request": {
472 "method": "GET",
473 "header": [
474 {
475 "key": "Authorization",
476 "value": "Basic QUFJOkFBSQ=="
477 },
478 {
479 "key": "X-FromAppId",
480 "value": "AAI"
481 },
482 {
483 "key": "Accept",
484 "value": "application/json"
485 },
486 {
487 "key": "X-TransactionId",
488 "value": "get_aai_subscr"
489 },
490 {
491 "key": "Content-Type",
492 "value": "application/json"
493 }
494 ],
495 "body": {
496 "mode": "raw",
497 "raw": ""
498 },
499 "url": {
500 "raw": "{{url-aai}}/aai/v16/network/generic-vnfs",
501 "host": [
502 "{{url-aai}}"
503 ],
504 "path": [
505 "aai",
506 "v16",
507 "network",
508 "generic-vnfs"
509 ]
510 }
511 },
512 "response": []
513 },
514 {
515 "name": "Delete service Instance via ServiceOrder API",
516 "event": [
517 {
518 "listen": "test",
519 "script": {
520 "id": "764a92a8-efb5-48f8-999a-2cf34d9364b2",
521 "exec": [
522 "pm.test(\"Status code is 201\", function () {",
523 " pm.response.to.have.status(201);",
524 "});",
525 "",
526 "var jsonData = pm.response.json();",
527 "pm.globals.set(\"auto_service_order_id\", jsonData.id);",
528 "",
529 "",
530 "",
531 ""
532 ],
533 "type": "text/javascript"
534 }
535 }
536 ],
537 "request": {
538 "method": "POST",
539 "header": [
540 {
541 "key": "Accept",
542 "value": "application/json"
543 },
544 {
545 "key": "Content-Type",
546 "value": "application/json"
547 }
548 ],
549 "body": {
550 "mode": "raw",
551 "raw": "{\n \"externalId\": \"{{externalId}}\",\n \"priority\": \"1\",\n \"description\": \"{{service}} ordering on generic customer via Postman\",\n \"category\": \"Consumer\",\n \"requestedStartDate\": \"2018-04-26T08:33:37.299Z\",\n \"requestedCompletionDate\": \"2018-04-26T08:33:37.299Z\",\n \"relatedParty\": [\n {\n \"id\": \"{{customer_name}}\",\n \"role\": \"ONAPcustomer\",\n \"name\": \"{{customer_name}}\"\n }\n ],\n \"orderItem\": [\n {\n \"id\": \"1\",\n \"action\": \"delete\",\n \"service\": {\n \"id\": \"{{auto_service_instance_id}}\",\n \"serviceState\": \"active\",\n \"serviceSpecification\": {\n \"id\": \"{{auto_service_id}}\"\n }\n }\n }\n ]\n}"
552 },
553 "url": {
554 "raw": "{{url-nbi}}/nbi/api/v4/serviceOrder",
555 "host": [
556 "{{url-nbi}}"
557 ],
558 "path": [
559 "nbi",
560 "api",
561 "v4",
562 "serviceOrder"
563 ]
564 }
565 },
566 "response": []
567 },
568 {
569 "name": "GET previous serviceOrder after 10s",
570 "event": [
571 {
572 "listen": "test",
573 "script": {
574 "id": "de2c349d-b58d-42ae-8454-3afc1084cef1",
575 "exec": [
576 "pm.test(\"Status code is 200\", function () {",
577 " pm.response.to.have.status(200);",
578 "});",
579 "",
580 "var jsonData = pm.response.json();",
581 "",
582 "tests[pm.globals.get(\"externalId\")+\" exists\"] = jsonData.externalId === pm.globals.get(\"externalId\");",
583 "tests[\"service_order_id exists\"] = jsonData.id === pm.globals.get(\"auto_service_order_id\");",
584 "tests[\"service Order state is : \"+jsonData.state] = jsonData.state === \"completed\";",
585 "tests[\"Service Instance state is : \"+jsonData.orderItem[0].service.serviceState] = jsonData.orderItem[0].service.serviceState === \"active\";",
586 "",
587 "",
588 "if(jsonData.state == \"completed\"){",
589 " pm.globals.set(\"auto_service_instance_id\", \"\"+jsonData.orderItem[0].service.id+\"\");",
590 "}",
591 "if (jsonData.orderMessage !== null){",
592 " tests[\"order message is : \" +jsonData.orderMessage[0].messageInformation] = jsonData.orderMessage[0].messageInformation === \"\";",
593 " pm.globals.set(\"auto_service_messageInformation\", \"\"+jsonData.orderMessage[0].messageInformation+\"\");",
594 " }",
595 "",
596 ""
597 ],
598 "type": "text/javascript"
599 }
600 },
601 {
602 "listen": "prerequest",
603 "script": {
604 "id": "b9cdde4f-bf25-4922-a8c0-b378bb0b9535",
605 "exec": [
606 " var date = new Date();",
607 " var curDate = null;",
608 " do {",
609 " curDate = new Date();",
610 " }",
611 " while (curDate - date < 10000);"
612 ],
613 "type": "text/javascript"
614 }
615 }
616 ],
617 "request": {
618 "method": "GET",
619 "header": [
620 {
621 "key": "Accept",
622 "value": "application/json"
623 },
624 {
625 "key": "Content-Type",
626 "value": "application/json"
627 }
628 ],
629 "body": {
630 "mode": "raw",
631 "raw": ""
632 },
633 "url": {
634 "raw": "{{url-nbi}}/nbi/api/v4/serviceOrder/{{auto_service_order_id}}",
635 "host": [
636 "{{url-nbi}}"
637 ],
638 "path": [
639 "nbi",
640 "api",
641 "v4",
642 "serviceOrder",
643 "{{auto_service_order_id}}"
644 ]
645 }
646 },
647 "response": []
648 },
649 {
650 "name": "GET all service instance via ServiceInventory API",
651 "event": [
652 {
653 "listen": "test",
654 "script": {
655 "id": "c7353dda-5afc-4c1c-a9d2-06036a9c984c",
656 "exec": [
657 "var jsonData = pm.response.json();",
658 "",
659 "var service_instance_found = false;",
660 "",
661 "if (pm.response.code === 200){",
662 "for (var i = 0; i < jsonData.length; i++) { ",
663 " if (jsonData[i].name === pm.globals.get(\"service_instance_name\")) {",
664 " service_instance_found = true;",
665 " }",
666 "}",
667 "}",
668 "tests[pm.globals.get(\"service_instance_name\")+\" no longer in list\"] = service_instance_found === false;"
669 ],
670 "type": "text/javascript"
671 }
672 }
673 ],
674 "request": {
675 "method": "GET",
676 "header": [],
677 "body": {
678 "mode": "raw",
679 "raw": ""
680 },
681 "url": {
682 "raw": "{{url-nbi}}/nbi/api/v4/service?relatedParty.id={{customer_name}}",
683 "host": [
684 "{{url-nbi}}"
685 ],
686 "path": [
687 "nbi",
688 "api",
689 "v4",
690 "service"
691 ],
692 "query": [
693 {
694 "key": "relatedParty.id",
695 "value": "{{customer_name}}"
696 }
697 ]
698 }
699 },
700 "response": []
701 },
702 {
703 "name": "DELETE Virtual Link",
704 "request": {
705 "method": "DELETE",
706 "header": [
707 {
708 "key": "Accept",
709 "value": "application/json"
710 },
711 {
712 "key": "Content-Type",
713 "value": "application/json"
714 },
715 {
716 "key": "X-FromAppId",
717 "value": "AAI"
718 },
719 {
720 "key": "X-TransactionId",
721 "value": "get_aai_subscr"
722 },
723 {
724 "key": "Authorization",
725 "value": "Basic QUFJOkFBSQ=="
726 }
727 ],
728 "body": {
729 "mode": "raw",
730 "raw": ""
731 },
732 "url": {
733 "raw": "{{url-aai}}/aai/v16/network/l3-networks/l3-network/{{auto_virtual_link_instance_id}}?resource-version=1564496333018",
734 "host": [
735 "{{url-aai}}"
736 ],
737 "path": [
738 "aai",
739 "v16",
740 "network",
741 "l3-networks",
742 "l3-network",
743 "{{auto_virtual_link_instance_id}}"
744 ],
745 "query": [
746 {
747 "key": "resource-version",
748 "value": "1564496333018"
749 }
750 ]
751 }
752 },
753 "response": []
754 }
755 ]
756}