aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/administration/administration.rst3
-rw-r--r--docs/architecture/architecture.rst34
-rw-r--r--docs/configuration/configuration.rst77
-rw-r--r--docs/consumedapis/consumedapis.rst44
-rw-r--r--docs/humaninterfaces/humaninterfaces.rst4
-rw-r--r--docs/index.rst4
-rw-r--r--docs/installation/installation.rst30
-rw-r--r--docs/logging/logging.rst4
-rw-r--r--docs/offeredapis/offeredapis.rst194
9 files changed, 391 insertions, 3 deletions
diff --git a/docs/administration/administration.rst b/docs/administration/administration.rst
index c5353ae..7abffd2 100644
--- a/docs/administration/administration.rst
+++ b/docs/administration/administration.rst
@@ -6,7 +6,7 @@
Administration
==============
-
+no specific administration defined in the current release
Processes
---------
@@ -14,3 +14,4 @@ Processes
Actions
-------
+
diff --git a/docs/architecture/architecture.rst b/docs/architecture/architecture.rst
new file mode 100644
index 0000000..b777f0f
--- /dev/null
+++ b/docs/architecture/architecture.rst
@@ -0,0 +1,34 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright 2018 ORANGE
+
+
+Architecture
+============
+
+***************
+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**.
+
+
+***************
+Global NBI architecture for Beijing release
+***************
+
+Following illustration provides a global view about nbi architecture,integration with other ONAP components and API resource/operation provided.
+
+.. image:: images/ONAP_External_ID_Beijing.jpg
+ :width: 800px
+
+
+***************
+Developer Guide
+***************
+
+Technical information about NBI (dependancies, configuration, running & testing) could be found here: :doc:`NBI_R1_Developer_Guide <../NBI_R1_Developer_Guide>`
+
+API Flow illustration (with example messages) is described in this document: :download:`nbicallflow.pdf <pdf/nbicallflow.pdf>`
+
diff --git a/docs/configuration/configuration.rst b/docs/configuration/configuration.rst
index b6619ce..ba586aa 100644
--- a/docs/configuration/configuration.rst
+++ b/docs/configuration/configuration.rst
@@ -5,3 +5,80 @@
Configuration
=============
+
+A configuration file, *src/main/resources/application-localhost.properties* list all the component interface that can be configured depending on the environment were the app is deployed.
+By default, the application runs with an embedded both MongoDB and MariaDB local instance.
+This file also list configurations of all the REST interface maid from NBI to other ONAP component such as SDC, AA&I and SO.
+
+
+Default values
+==============
+
+**SERVER**
+
+server.contextPath=/nbi/api/v1
+server.port = 8080
+
+**LOGGING**
+
+logging.level.=INFO
+
+**ONAP**
+
+onap.lcpCloudRegionId=RegionOne
+onap.tenantId=6e97a2bd51d74f6db5671d8dc1517d82
+onap.cloudOwner=CloudOwner
+
+**NBI**
+
+nbi.url=http://localhost:8080/nbi/api/v1
+nbi.callForVNF=false
+
+**SDC**
+
+sdc.host=http://10.0.3.1:8080
+sdc.header.ecompInstanceId=demo
+sdc.header.authorization=Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=
+
+**AAI**
+
+aai.host=https://10.0.1.1:8443
+aai.header.authorization=Basic QUFJOkFBSQ==
+aai.api.id=AAI
+
+**SO**
+
+so.host=http://10.0.5.1:8080
+so.header.authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==
+so.api.id=SO
+
+**MONGO**
+
+spring.data.mongodb.host=localhost
+spring.data.mongodb.port=27017
+spring.data.mongodb.database=ServiceOrderDB
+
+**MYSQL**
+
+spring.datasource.url=jdbc:mariadb://localhost:3306/nbi
+spring.datasource.username=root
+spring.datasource.password=secret
+spring.datasource.testWhileIdle=true
+spring.datasource.validationQuery=SELECT 1
+spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
+spring.jpa.show-sql=false
+spring.jpa.hibernate.ddl-auto=update
+spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy
+
+
+Changing values
+===============
+
+To adapt application parameters to your context, you need to set up some environment attributes. For example :
+
+
+ SPRING_DATASOURCE_PASSWORD: your own value here
+ SPRING_DATASOURCE_USERNAME: your own value here
+ SDC_HOST: http://${SDC_IP}:8080
+ AAI_HOST: https://${AAI_IP}:8443
+ SO_HOST: http://${SO_IP}:8080
diff --git a/docs/consumedapis/consumedapis.rst b/docs/consumedapis/consumedapis.rst
index fd5395f..6962e02 100644
--- a/docs/consumedapis/consumedapis.rst
+++ b/docs/consumedapis/consumedapis.rst
@@ -5,3 +5,47 @@
Consumed APIs
=============
+
+
+NBI application is interacting with 3 ONAP APIs
+
+***************
+SDC API
+***************
+
+this API is used to provide Service Catalog information
+Information are retrieved in SDC (and in Tosca "service template" file) - Only GET operation is provided - this API DID NOT UPDATE SDC
+
+ SDC_ROOT_URL = "/sdc/v1/catalog/services/";
+ SDC_GET_PATH = "/metadata";
+ SDC_TOSCA_PATH = "/toscaModel";
+
+***************
+AAI API
+***************
+
+this API is used to provide Service Inventory information
+This API retrieves service(s) in the AAI inventory. Only following attributes will be retrieve in service inventory: id, name and type (no state or startDate available )
+
+ AAI_GET_TENANTS_PATH = "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/$onap.cloudOwner/$onap.lcpCloudRegionId/tenants";
+ AAI_GET_CUSTOMER_PATH = "/aai/v11/business/customers/customer/";
+ AAI_GET_SERVICES_FOR_CUSTOMER_PATH =
+ "/aai/v11/business/customers/customer/$customerId/service-subscriptions";
+ AAI_PUT_SERVICE_FOR_CUSTOMER_PATH =
+ "/aai/v11/business/customers/customer/$customerId/service-subscriptions/service-subscription/";
+ AAI_GET_SERVICE_FOR_CUSTOMER_PATH =
+ "/aai/v11/business/customers/customer/$customerId/service-subscriptions/service-subscription/$serviceSpecName/service-instances/service-instance/$serviceId";
+ AAI_GET_SERVICE_INSTANCES_PATH =
+ "/aai/v11/business/customers/customer/$customerId/service-subscriptions/service-subscription/$serviceSpecName/service-instances/";
+
+
+***************
+SO API
+***************
+
+this API is used to perform Service Order and thus instantiate a service
+
+
+ MSO_CREATE_SERVICE_INSTANCE_PATH = "/ecomp/mso/infra/serviceInstance/v4";
+ MSO_GET_REQUEST_STATUS_PATH = "/ecomp/mso/infra/orchestrationRequests/v4/";
+ MSO_DELETE_REQUEST_STATUS_PATH = "/ecomp/mso/infra/serviceInstances/";
diff --git a/docs/humaninterfaces/humaninterfaces.rst b/docs/humaninterfaces/humaninterfaces.rst
index 89009f1..16f1835 100644
--- a/docs/humaninterfaces/humaninterfaces.rst
+++ b/docs/humaninterfaces/humaninterfaces.rst
@@ -5,3 +5,7 @@
Human Interfaces
================
+
+no Human Interface (pure Rest API project)
+
+Any "Rest Client" application may be used (Postman, ...) to interact with NBI application.
diff --git a/docs/index.rst b/docs/index.rst
index 8c111be..2315c73 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -8,8 +8,8 @@ ONAP ExternalAPI / NBI
.. toctree::
:maxdepth: 1
- architecture/NBI_R1_Developer_Guide.rst
- offeredapis/NBI_R1_interface.rst
+ architecture/architecture.rst
+ offeredapis/offeredapis.rst
consumedapis/consumedapis.rst
delivery/delivery.rst
logging/logging.rst
diff --git a/docs/installation/installation.rst b/docs/installation/installation.rst
index a6ab912..bb392d3 100644
--- a/docs/installation/installation.rst
+++ b/docs/installation/installation.rst
@@ -7,9 +7,39 @@ Installation
============
+
Environment
-----------
+**Locally**
+
+Ensure that you have a MongoDB and MariaDB instance running and properly configured in *application.properties* file.
+Run *Application.java* class in your favorite IDE
+
+Or through a terminal, ensure that your maven installation is works and run *mvn spring-boot:run* command to start the appication.
+
+
+**Docker**
+
+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`
+
Steps
-----
+
+**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.
+
diff --git a/docs/logging/logging.rst b/docs/logging/logging.rst
index 5f61066..724df74 100644
--- a/docs/logging/logging.rst
+++ b/docs/logging/logging.rst
@@ -6,10 +6,14 @@
Logging
=======
+NBI application is using MongoDB and MariaDB databases.
+
Where to Access Information
---------------------------
+mongodb and Mariadb are accessible inside there respective docker container
+
Error / Warning Messages
------------------------
diff --git a/docs/offeredapis/offeredapis.rst b/docs/offeredapis/offeredapis.rst
new file mode 100644
index 0000000..9a264ff
--- /dev/null
+++ b/docs/offeredapis/offeredapis.rst
@@ -0,0 +1,194 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright 2018 ORANGE
+
+
+Offered APIs
+============
+***************
+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**.
+
+***************
+Global NBI architecture for Beijing release
+***************
+
+Following illustration provides a global view about nbi architecture,integration with other ONAP components and API resource/operation provided.
+
+.. image:: images/ONAP_External_ID_Beijing.jpg
+ :width: 800px
+
+***************
+API Version
+***************
+
+APIs are described with a state version with “v” following the API Name, e.g.: nbi/api/v1/productOrder.
+The schema associated with a REST API must have its version number aligned with that of the REST API.
+
+The version number has major, minor and revision numbers. E.g. v1.0.0
+The version number (without the revision number) is held in the URI.
+
+The major version number is incremented for an incompatible change.
+The minor version number is incremented for a compatible change.
+For minor modifications of the API, version numbering must not be updated, provided the following backward compatibility rules are respected:
+
+- New elements in a data type must be optional (minOccurs=0)
+- Changes in the cardinality of an attribute in a data type must be from mandatory to optional or from lower to greater
+- New attributes defined in an element must be optional (absence of use=”required”).
+- If new enumerated values are included, the former ones and its meaning must be kept.
+- If new operations are added, the existing operations must be kept
+- New parameters added to existing operations must be optional and existing parameters
+must be kept
+
+For major modifications of the API, not backward compatible and forcing client implementations to be changed, the version number must be updated.
+
+***************
+API Table
+***************
+
+.. |pdf-icon| image:: images/pdf.png
+ :width: 40px
+
+.. |swagger-icon| image:: images/swagger.png
+ :width: 40px
+
+
+.. |swaggerUI-icon| image:: images/swaggerUI.png
+ :width: 40px
+
+.. |html-icon| image:: images/html.png
+ :width: 40px
+
+.. |plantuml-icon| image:: images/uml.jpg
+ :width: 40px
+
+.. |postman-icon| image:: images/postman.png
+ :width: 40px
+
+.. csv-table::
+ :header: "API", "|swagger-icon|", "|html-icon|", "|plantuml-icon|", "|swagger-icon|", "|postman-icon|", "|pdf-icon|"
+ :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/?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"
+
+
+***************
+API Description
+***************
+
+**serviceCatalog:**
+
+From TMF633 serviceCatalog
+
+API at a glance:
+Only high level information are provided - swagger is documented.
+
+Only serviceSpecification resource is provided.
+Information are retrieved in SDC (and in Tosca file) - Only GET operation is provided - this API DID NOT UPDATE SDC
+
+Only characteristics at service level will be retrieved in ONAP Tosca file. For example if an ONAP service is composed of VNF and the VF module, the serviceSpecification resource will only feature characteristic describe in the ONAP service tosca model and not attributes in the tosca files for VNF or VF module.
+
+Only ‘basic’ service characteristics will be managed in this release. By ‘basic’ we mean string, boolean, integer parameter type and we do not manage ‘map’ or ‘list parameter type
+
+
+GET serviceSpecification(list)
+
+(example: GET /nbi/api/v1/serviceSpecification/?category=NetworkService&distributionStatus =DISTRIBUTED)
+
+It is possible to retrieve a list of serviceSpecification (get by list).
+
+Only attributes category and distributionStatus are available for serviceSpecification filtering. It is possible to select retrieved attributes using fields attribute.
+
+if no serviceSpecification matches, an empty list is send back.
+
+GET service Specification (id)
+
+(example: GET /nbi/api/v1/serviceSpecification/{uuid})
+
+It is use to retrieve one serviceSpecification - all available information are retieved (see swagger for description)
+
+
+**serviceInventory:**
+
+From TMF638 serviceInventory
+
+API at a glance:
+Only high level information are provided - swagger is documented.
+
+This API retrieves service(s) in the AAI inventory. Only following attributes will be retrieve in service inventory: id, name and type (no state or startDate available )
+
+GET Service Inventory (list):
+
+(example: GET /nbi/api/v1/service/?relatedParty.id=Pontus
+)
+
+GET (by list) allows to request with following criteria (all optional) :
+
+* id (id of the service instance) - id of the service instance (inventory)
+* serviceSpecification.id - id of the service specification (catalog)
+* serviceSpecification.name - name of the service specification (catalog)
+* relatedParty.id - id of the (aai) customer - if not filled we use ‘generic’ customer
+
+if no service matches, an empty list is send back.
+
+1. If a request is send without any parameter, we’ll retrieve the list of service-instance for the ‘generic’ customer
+2. If only customer parameter is filled (relatedParty.id + role= relatedParty’ONAPcustomer’) we’ll retrieve the list of service-instance for this customer
+3. If serviceSpecification.id or name is filled we’ll retrieve the list of Service instance (from this service specification) – We’ll use the customer id if provided (with Role=’ONAPcustomer) or generic if no customer id provided
+
+
+GET Service Inventory (id):
+
+(example: GET /nbi/api/v1/service/{uuid} but customerId & serviceSpecification.id must passed in requested parameters)
+
+
+Because of AAI capability, additionally to the service id, customer id and [serviceSpecification.id or serviceSpecification.name] must be supplied. If the customer id is not supplied, External API will use ‘generic’ customer
+
+**serviceOrder:**
+
+
+From TMF641 serviceOrder
+
+API at a glance:
+Only high level information are provided - swagger is documented.
+
+It is possible to use POST operation to create new serviceOrder in nbi and triggers service provisioning. GET operation is also available to retrieve one service order by providing id or a list of service order. For this release, only a subset of criteria is available:
+
+• externalId
+• state
+• description
+• orderDate.gt (orderDate must be greater – after -than)
+• orderDate.lt (orderDate must be lower-before - than)
+• fields – attribute used to filter retrieved attributes (if needed) and also for sorted SO
+• offset and limit are used for pagination purpose
+
+
+
+ServiceOrder will manage only ‘add’ and ‘delete’ operation (no change).
+
+prerequisites & assumptions :
+
+• Cloud & tenant information MUST BE defined in the external API property file
+• Management of ONAP customer for add service action:
+With the current version of APIs used from SO and AAI we need to manage a ‘customer’. This customer concept is confusing with Customer BSS concept. We took the following rules to manage the ‘customer’ information:
+
+• It could be provided through a serviceOrder in the service Order a relatedParty with role ‘ONAPcustomer’ should be provided in the serviceOrder header (we will not consider in this release the party at item level); External API component will check if this customer exists and create it in AAI if not.
+• If no relatedParty are provided the service will be affected to ‘generic’ customer (dummy customer) – we assume this ‘generic’ customer always exists.
+
+• Additionally nbi will create in AAI the service-type if it did not exists for the customer
+
+• Integration is done at service-level: nbi will trigger only SO request at serviceInstance level --> ONAP prerequisite: SO must be able to find a BPMN to process service fulfillment (integrate vnf, vnf activation in SDNC, VF module
+
+• State management: States are only managed by ServiceOrder component and could not be updated from north side via API. Accordingly to service order item fulfillment progress, order item state are updated. Order state is automatically updated based on item state.
+
+
+***************
+API flow
+***************
+
+API Flow illustration (with example messages) is described in this document: :download:`nbicallflow.pdf <pdf/nbicallflow.pdf>`
+