1 <<<<<<< HEAD (11b0d7 Fix typo in scale out documentation)
5 "name": "10_Service_Order",
6 "_postman_id": "28bdf2bb-4886-b8e7-45e3-eac832efc757",
8 "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
12 "name": "GET ExternalAPI-NBI component Status (HealthCheck)",
17 "type": "text/javascript",
19 "tests[\"Status code is 200\"] = responseCode.code === 200;",
22 "var jsonData = JSON.parse(responseBody);",
23 "tests[\"status\"] = jsonData.status === \"ok\";"
29 "url": "{{url-nbi}}/status",
38 "name": "GET all service models from Service Catalog API",
43 "type": "text/javascript",
45 "tests[\"Status code is 200\"] = responseCode.code === 200;",
47 "var jsonData = JSON.parse(responseBody);",
48 "var service_found = false;",
49 "for (var i = 0; i < jsonData.length; i++) { ",
50 " if (jsonData[i].name === postman.getGlobalVariable(\"service\")) {",
51 " service_found = true;",
52 " postman.setGlobalVariable(\"auto_service_id\", \"\"+jsonData[i].id+\"\");",
55 "tests[postman.getGlobalVariable(\"service\")+\" exists\"] = service_found === true;",
62 "url": "{{url-nbi}}/serviceSpecification",
71 "name": "GET all service instances via ServiceInventory API",
76 "type": "text/javascript",
78 "tests[\"Status code is 200\"] = responseCode.code === 200;",
80 "var jsonData = JSON.parse(responseBody);",
81 "var service_instance_found = false;",
82 "for (var i = 0; i < jsonData.length; i++) { ",
83 " if (jsonData[i].name === postman.getGlobalVariable(\"service_instance_name\")) {",
84 " service_instance_found = true;",
87 "tests[postman.getGlobalVariable(\"service_instance_name\")+\" does not exist\"] = service_instance_found === false;"
94 "raw": "{{url-nbi}}/service?relatedParty.id={{customer_name}}",
106 "key": "relatedParty.id",
107 "value": "{{customer_name}}",
122 "name": "Add service instance via ServiceOrder API",
127 "type": "text/javascript",
129 "tests[\"Status code is 201\"] = responseCode.code === 201;",
131 "var jsonData = JSON.parse(responseBody);",
132 "tests[postman.getGlobalVariable(\"externalId\")+\" exists\"] = jsonData.externalId === postman.getGlobalVariable(\"externalId\");",
134 "postman.setGlobalVariable(\"auto_service_order_id\", jsonData.id);",
141 "url": "{{url-nbi}}/serviceOrder",
146 "value": "application/json",
150 "key": "Content-Type",
151 "value": "application/json",
157 "raw": "{\n \"externalId\": \"{{externalId}}\",\n \"priority\": \"1\",\n \"description\": \"{{service}} order for 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\": \"add\",\n \"service\": {\n \"name\": \"{{service_instance_name}}\",\n \"serviceState\": \"active\",\n \"serviceSpecification\": {\n \"id\": \"{{auto_service_id}}\"\n }\n }\n }\n ]\n}"
164 "name": "GET previous serviceOrder",
169 "type": "text/javascript",
172 "tests[\"Status code is 200\"] = responseCode.code === 200;",
174 "var jsonData = JSON.parse(responseBody);",
176 "tests[postman.getGlobalVariable(\"externalId\")+\" exists\"] = jsonData.externalId === postman.getGlobalVariable(\"externalId\");",
177 "tests[\"service_order_id exists\"] = jsonData.id === postman.getGlobalVariable(\"auto_service_order_id\");",
178 "tests[\"service Order state is COMPLETED\"] = jsonData.state === \"COMPLETED\";",
179 "tests[\"Service Instance state is ACTIVE\"] = jsonData.orderItem[0].service.serviceState === \"active\";",
181 "if(jsonData.hasOwnProperty('orderItem.service.id')){",
182 " postman.setGlobalVariable(\"auto_service_instance_id\", \"\"+jsonData.orderItem.service.id+\"\");",
184 "postman.setGlobalVariable(\"auto_service_messageInformation\", \"\"+jsonData.orderMessage[0].messageInformation+\"\");",
191 "url": "{{url-nbi}}/serviceOrder/{{auto_service_order_id}}",
196 "value": "application/json",
200 "key": "Content-Type",
201 "value": "application/json",
207 "raw": "{\n \"externalId\": \"NBI-SO002\",\n \"priority\": \"1\",\n \"description\": \"Firevall service ordering on customer not specified - added to generic customer\",\n \"category\": \"Consumer\",\n \"requestedStartDate\": \"2018-02-28T13:33:37.299Z\",\n \"requestedCompletionDate\": \"2018-02-28T13:33:37.299Z\",\n \"orderItem\": [\n {\n \"id\": \"1\",\n \"action\": \"add\",\n \"service\": {\n \"id\": \"vFW0002\",\n \"serviceState\": \"active\",\n \"serviceSpecification\": {\n \"id\": \"ff3c8594-499e-445c-8d14-758231f47799\"\n }\n }\n }\n ]\n}"
214 "name": "GET created service instance in inventory",
219 "type": "text/javascript",
222 "tests[\"Status code is 200\"] = responseCode.code === 200;",
232 "raw": "{{url-nbi}}/service/{{auto_service_instance_id}}?relatedParty.id={{customer_name}}&serviceSpecification.name={{service}}",
241 "{{auto_service_instance_id}}"
245 "key": "relatedParty.id",
246 "value": "{{customer_name}}",
251 "key": "serviceSpecification.name",
252 "value": "{{service}}",
267 "name": "Delete service Instance via ServiceOrder API",
272 "type": "text/javascript",
274 "tests[\"Status code is 201\"] = responseCode.code === 201;",
276 "var jsonData = JSON.parse(responseBody);",
277 "postman.setGlobalVariable(\"auto_service_order_id\", jsonData.id);",
287 "url": "{{url-nbi}}/serviceOrder",
292 "value": "application/json",
296 "key": "Content-Type",
297 "value": "application/json",
303 "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}"
312 "url": "https://postman-echo.com/delay/10",
324 "name": "GET previous serviceOrder",
329 "type": "text/javascript",
332 "tests[\"Status code is 200\"] = responseCode.code === 200;",
334 "var jsonData = JSON.parse(responseBody);",
336 "tests[postman.getGlobalVariable(\"externalId\")+\" exists\"] = jsonData.externalId === postman.getGlobalVariable(\"externalId\");",
337 "tests[\"service_order_id exists\"] = jsonData.id === postman.getGlobalVariable(\"auto_service_order_id\");",
338 "tests[\"service Order state is COMPLETED\"] = jsonData.state === \"COMPLETED\";",
339 "tests[\"Service Instance state is ACTIVE\"] = jsonData.orderItem[0].service.serviceState === \"active\";",
340 "postman.setGlobalVariable(\"auto_service_instance_id\", \"\"+jsonData.orderItem[0].service.id+\"\");",
347 "url": "{{url-nbi}}/serviceOrder/{{auto_service_order_id}}",
352 "value": "application/json",
356 "key": "Content-Type",
357 "value": "application/json",
363 "raw": "{\n \"externalId\": \"NBI-SO002\",\n \"priority\": \"1\",\n \"description\": \"Firevall service ordering on customer not specified - added to generic customer\",\n \"category\": \"Consumer\",\n \"requestedStartDate\": \"2018-02-28T13:33:37.299Z\",\n \"requestedCompletionDate\": \"2018-02-28T13:33:37.299Z\",\n \"orderItem\": [\n {\n \"id\": \"1\",\n \"action\": \"add\",\n \"service\": {\n \"id\": \"vFW0002\",\n \"serviceState\": \"active\",\n \"serviceSpecification\": {\n \"id\": \"ff3c8594-499e-445c-8d14-758231f47799\"\n }\n }\n }\n ]\n}"
370 "name": "GET service instance in inventory (should no longer exists)",
375 "type": "text/javascript",
378 "tests[\"Status code is 200\"] = responseCode.code === 200;",
388 "raw": "{{url-nbi}}/service/{{auto_service_instance_id}}?relatedParty.id={{customer_name}}&serviceSpecification.name={{service}}",
397 "{{auto_service_instance_id}}"
401 "key": "relatedParty.id",
402 "value": "{{customer_name}}",
407 "key": "serviceSpecification.name",
408 "value": "{{service}}",
423 "name": "GET all service instance via ServiceInventory API",
428 "type": "text/javascript",
432 "tests[\"Status code is 200\"] = responseCode.code === 200;",
434 "var jsonData = JSON.parse(responseBody);",
435 "var service_instance_found = false;",
436 "for (var i = 0; i < jsonData.length; i++) { ",
437 " if (jsonData[i].name === postman.getGlobalVariable(\"service_instance_name\")) {",
438 " service_instance_found = true;",
441 "tests[postman.getGlobalVariable(\"service_instance_name\")+\" does not exist\"] = service_instance_found === false;"
448 "raw": "{{url-nbi}}/service?relatedParty.id={{customer_name}}",
460 "key": "relatedParty.id",
461 "value": "{{customer_name}}",
481 "type": "text/javascript",
483 "tests[\"Status code is 200\"] = responseCode.code === 200;",
490 "url": "{{url-nbi}}/hub",
501 >>>>>>> CHANGE (0ebd04 Issue-ID: INT-1178 updated Postman collection for Dublin)