summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/administration/administration.rst3
-rw-r--r--docs/architecture/architecture.rst34
-rw-r--r--docs/architecture/images/ONAP_External_ID_Beijing.jpg (renamed from docs/offeredapis/images/ONAP External ID Beijing.jpg)bin103409 -> 103409 bytes
-rw-r--r--docs/configuration/configuration.rst71
-rw-r--r--docs/consumedapis/consumedapis.rst52
-rw-r--r--docs/delivery/delivery.rst26
-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
-rw-r--r--docs/offeredapis/serviceCatalog/apiServiceCatalog.plantuml4
-rw-r--r--docs/offeredapis/serviceCatalog/asciiDoc.adoc6
-rw-r--r--docs/offeredapis/serviceCatalog/documentation.html5
-rw-r--r--docs/offeredapis/serviceCatalog/markDown.md4
-rw-r--r--docs/offeredapis/serviceInventory/apiServiceInventory.plantuml4
-rw-r--r--docs/offeredapis/serviceInventory/asciiDoc.adoc6
-rw-r--r--docs/offeredapis/serviceInventory/documentation.html5
-rw-r--r--docs/offeredapis/serviceInventory/markDown.md4
-rw-r--r--docs/offeredapis/serviceOrder/apiServiceOrder.plantuml4
-rw-r--r--docs/offeredapis/serviceOrder/asciiDoc.adoc6
-rw-r--r--docs/offeredapis/serviceOrder/documentation.html5
-rw-r--r--docs/offeredapis/serviceOrder/markDown.md4
-rw-r--r--docs/offeredapis/swaggers/serviceCatalog_1_0_0.yaml4
-rw-r--r--docs/offeredapis/swaggers/serviceInventory_1_0_0.yaml4
-rw-r--r--docs/offeredapis/swaggers/serviceOrder_1_0_0.yaml4
-rw-r--r--src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/CreateServiceInstanceResponse.java10
-rw-r--r--src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/ModelInfo.java24
-rw-r--r--src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestReferences.java (renamed from src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestReference.java)4
-rw-r--r--src/main/java/org/onap/nbi/apis/serviceorder/workflow/SOTaskProcessor.java7
-rw-r--r--src/test/resources/mappings/so_delete_service_instance.json2
-rw-r--r--src/test/resources/mappings/so_post_create_service_instance.json2
32 files changed, 521 insertions, 19 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..8e7b9b9
--- /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 <../offeredapis/pdf/nbicallflow.pdf>`
+
diff --git a/docs/offeredapis/images/ONAP External ID Beijing.jpg b/docs/architecture/images/ONAP_External_ID_Beijing.jpg
index 8fbd4ab..8fbd4ab 100644
--- a/docs/offeredapis/images/ONAP External ID Beijing.jpg
+++ b/docs/architecture/images/ONAP_External_ID_Beijing.jpg
Binary files differ
diff --git a/docs/configuration/configuration.rst b/docs/configuration/configuration.rst
index b6619ce..fb777a5 100644
--- a/docs/configuration/configuration.rst
+++ b/docs/configuration/configuration.rst
@@ -5,3 +5,74 @@
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..66e5885 100644
--- a/docs/consumedapis/consumedapis.rst
+++ b/docs/consumedapis/consumedapis.rst
@@ -5,3 +5,55 @@
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/delivery/delivery.rst b/docs/delivery/delivery.rst
index 7ef857a..0bbc8c5 100644
--- a/docs/delivery/delivery.rst
+++ b/docs/delivery/delivery.rst
@@ -6,4 +6,30 @@
Delivery
========
+********************************
+NBI Dockers Containers Structure
+********************************
+
+Below is a diagram of the ExternalAPI/NBI project docker containers and the connections between them.
+
+.. blockdiag::
+
+
+ blockdiag delivery {
+ node_width = 170;
+ orientation = portrait;
+ MongoDB[shape = flowchart.database]
+ MariaDB[shape = flowchart.database]
+ NBI -> MongoDB, MariaDB;
+ group bi_group {
+ color = yellow;
+ label = "Business Layer"
+ NBI;
+ }
+ group data_storage_group {
+ color = orange;
+ label = "Data Storage Layer"
+ MongoDB; MariaDB;
+ }
+ }
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>`
+
diff --git a/docs/offeredapis/serviceCatalog/apiServiceCatalog.plantuml b/docs/offeredapis/serviceCatalog/apiServiceCatalog.plantuml
index 8483238..96e8164 100644
--- a/docs/offeredapis/serviceCatalog/apiServiceCatalog.plantuml
+++ b/docs/offeredapis/serviceCatalog/apiServiceCatalog.plantuml
@@ -1,3 +1,7 @@
+/' 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 {
diff --git a/docs/offeredapis/serviceCatalog/asciiDoc.adoc b/docs/offeredapis/serviceCatalog/asciiDoc.adoc
index 327f239..c5185bd 100644
--- a/docs/offeredapis/serviceCatalog/asciiDoc.adoc
+++ b/docs/offeredapis/serviceCatalog/asciiDoc.adoc
@@ -1,3 +1,9 @@
+////
+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
diff --git a/docs/offeredapis/serviceCatalog/documentation.html b/docs/offeredapis/serviceCatalog/documentation.html
index b1ea44a..c81c1d8 100644
--- a/docs/offeredapis/serviceCatalog/documentation.html
+++ b/docs/offeredapis/serviceCatalog/documentation.html
@@ -1,3 +1,8 @@
+<!--
+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>
diff --git a/docs/offeredapis/serviceCatalog/markDown.md b/docs/offeredapis/serviceCatalog/markDown.md
index 4d066c3..22d062e 100644
--- a/docs/offeredapis/serviceCatalog/markDown.md
+++ b/docs/offeredapis/serviceCatalog/markDown.md
@@ -1,3 +1,7 @@
+# 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
diff --git a/docs/offeredapis/serviceInventory/apiServiceInventory.plantuml b/docs/offeredapis/serviceInventory/apiServiceInventory.plantuml
index 447f3fe..a7ecc66 100644
--- a/docs/offeredapis/serviceInventory/apiServiceInventory.plantuml
+++ b/docs/offeredapis/serviceInventory/apiServiceInventory.plantuml
@@ -1,3 +1,7 @@
+/' 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 {
diff --git a/docs/offeredapis/serviceInventory/asciiDoc.adoc b/docs/offeredapis/serviceInventory/asciiDoc.adoc
index c6f51c4..548a6a9 100644
--- a/docs/offeredapis/serviceInventory/asciiDoc.adoc
+++ b/docs/offeredapis/serviceInventory/asciiDoc.adoc
@@ -1,3 +1,9 @@
+////
+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
diff --git a/docs/offeredapis/serviceInventory/documentation.html b/docs/offeredapis/serviceInventory/documentation.html
index 905fa1b..a55605a 100644
--- a/docs/offeredapis/serviceInventory/documentation.html
+++ b/docs/offeredapis/serviceInventory/documentation.html
@@ -1,3 +1,8 @@
+<!--
+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>
diff --git a/docs/offeredapis/serviceInventory/markDown.md b/docs/offeredapis/serviceInventory/markDown.md
index 3b02751..223c13b 100644
--- a/docs/offeredapis/serviceInventory/markDown.md
+++ b/docs/offeredapis/serviceInventory/markDown.md
@@ -1,3 +1,7 @@
+# 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
diff --git a/docs/offeredapis/serviceOrder/apiServiceOrder.plantuml b/docs/offeredapis/serviceOrder/apiServiceOrder.plantuml
index 3199855..eb78af2 100644
--- a/docs/offeredapis/serviceOrder/apiServiceOrder.plantuml
+++ b/docs/offeredapis/serviceOrder/apiServiceOrder.plantuml
@@ -1,3 +1,7 @@
+/' 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 {
diff --git a/docs/offeredapis/serviceOrder/asciiDoc.adoc b/docs/offeredapis/serviceOrder/asciiDoc.adoc
index 4a29548..29da92f 100644
--- a/docs/offeredapis/serviceOrder/asciiDoc.adoc
+++ b/docs/offeredapis/serviceOrder/asciiDoc.adoc
@@ -1,3 +1,9 @@
+////
+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
diff --git a/docs/offeredapis/serviceOrder/documentation.html b/docs/offeredapis/serviceOrder/documentation.html
index 0983ed9..09732b5 100644
--- a/docs/offeredapis/serviceOrder/documentation.html
+++ b/docs/offeredapis/serviceOrder/documentation.html
@@ -1,3 +1,8 @@
+<!--
+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>
diff --git a/docs/offeredapis/serviceOrder/markDown.md b/docs/offeredapis/serviceOrder/markDown.md
index 5ee40cf..b47779b 100644
--- a/docs/offeredapis/serviceOrder/markDown.md
+++ b/docs/offeredapis/serviceOrder/markDown.md
@@ -1,3 +1,7 @@
+# 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
diff --git a/docs/offeredapis/swaggers/serviceCatalog_1_0_0.yaml b/docs/offeredapis/swaggers/serviceCatalog_1_0_0.yaml
index 95e62fa..ab6eaa9 100644
--- a/docs/offeredapis/swaggers/serviceCatalog_1_0_0.yaml
+++ b/docs/offeredapis/swaggers/serviceCatalog_1_0_0.yaml
@@ -1,3 +1,7 @@
+# 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\
diff --git a/docs/offeredapis/swaggers/serviceInventory_1_0_0.yaml b/docs/offeredapis/swaggers/serviceInventory_1_0_0.yaml
index 99af226..c4a169e 100644
--- a/docs/offeredapis/swaggers/serviceInventory_1_0_0.yaml
+++ b/docs/offeredapis/swaggers/serviceInventory_1_0_0.yaml
@@ -1,3 +1,7 @@
+# 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\
diff --git a/docs/offeredapis/swaggers/serviceOrder_1_0_0.yaml b/docs/offeredapis/swaggers/serviceOrder_1_0_0.yaml
index fa2c28e..b881150 100644
--- a/docs/offeredapis/swaggers/serviceOrder_1_0_0.yaml
+++ b/docs/offeredapis/swaggers/serviceOrder_1_0_0.yaml
@@ -1,3 +1,7 @@
+# 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\
diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/CreateServiceInstanceResponse.java b/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/CreateServiceInstanceResponse.java
index bfda46e..590bace 100644
--- a/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/CreateServiceInstanceResponse.java
+++ b/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/CreateServiceInstanceResponse.java
@@ -17,13 +17,13 @@ package org.onap.nbi.apis.serviceorder.model.consumer;
public class CreateServiceInstanceResponse {
- public RequestReference getRequestReference() {
- return requestReference;
+ public RequestReferences getRequestReferences() {
+ return requestReferences;
}
- public void setRequestReference(RequestReference requestReference) {
- this.requestReference = requestReference;
+ public void setRequestReferences(RequestReferences requestReferences) {
+ this.requestReferences = requestReferences;
}
- private RequestReference requestReference;
+ private RequestReferences requestReferences;
}
diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/ModelInfo.java b/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/ModelInfo.java
index 3479f85..bef4183 100644
--- a/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/ModelInfo.java
+++ b/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/ModelInfo.java
@@ -21,6 +21,8 @@ public class ModelInfo {
private String modelInvariantId;
+ private String modelVersionId;
+
private String modelNameVersionId;
private String modelName;
@@ -87,11 +89,25 @@ public class ModelInfo {
this.modelCustomizationId = modelCustomizationId;
}
+ public String getModelVersionId() {
+ return modelVersionId;
+ }
+
+ public void setModelVersionId(String modelVersionId) {
+ this.modelVersionId = modelVersionId;
+ }
+
@Override
public String toString() {
- return "ModelInfo{" + "modelType='" + modelType + '\'' + ", modelInvariantId='" + modelInvariantId + '\''
- + ", modelNameVersionId='" + modelNameVersionId + '\'' + ", modelName='" + modelName + '\''
- + ", modelVersion='" + modelVersion + '\'' + ", modelCustomizationName='" + modelCustomizationName
- + '\'' + ", modelCustomizationId='" + modelCustomizationId + '\'' + '}';
+ return "ModelInfo{" +
+ "modelType='" + modelType + '\'' +
+ ", modelInvariantId='" + modelInvariantId + '\'' +
+ ", modelVersionId='" + modelVersionId + '\'' +
+ ", modelNameVersionId='" + modelNameVersionId + '\'' +
+ ", modelName='" + modelName + '\'' +
+ ", modelVersion='" + modelVersion + '\'' +
+ ", modelCustomizationName='" + modelCustomizationName + '\'' +
+ ", modelCustomizationId='" + modelCustomizationId + '\'' +
+ '}';
}
}
diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestReference.java b/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestReferences.java
index 2d0b7c9..2f74f73 100644
--- a/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestReference.java
+++ b/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestReferences.java
@@ -15,7 +15,7 @@
*/
package org.onap.nbi.apis.serviceorder.model.consumer;
-public class RequestReference {
+public class RequestReferences {
private String instanceId;
@@ -39,6 +39,6 @@ public class RequestReference {
@Override
public String toString() {
- return "RequestReference{" + "instanceId='" + instanceId + '\'' + ", requestId='" + requestId + '\'' + '}';
+ return "RequestReferences{" + "instanceId='" + instanceId + '\'' + ", requestId='" + requestId + '\'' + '}';
}
}
diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/workflow/SOTaskProcessor.java b/src/main/java/org/onap/nbi/apis/serviceorder/workflow/SOTaskProcessor.java
index 94d5553..d623b89 100644
--- a/src/main/java/org/onap/nbi/apis/serviceorder/workflow/SOTaskProcessor.java
+++ b/src/main/java/org/onap/nbi/apis/serviceorder/workflow/SOTaskProcessor.java
@@ -103,7 +103,7 @@ public class SOTaskProcessor {
updateServiceOrderItem(response.getBody(), serviceOrderItem);
if (response.getStatusCode() != HttpStatus.CREATED || response.getBody() == null
- || response.getBody().getRequestReference() == null) {
+ || response.getBody().getRequestReferences() == null) {
serviceOrderItem.setState(StateType.FAILED);
} else {
serviceOrderItem.setState(StateType.INPROGRESS);
@@ -246,6 +246,7 @@ public class SOTaskProcessor {
modelInfo.setModelType("service");
modelInfo.setModelInvariantId((String) sdcInfos.get("invariantUUID"));
modelInfo.setModelNameVersionId(orderItem.getService().getServiceSpecification().getId());
+ modelInfo.setModelVersionId(orderItem.getService().getServiceSpecification().getId());
modelInfo.setModelName((String) sdcInfos.get("name"));
modelInfo.setModelVersion((String) sdcInfos.get("version"));
requestDetails.setModelInfo(modelInfo);
@@ -301,8 +302,8 @@ public class SOTaskProcessor {
ServiceOrderItem orderItem) {
if (createServiceInstanceResponse != null && !orderItem.getState().equals(StateType.FAILED)) {
- orderItem.getService().setId(createServiceInstanceResponse.getRequestReference().getInstanceId());
- orderItem.setRequestId(createServiceInstanceResponse.getRequestReference().getRequestId());
+ orderItem.getService().setId(createServiceInstanceResponse.getRequestReferences().getInstanceId());
+ orderItem.setRequestId(createServiceInstanceResponse.getRequestReferences().getRequestId());
}
}
diff --git a/src/test/resources/mappings/so_delete_service_instance.json b/src/test/resources/mappings/so_delete_service_instance.json
index fae7b9e..d89c184 100644
--- a/src/test/resources/mappings/so_delete_service_instance.json
+++ b/src/test/resources/mappings/so_delete_service_instance.json
@@ -9,7 +9,7 @@
"Content-Type": "application/json"
},
"jsonBody": {
- "requestReference": {
+ "requestReferences": {
"instanceId": "instanceId",
"requestId": "requestId"
}
diff --git a/src/test/resources/mappings/so_post_create_service_instance.json b/src/test/resources/mappings/so_post_create_service_instance.json
index 239aecb..f5aaa90 100644
--- a/src/test/resources/mappings/so_post_create_service_instance.json
+++ b/src/test/resources/mappings/so_post_create_service_instance.json
@@ -9,7 +9,7 @@
"Content-Type": "application/json"
},
"jsonBody": {
- "requestReference": {
+ "requestReferences": {
"instanceId": "instanceId",
"requestId": "requestId"
}