**Docker**
-in progress ...
+Requirements: `Docker engine <https://docs.docker.com/engine/>`_ and `docker-compose <https://docs.docker.com/compose/>`_.
+To start the application:
+ 1. Generate the application .jar file: `$ mvn clean package`
+ 2. Configure the **.env** file
+ 3. Start the *MariaDB* and *MongoDB* services: `$ docker-compose up -d mongo mariadb`
+ 4. Build and start the *NBI* service: `$ docker-compose up --build -d nbi`
+
+You can view the log output of the application with the following command:
+
+`$ docker-compose logs -f nbi`
**Testing**
When the app is running, you can access the API at http://yourhostname:8080/nbi/api/v1/ and fill the url with the name of the resources you asking for (/serviceSpecification, /service, /serviceOrder or /status)
You can run a test by using `VisualStudio RestClient plugin <https://github.com/Huachao/vscode-restclient>`_
See the *restclient* package at root level to find *.vscode/settings.json* configuration file and */json/* package with samples requests that can be run.
You can also trigger these endpoints with any RESTful client or automation framework.
-
Introduction
***************
-NBI stands for NorthBound Interface. It brings to ONAP a set of API that can be used by external systems as BSS for example.
-These API are based on **TMF API**.
-
+NBI stands for NorthBound Interface. It brings to ONAP a set of API that can be used by external systems as BSS for example. These API are based on **TMF API**.
***************
Global NBI architecture for Beijing release
:widths: 10,5,5,5,5,5,5
" ", "json file", "html doc", "plantUML doc", "Swagger Editor", "Postman Collection", "pdf doc"
- "serviceCatalog", ":download:`link <swaggers/serviceCatalog_1_0_0.json>`", ":download:`link <serviceCatalog/documentation.html>`", ":download:`link <serviceCatalog/apiServiceCatalog.plantuml>`", "`link <http://editor2.swagger.io/#/?import=http://onap.readthedocs.io/en/latest/_downloads/serviceCatalog_1_0_0.json>`_", "coming", "coming"
- "serviceInventory", ":download:`link <swaggers/serviceInventory_1_0_0.json>`", ":download:`link <serviceInventory/documentation.html>`", ":download:`link <serviceInventory/apiServiceInventory.plantuml>`", "`link <http://editor2.swagger.io/#/?import=http://onap.readthedocs.io/en/latest/_downloads/serviceInventory_1_0_0.json>`_", "coming", "coming"
- "serviceOrder", ":download:`link <swaggers/serviceInventory_1_0_0.json>`", ":download:`link <serviceOrder/documentation.html>`", ":download:`link <serviceOrder/apiServiceOrder.plantuml>`", "`link <http://editor2.swagger.io/#/?import=http://onap.readthedocs.io/en/latest/_downloads/serviceInventory_1_0_0.json>`_", ":download:`link <postman/ONAPBeijingServiceOrderDoc.postman_collection.json>`", "coming"
+ "serviceCatalog", ":download:`link <swaggers/serviceCatalog_1_0_0.json>`", ":download:`link <serviceCatalog/documentation.html>`", ":download:`link <serviceCatalog/apiServiceCatalog.plantuml>`", "`link <http://editor2.swagger.io/?url=http://onap.readthedocs.io/en/latest/_downloads/serviceCatalog_1_0_0.json>`_", "coming", "coming"
+ "serviceInventory", ":download:`link <swaggers/serviceInventory_1_0_0.json>`", ":download:`link <serviceInventory/documentation.html>`", ":download:`link <serviceInventory/apiServiceInventory.plantuml>`", "`link <http://editor2.swagger.io/?url=http://onap.readthedocs.io/en/latest/_downloads/serviceInventory_1_0_0.json>`_", "coming", "coming"
+ "serviceOrder", ":download:`link <swaggers/serviceOrder_1_0_0.json>`", ":download:`link <serviceOrder/documentation.html>`", ":download:`link <serviceOrder/apiServiceOrder.plantuml>`", "`link <http://editor2.swagger.io/?url=http://onap.readthedocs.io/en/latest/_downloads/serviceOrder_1_0_0.json>`_", ":download:`link <postman/ONAPBeijingServiceOrderDoc.postman_collection.json>`", "coming"
***************
Developer Guide
***************
-Technical information about NBI (dependancies, configuration, running & testing) could be found here: :doc:`DevDoc <../architecture/NBI_R1_Developer_Guide>`
+Technical information about NBI (dependancies, configuration, running & testing) could be found here: :doc:`NBI_R1_Developer_Guide <../architecture/NBI_R1_Developer_Guide>`
+
+API Flow illustration (with example messages) is described in this document: :download:`nbicallflow.pdf <pdf/nbicallflow.pdf>`
{
"variables": [],
"info": {
- "name": "ONAP Beijing ServiceOrder Doc",
- "_postman_id": "d88ad75d-6fae-13ea-d63c-cac1f445a1bf",
+ "name": "ONAP Beijing ServiceOrder Test",
+ "_postman_id": "3e51270b-0ef8-0bc3-5b92-8c9b8270cb71",
"description": "",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
{
"name": "ServiceOrder1",
"request": {
- "url": "{nbiHostName}:{nbiPort}/nbi/api/v1/serviceOrder",
+ "url": "http://127.0.0.1:8090/serviceOrder",
"method": "POST",
"header": [
{
"description": ""
},
"response": []
+ },
+ {
+ "name": "ServiceOrder3",
+ "request": {
+ "url": "http://127.0.0.1:8090/serviceOrder",
+ "method": "POST",
+ "header": [
+ {
+ "key": "Accept",
+ "value": "application/json",
+ "description": ""
+ },
+ {
+ "key": "Content-Type",
+ "value": "application/json",
+ "description": ""
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\n \"externalId\": \"LudONAP002\",\n \"priority\": \"1\",\n \"description\": \"Ludo ONAP Order\",\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\": \"3dd3923d-1681-4f5b-99bb-f695ab147004\"\n }\n }\n }\n ]\n}"
+ },
+ "description": ""
+ },
+ "response": []
}
]
}
\ No newline at end of file
-/' This work is licensed under a Creative Commons Attribution 4.0 International License.
- http://creativecommons.org/licenses/by/4.0
- Copyright 2018 Orange'/
-
@startuml
enum LifecycleStatusValues {
-////
-This work is licensed under a Creative Commons Attribution 4.0 International License.
-http://creativecommons.org/licenses/by/4.0
-Copyright 2018 Orange
-////
-
= API ServiceCatalog
-<!--
-This work is licensed under a Creative Commons Attribution 4.0 International License.
-http://creativecommons.org/licenses/by/4.0
-Copyright 2018 Orange
--->
<!DOCTYPE html>
<html lang="en">
<head>
-# This work is licensed under a Creative Commons Attribution 4.0 International License.
-# http://creativecommons.org/licenses/by/4.0
-# Copyright 2018 Orange
-
# API ServiceCatalog
-/' This work is licensed under a Creative Commons Attribution 4.0 International License.
- http://creativecommons.org/licenses/by/4.0
- Copyright 2018 Orange'/
-
@startuml
enum stateValues {
-////
-This work is licensed under a Creative Commons Attribution 4.0 International License.
-http://creativecommons.org/licenses/by/4.0
-Copyright 2018 Orange
-////
-
= API ServiceInventory
-<!--
-This work is licensed under a Creative Commons Attribution 4.0 International License.
-http://creativecommons.org/licenses/by/4.0
-Copyright 2018 Orange
--->
<!DOCTYPE html>
<html lang="en">
<head>
-# This work is licensed under a Creative Commons Attribution 4.0 International License.
-# http://creativecommons.org/licenses/by/4.0
-# Copyright 2018 Orange
-
# API ServiceInventory
-/' This work is licensed under a Creative Commons Attribution 4.0 International License.
- http://creativecommons.org/licenses/by/4.0
- Copyright 2018 Orange'/
-
@startuml
enum ActionType {
-////
-This work is licensed under a Creative Commons Attribution 4.0 International License.
-http://creativecommons.org/licenses/by/4.0
-Copyright 2018 Orange
-////
-
= API ServiceOrder
-<!--
-This work is licensed under a Creative Commons Attribution 4.0 International License.
-http://creativecommons.org/licenses/by/4.0
-Copyright 2018 Orange
--->
<!DOCTYPE html>
<html lang="en">
<head>
-# This work is licensed under a Creative Commons Attribution 4.0 International License.
-# http://creativecommons.org/licenses/by/4.0
-# Copyright 2018 Orange
-
# API ServiceOrder
-# This work is licensed under a Creative Commons Attribution 4.0 International License.
-# http://creativecommons.org/licenses/by/4.0
-# Copyright 2018 Orange
-
swagger: "2.0"
info:
description: "serviceCatalog API designed for ONAP Beijing Release.\nThis API is\
-# This work is licensed under a Creative Commons Attribution 4.0 International License.
-# http://creativecommons.org/licenses/by/4.0
-# Copyright 2018 Orange
-
swagger: "2.0"
info:
description: "serviceInventory API designed for ONAP Beijing Release.\nThis API\
"201": {
"description": "Success",
"schema": {
- "$ref": "#/definitions/CreateServiceOrder"
+ "$ref": "#/definitions/ServiceOrder"
}
},
-# This work is licensed under a Creative Commons Attribution 4.0 International License.
-# http://creativecommons.org/licenses/by/4.0
-# Copyright 2018 Orange
-
swagger: "2.0"
info:
description: "serviceOrder API designed for ONAP Beijing Release.\nThis API is build\
201:
description: "Success"
schema:
- $ref: "#/definitions/CreateServiceOrder"
+ $ref: "#/definitions/ServiceOrder"
400:
description: "Bad Request\n\nList of supported error codes:\n- 20: Invalid\
\ URL parameter value\n- 21: Missing body\n- 22: Invalid body\n- 23: Missing\