4 "name": "10_Service_Order",
5 "_postman_id": "28bdf2bb-4886-b8e7-45e3-eac832efc757",
7 "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
11 "name": "GET ExternalAPI-NBI component Status (HealthCheck)",
16 "type": "text/javascript",
18 "tests[\"Status code is 200\"] = responseCode.code === 200;",
21 "var jsonData = JSON.parse(responseBody);",
22 "tests[\"status\"] = jsonData.status === \"ok\";"
28 "url": "{{url-nbi}}/status",
37 "name": "GET all service models from Service Catalog API",
42 "type": "text/javascript",
44 "tests[\"Status code is 200\"] = responseCode.code === 200;",
46 "var jsonData = JSON.parse(responseBody);",
47 "var service_found = false;",
48 "for (var i = 0; i < jsonData.length; i++) { ",
49 " if (jsonData[i].name === postman.getGlobalVariable(\"service\")) {",
50 " service_found = true;",
51 " postman.setGlobalVariable(\"auto_service_id\", \"\"+jsonData[i].id+\"\");",
54 "tests[postman.getGlobalVariable(\"service\")+\" exists\"] = service_found === true;",
61 "url": "{{url-nbi}}/serviceSpecification",
70 "name": "GET all service instances via ServiceInventory API",
75 "type": "text/javascript",
77 "tests[\"Status code is 200\"] = responseCode.code === 200;",
79 "var jsonData = JSON.parse(responseBody);",
80 "var service_instance_found = false;",
81 "for (var i = 0; i < jsonData.length; i++) { ",
82 " if (jsonData[i].name === postman.getGlobalVariable(\"service_instance_name\")) {",
83 " service_instance_found = true;",
86 "tests[postman.getGlobalVariable(\"service_instance_name\")+\" does not exist\"] = service_instance_found === false;"
93 "raw": "{{url-nbi}}/service?relatedParty.id={{customer_name}}",
105 "key": "relatedParty.id",
106 "value": "{{customer_name}}",
121 "name": "Add service instance via ServiceOrder API",
126 "type": "text/javascript",
128 "tests[\"Status code is 201\"] = responseCode.code === 201;",
130 "var jsonData = JSON.parse(responseBody);",
131 "tests[postman.getGlobalVariable(\"externalId\")+\" exists\"] = jsonData.externalId === postman.getGlobalVariable(\"externalId\");",
133 "postman.setGlobalVariable(\"auto_service_order_id\", jsonData.id);",
140 "url": "{{url-nbi}}/serviceOrder",
145 "value": "application/json",
149 "key": "Content-Type",
150 "value": "application/json",
156 "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}"
163 "name": "GET previous serviceOrder",
168 "type": "text/javascript",
171 "tests[\"Status code is 200\"] = responseCode.code === 200;",
173 "var jsonData = JSON.parse(responseBody);",
175 "tests[postman.getGlobalVariable(\"externalId\")+\" exists\"] = jsonData.externalId === postman.getGlobalVariable(\"externalId\");",
176 "tests[\"service_order_id exists\"] = jsonData.id === postman.getGlobalVariable(\"auto_service_order_id\");",
177 "tests[\"service Order state is COMPLETED\"] = jsonData.state === \"COMPLETED\";",
178 "tests[\"Service Instance state is ACTIVE\"] = jsonData.orderItem[0].service.serviceState === \"active\";",
180 "if(jsonData.hasOwnProperty('orderItem.service.id')){",
181 " postman.setGlobalVariable(\"auto_service_instance_id\", \"\"+jsonData.orderItem.service.id+\"\");",
183 "postman.setGlobalVariable(\"auto_service_messageInformation\", \"\"+jsonData.orderMessage[0].messageInformation+\"\");",
190 "url": "{{url-nbi}}/serviceOrder/{{auto_service_order_id}}",
195 "value": "application/json",
199 "key": "Content-Type",
200 "value": "application/json",
206 "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}"
213 "name": "GET created service instance in inventory",
218 "type": "text/javascript",
221 "tests[\"Status code is 200\"] = responseCode.code === 200;",
231 "raw": "{{url-nbi}}/service/{{auto_service_instance_id}}?relatedParty.id={{customer_name}}&serviceSpecification.name={{service}}",
240 "{{auto_service_instance_id}}"
244 "key": "relatedParty.id",
245 "value": "{{customer_name}}",
250 "key": "serviceSpecification.name",
251 "value": "{{service}}",
266 "name": "Delete service Instance via ServiceOrder API",
271 "type": "text/javascript",
273 "tests[\"Status code is 201\"] = responseCode.code === 201;",
275 "var jsonData = JSON.parse(responseBody);",
276 "postman.setGlobalVariable(\"auto_service_order_id\", jsonData.id);",
286 "url": "{{url-nbi}}/serviceOrder",
291 "value": "application/json",
295 "key": "Content-Type",
296 "value": "application/json",
302 "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}"
311 "url": "https://postman-echo.com/delay/10",
323 "name": "GET previous serviceOrder",
328 "type": "text/javascript",
331 "tests[\"Status code is 200\"] = responseCode.code === 200;",
333 "var jsonData = JSON.parse(responseBody);",
335 "tests[postman.getGlobalVariable(\"externalId\")+\" exists\"] = jsonData.externalId === postman.getGlobalVariable(\"externalId\");",
336 "tests[\"service_order_id exists\"] = jsonData.id === postman.getGlobalVariable(\"auto_service_order_id\");",
337 "tests[\"service Order state is COMPLETED\"] = jsonData.state === \"COMPLETED\";",
338 "tests[\"Service Instance state is ACTIVE\"] = jsonData.orderItem[0].service.serviceState === \"active\";",
339 "postman.setGlobalVariable(\"auto_service_instance_id\", \"\"+jsonData.orderItem[0].service.id+\"\");",
346 "url": "{{url-nbi}}/serviceOrder/{{auto_service_order_id}}",
351 "value": "application/json",
355 "key": "Content-Type",
356 "value": "application/json",
362 "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}"
369 "name": "GET service instance in inventory (should no longer exists)",
374 "type": "text/javascript",
377 "tests[\"Status code is 200\"] = responseCode.code === 200;",
387 "raw": "{{url-nbi}}/service/{{auto_service_instance_id}}?relatedParty.id={{customer_name}}&serviceSpecification.name={{service}}",
396 "{{auto_service_instance_id}}"
400 "key": "relatedParty.id",
401 "value": "{{customer_name}}",
406 "key": "serviceSpecification.name",
407 "value": "{{service}}",
422 "name": "GET all service instance via ServiceInventory API",
427 "type": "text/javascript",
431 "tests[\"Status code is 200\"] = responseCode.code === 200;",
433 "var jsonData = JSON.parse(responseBody);",
434 "var service_instance_found = false;",
435 "for (var i = 0; i < jsonData.length; i++) { ",
436 " if (jsonData[i].name === postman.getGlobalVariable(\"service_instance_name\")) {",
437 " service_instance_found = true;",
440 "tests[postman.getGlobalVariable(\"service_instance_name\")+\" does not exist\"] = service_instance_found === false;"
447 "raw": "{{url-nbi}}/service?relatedParty.id={{customer_name}}",
459 "key": "relatedParty.id",
460 "value": "{{customer_name}}",
480 "type": "text/javascript",
482 "tests[\"Status code is 200\"] = responseCode.code === 200;",
489 "url": "{{url-nbi}}/hub",