summaryrefslogtreecommitdiffstats
path: root/nokiav2/docs
diff options
context:
space:
mode:
authorDenes Nemeth <denes.nemeth@nokia.com>2018-02-12 20:55:54 +0100
committerDenes Nemeth <denes.nemeth@nokia.com>2018-02-23 11:44:45 +0100
commitb17042b955489d8a023d09abad5436ff9b900dc3 (patch)
tree1e4392ac04a2fb1ed8d17075d504cf6594acaf16 /nokiav2/docs
parentd4982f7b1777e9cdae9a4cc7d0d104263889ac69 (diff)
Updating Nokia driver
Change-Id: I950afe6acbdb359cd67a448024f006a45e8fc293 Signed-off-by: Denes Nemeth <denes.nemeth@nokia.com> Issue-ID: VFC-728
Diffstat (limited to 'nokiav2/docs')
-rw-r--r--nokiav2/docs/.gitignore3
-rw-r--r--nokiav2/docs/Makefile20
-rw-r--r--nokiav2/docs/conf.py155
-rw-r--r--nokiav2/docs/index.rst20
-rw-r--r--nokiav2/docs/integration.rst156
-rw-r--r--nokiav2/docs/onboarding.rst125
-rw-r--r--nokiav2/docs/sample/aai.create.customer.request.json21
-rw-r--r--nokiav2/docs/sample/aai.create.tenant.request.json6
-rw-r--r--nokiav2/docs/sample/cbam.collectConnectionPoints.js71
-rw-r--r--nokiav2/docs/sample/cbam.post.collectConnectionPoints.js4
-rw-r--r--nokiav2/docs/sample/cbam.pre.collectConnectionPoints.js1
-rw-r--r--nokiav2/docs/sampleVnfs/simple/cbam.instantiation.request.json60
-rw-r--r--nokiav2/docs/sampleVnfs/simple/simple.csarbin0 -> 12147 bytes
-rw-r--r--nokiav2/docs/sampleVnfs/simple/vfc.ns.create.request.json9
-rw-r--r--nokiav2/docs/sampleVnfs/simple/vfc.ns.instantiation.request.json41
-rw-r--r--nokiav2/docs/sampleVnfs/simpleDual/cbam.instantiation.request.json60
-rw-r--r--nokiav2/docs/sampleVnfs/simpleDual/sample/vfc.to.cbam.instantiation.json65
-rw-r--r--nokiav2/docs/sampleVnfs/simpleDual/simpleDual.csarbin0 -> 11470 bytes
-rw-r--r--nokiav2/docs/sampleVnfs/simpleDual/vfc.ns.create.request.json9
-rw-r--r--nokiav2/docs/sampleVnfs/simpleDual/vfc.ns.heal.request.json13
-rw-r--r--nokiav2/docs/sampleVnfs/simpleDual/vfc.ns.instantiation.request.json41
-rw-r--r--nokiav2/docs/sampleVnfs/simpleDual/vfc.vnf.scale.request.json9
-rw-r--r--nokiav2/docs/samplevnf.rst19
-rw-r--r--nokiav2/docs/vnfintegration.rst51
24 files changed, 959 insertions, 0 deletions
diff --git a/nokiav2/docs/.gitignore b/nokiav2/docs/.gitignore
new file mode 100644
index 00000000..589cdd01
--- /dev/null
+++ b/nokiav2/docs/.gitignore
@@ -0,0 +1,3 @@
+_build
+.DS_Store
+
diff --git a/nokiav2/docs/Makefile b/nokiav2/docs/Makefile
new file mode 100644
index 00000000..d05caa83
--- /dev/null
+++ b/nokiav2/docs/Makefile
@@ -0,0 +1,20 @@
+# Minimal makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS =
+SPHINXBUILD = sphinx-build
+SPHINXPROJ = NokiaSVNFMdocumentation
+SOURCEDIR = .
+BUILDDIR = _build
+
+# Put it first so that "make" without argument is like "make help".
+help:
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+
+.PHONY: help Makefile
+
+# Catch-all target: route all unknown targets to Sphinx using the new
+# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
+%: Makefile
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) \ No newline at end of file
diff --git a/nokiav2/docs/conf.py b/nokiav2/docs/conf.py
new file mode 100644
index 00000000..8bf537b6
--- /dev/null
+++ b/nokiav2/docs/conf.py
@@ -0,0 +1,155 @@
+# -*- coding: utf-8 -*-
+#
+# Configuration file for the Sphinx documentation builder.
+#
+# This file does only contain a selection of the most common options. For a
+# full list see the documentation:
+# http://www.sphinx-doc.org/en/stable/config
+
+# -- Path setup --------------------------------------------------------------
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#
+# import os
+# import sys
+# sys.path.insert(0, os.path.abspath('.'))
+
+
+# -- Project information -----------------------------------------------------
+
+project = u'Nokia SVNFM documentation'
+copyright = u'2018, Denes Nemeth'
+author = u'Denes Nemeth'
+
+# The short X.Y version
+version = u''
+# The full version, including alpha/beta/rc tags
+release = u'1.1.0-SNAPSHOT'
+
+
+# -- General configuration ---------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#
+# needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = [
+]
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix(es) of source filenames.
+# You can specify multiple suffix as a list of string:
+#
+# source_suffix = ['.rst', '.md']
+source_suffix = '.rst'
+
+# The master toctree document.
+master_doc = 'index'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#
+# This is also used if you do content translation via gettext catalogs.
+# Usually you set "language" from the command line for these cases.
+language = None
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+# This pattern also affects html_static_path and html_extra_path .
+exclude_patterns = [u'_build', 'Thumbs.db', '.DS_Store']
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+
+# -- Options for HTML output -------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. See the documentation for
+# a list of builtin themes.
+#
+html_theme = 'alabaster'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further. For a list of options available for each theme, see the
+# documentation.
+#
+# html_theme_options = {}
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# Custom sidebar templates, must be a dictionary that maps document names
+# to template names.
+#
+# The default sidebars (for documents that don't match any pattern) are
+# defined by theme itself. Builtin themes are using these templates by
+# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
+# 'searchbox.html']``.
+#
+# html_sidebars = {}
+
+
+# -- Options for HTMLHelp output ---------------------------------------------
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'NokiaSVNFMdocumentationdoc'
+
+
+# -- Options for LaTeX output ------------------------------------------------
+
+latex_elements = {
+ # The paper size ('letterpaper' or 'a4paper').
+ #
+ # 'papersize': 'letterpaper',
+
+ # The font size ('10pt', '11pt' or '12pt').
+ #
+ # 'pointsize': '10pt',
+
+ # Additional stuff for the LaTeX preamble.
+ #
+ # 'preamble': '',
+
+ # Latex figure (float) alignment
+ #
+ # 'figure_align': 'htbp',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+# author, documentclass [howto, manual, or own class]).
+latex_documents = [
+ (master_doc, 'NokiaSVNFMdocumentation.tex', u'Nokia SVNFM documentation Documentation',
+ u'Denes Nemeth', 'manual'),
+]
+
+
+# -- Options for manual page output ------------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+ (master_doc, 'nokiasvnfmdocumentation', u'Nokia SVNFM documentation Documentation',
+ [author], 1)
+]
+
+
+# -- Options for Texinfo output ----------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+# dir menu entry, description, category)
+texinfo_documents = [
+ (master_doc, 'NokiaSVNFMdocumentation', u'Nokia SVNFM documentation Documentation',
+ author, 'NokiaSVNFMdocumentation', 'One line description of project.',
+ 'Miscellaneous'),
+] \ No newline at end of file
diff --git a/nokiav2/docs/index.rst b/nokiav2/docs/index.rst
new file mode 100644
index 00000000..b9a98466
--- /dev/null
+++ b/nokiav2/docs/index.rst
@@ -0,0 +1,20 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright 2018 Nokia
+
+Welcome to Nokia SVNFM documentation!
+=====================================================
+
+.. toctree::
+ :maxdepth: 1
+ :caption: Contents:
+
+ integration.rst
+ samplevnf.rst
+ vnfintegration.rst
+ onboarding.rst
+
+Indices and tables
+==================
+
+* :ref:`search`
diff --git a/nokiav2/docs/integration.rst b/nokiav2/docs/integration.rst
new file mode 100644
index 00000000..c2722c57
--- /dev/null
+++ b/nokiav2/docs/integration.rst
@@ -0,0 +1,156 @@
+Integrate ONAP with Nokia VNFM
+==============================
+
+Prepare CBAM
+------------
+
+* Start CBAM in ONAP network
+
+ - via image: (read the CBAM installation guide)
+
+* Register driver in CBAM
+
+ - Log into CBAM via SSH and get keycloak admin password
+
+ - ectl get /cbam/cluster/components/keycloak/admin_credentials/password
+
+ - Log into keycloak https://<cbamIp>/auth/admin with admin username and password from previous step and change password (save the changed password)
+ - Add a new client
+
+ - set client id to onapClient
+ - change credential type to confidental
+ - enable Standard Flow Enabled, Direct Access Grants Enabled, Service Accounts Enabled
+ - add * for redirect URL
+ - save
+ - note the client id <clientId>
+ - add new credential
+ - note the client secret <clientSecret>
+
+ - Add a new user
+
+ - note the username <onapUsername>
+ - reset password
+ - assign the "user" role to the created user
+
+ - Log into CBAM GUI usin the created user
+
+ - change and note the password <onapPassword>
+
+ - Add SSL certificates for all VIM connection or disable certificate verification
+
+ - For insecure
+
+ - sudo su -
+ - ectl set /cbam/cluster/components/tlm/insecure_vim_connection true
+ - ectl set /actions/reconfigure start
+ - journalctl -fu cbam-reconfigure.service
+ - (wait for "Started cbam-reconfigure.service.")
+
+ - For secure: (read CBAM documentation)
+
+Prepare /ets/hosts file on your machine (optional easier to copy paste URLs)
+----------------------------------------------------------------------------
+
++--------------+---------------------------------+
+| IP address | DNS entry |
++==============+=================================+
+| 1.2.3.4 | portal.api.simpledemo.onap.org |
++--------------+---------------------------------+
+| 1.2.3.4 | policy.api.simpledemo.onap.org |
++--------------+---------------------------------+
+| 1.2.3.4 | sdc.api.simpledemo.onap.org |
++--------------+---------------------------------+
+| 1.2.3.4 | vid.api.simpledemo.onap.org |
++--------------+---------------------------------+
+| 1.2.3.4 | aai.api.simpledemo.onap.org |
++--------------+---------------------------------+
+| 1.2.3.4 | msb.api.simpledemo.onap.org |
++--------------+---------------------------------+
+| 1.2.3.4 | robot.api.simpledemo.onap.org |
++--------------+---------------------------------+
+
+
+Add the VNFM driver to ONAP
+---------------------------
+
+- Locate the IP address of the MSB (MSB_IP). Look at the VM instances of ONAP and search one with vm1-multi-service name. This is where the MSB is located
+- Create VIM in A&AI (may already exist) (repeat for all clouds planed to be used)
+
+ - http://msb.api.simpledemo.onap.org/iui/aai-esr-gui/extsys/vim/vimView.html
+
+- Determine the tenant id to be used (log into the cloud) (repeat for all tenants planed to be used within the cloud)
+
+ - http://<horizonUrl>/project/access_and_security/ Intentity / Projects
+
+- Create tenant (may already exist) (repeat for all tenants planed to be used within the cloud)
+
+ + tool: Postman
+ + change tenant id, region id owner id
+ + method: PUT
+ + url: https://aai.api.simpledemo.onap.org:8443/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/<cloudOwner>/<cloudRegion>/tenants/tenant/<tenantId>
+ + Headers
+
+ - basic auth AAI:AAI
+ - X-FromAppId : any
+ - Content-type: application/json
+ - Accept: application/json
+
+ - Content: :download:`aai.create.tenant.request.json <sample/aai.create.tenant.request.json>`
+
+ - change tenant id, region id owner id and tenant name
+
+- Register the VNFM as external system (repeat for all cloud planed to be used)
+
+ - Visit MSB http://msb.api.simpledemo.onap.org:9518/api/aai-esr-server/v1/vims
+
+ - note the cloud owner field <cloudOwner>
+ - note the region id field <cloudRegionId>
+
+ - Visit MSB http://msb.api.simpledemo.onap.org/iui/aai-esr-gui/extsys/vnfm/vnfmView.html and click on register button
+
++-----------------+-----------------------------------+
+| key | Value |
++-----------------+-----------------------------------+
+| Name | CbamVnfm |
++-----------------+-----------------------------------+
+| type | NokiaSVNFM |
++-----------------+-----------------------------------+
+| Vendor | Nokia |
++-----------------+-----------------------------------+
+| version | v1 |
++-----------------+-----------------------------------+
+| URL | https://<cbamIp>:443/vnfm/lcm/v3 |
++-----------------+-----------------------------------+
+| VIM | <cloudOwner>_<cloudRegionId> |
++-----------------+-----------------------------------+
+| certificate URL | |
++-----------------+-----------------------------------+
+| Username | <clientId> |
++-----------------+-----------------------------------+
+| Password | <clientSecret> |
++-----------------+-----------------------------------+
+
+ - Determine the UUID of the VNFM (if the VNFM was registered multiple times select one at random)
+
+ - visit http://msb.api.simpledemo.onap.org:9518/api/aai-esr-server/v1/vnfms and search for the previously registered VNFM
+ - note the id field <vnfmId>
+
+ - Download the cbam driver into ONAP multi service node
+ - Load the image into docker and note the image identifier <imageId>
+
+.. code-block:: console
+
+ docker load -i /tmp/nokia.img
+
+Start the driver (fill in values)
+
+.. code-block:: console
+
+ export CBAM_IP=<cbamIp>
+ export MULTI_NODE_IP=<multiNodeIp>
+ export VNFM_ID=<vnfmId>
+ export IMAGE_ID=<imageId>
+ export CBAM_PASSWORD=<onapPassword>
+ export CBAM_USERNAME=<onapUsername>
+ docker run --name vfc_nokia -p 8089:8089 -e "MSB_IP=$MULTI_NODE_IP" -e "CONFIGURE=kuku" -e "EXTERNAL_IP=$MULTI_NODE_IP" -e "CBAM_CATALOG_URL=https://$CBAM_IP:443/api/catalog/adapter" -e "CBAM_LCN_URL=https://$CBAM_IP:443/vnfm/lcn/v3" -e "CBAM_KEYCLOAK_URL=https://$CBAM_IP:443/auth" -e "CBAM_USERNAME=$CBAM_USERNAME" -e "CBAM_PASSWORD=$CBAM_PASSWORD" -e "VNFM_ID=$VNFM_ID" -d --stop-timeout 300 $IMAGE_ID
+
diff --git a/nokiav2/docs/onboarding.rst b/nokiav2/docs/onboarding.rst
new file mode 100644
index 00000000..6e3ade3c
--- /dev/null
+++ b/nokiav2/docs/onboarding.rst
@@ -0,0 +1,125 @@
+Onboard NS
+==========
+
+Prepare environment
+-------------------
+- Create customer in A&AI
+
+ - tool: Postman
+ - method: PUT
+ - URL: https://aai.api.simpledemo.onap.org:8443/aai/v11/business/customers/customer/123456
+ - Headers
+
+ - basic auth AAI:AAI
+ - X-FromAppId : any
+ - Content-type: application/json
+ - Accept: application/json
+
+ - body: :download:`aai.create.customer.request.json <sample/aai.create.customer.request.json>`
+
+ - Edit tenant id, cloud owner, cloud region
+
+- Log into ONAP portal with designer role (cs0008)
+
+ - Create License model
+
+ - ONBOARD / Create new VLP
+
+ - name = select a name easy to remember
+
+ - Entitlement pool / add new Entitlement pool
+
+ - name = any
+
+ - License key group / add new licencse key group
+
+ - name = any
+ - type = universal
+
+ - Feature groups / add feature group
+
+ - name = any
+ - part number = 123456
+ - manufacturer reference number = 123456
+ - entitlement pool (add any with arrow button)
+ - license key group (add any with arrow button)
+ - save
+
+ - License agreements / Add license agreement
+
+ - name = any
+ - license term unlimited
+ - feature groups (add any with arrow button)
+
+ - Check in (lock icon at top)
+ - Submit (tick icon at top)
+
+ - On-board / Create new VSP (vendor software package)
+
+ - Create VSP
+
+ - name = select a name easy to remember
+ - vendor = name of the license model
+ - category = Database (IMPORTANT NOT TO CHANGE THIS (linked to the global customer))
+ - onboarding procedure = network package
+ - description = any
+
+ - Upload CSAR
+
+ - overview / software product attachments / select file
+
+ - Select licence
+
+ - overview / software product details / license agreement
+ - licenses
+ - set license version, license agreement, feature groups
+ - click on save icon at top
+ - commit & submit using icons at top
+
+ - Create VF
+
+ - home / import / import vsp (select VSP from list)
+
+ - set General / Vendor model number to CBAM package VNFD ID
+
+ - set sVNFM property assignment / inputs / nf_type set NokiaSVNFM
+ - commit
+ - submit for testing
+
+ - Test VF
+
+ - Log in as tester role
+ - Select VF
+ - Start testing button
+ - Accept testing
+
+ - Create Service
+
+ - Log in as designer role
+ - home / add / add service
+ - name = select a name easy to remember
+ - project code = 123456
+ - Check in & check out (required to save a safe point to restore to if something goes wrong)
+
+ - Add created VF (Composition)
+
+ - drag icon to main picture (be patient only drag once, if multiple icons appear restart procedure )
+ - Check in
+ - Open service again and verify that the VF is part of the service under composition
+
+ - Submit for testing
+ - Test Service
+
+ - Log in as tester role (jm0007)
+ - start testing & accept
+
+ - Approve service
+
+ - Log in as governence user (gv0001)
+ - Select service and press approve
+
+ - Distribute the service
+
+ - Log in as operations personen (op0001)
+ - Select service and push distribute
+ - Click on monitor (verify that the state of the service is distributed)
diff --git a/nokiav2/docs/sample/aai.create.customer.request.json b/nokiav2/docs/sample/aai.create.customer.request.json
new file mode 100644
index 00000000..35773843
--- /dev/null
+++ b/nokiav2/docs/sample/aai.create.customer.request.json
@@ -0,0 +1,21 @@
+{
+ "global-customer-id": "123456",
+ "subscriber-name": "CbamCustomer",
+ "subscriber-type": "INFRA",
+ "service-subscriptions": {
+ "service-subscription": [
+ {
+ "service-type": "Database",
+ "relationship-list": {
+ "relationship": [{
+ "related-to": "tenant",
+ "relationship-data": [
+ {"relationship-key": "cloud-region.cloud-owner", "relationship-value": "Nokia"},
+ {"relationship-key": "cloud-region.cloud-region-id", "relationship-value": "RegionOne"},
+ {"relationship-key": "tenant.tenant-id", "relationship-value": "2ca57d2dbeda4e8a84739319bab769f4"}
+ ]
+ }]
+ }
+ }
+ ]}
+} \ No newline at end of file
diff --git a/nokiav2/docs/sample/aai.create.tenant.request.json b/nokiav2/docs/sample/aai.create.tenant.request.json
new file mode 100644
index 00000000..afe2f546
--- /dev/null
+++ b/nokiav2/docs/sample/aai.create.tenant.request.json
@@ -0,0 +1,6 @@
+ {
+ "cloud-owner": "Nokia",
+ "cloud-region-id": "RegionOne",
+ "tenant-id": "2ca57d2dbeda4e8a84739319bab769f4",
+ "tenant-name": "VFC"
+ } \ No newline at end of file
diff --git a/nokiav2/docs/sample/cbam.collectConnectionPoints.js b/nokiav2/docs/sample/cbam.collectConnectionPoints.js
new file mode 100644
index 00000000..f5cfc675
--- /dev/null
+++ b/nokiav2/docs/sample/cbam.collectConnectionPoints.js
@@ -0,0 +1,71 @@
+var collectConnectionPoints = function(resourceModel, diff) {
+ return collectPorts(resourceModel, diff)
+};
+
+function collectPorts(resourceModel, diff){
+ pathToResource = {}
+ collectResources('', resourceModel, pathToResource, true);
+ transformedPorts = []
+ Object.keys(pathToResource).forEach(function (path) {
+ var port = pathToResource[path];
+ transformedPort = {}
+ transformedPort.name = port.attributes.name;
+ transformedPort.providerId = port.attributes.id;
+ transformedPort.cpId = path;
+ var managedPort = false;
+ if(port.hasOwnProperty('externalConnectionPoint')){
+ transformedPort.ecpdId = port.externalConnectionPoint;
+ managedPort = true;
+ }
+ if(port.hasOwnProperty('connectionPoint')){
+ transformedPort.cpdId = port.connectionPoint;
+ managedPort = true;
+ }
+ transformedPort.tenantId = port.attributes.tenant_id;
+ transformedPort.ipAddress = port.attributes.fixed_ips[0].ip_address;
+ transformedPort.macAddress = port.attributes.mac_address;
+ transformedPort.serverProviderId = port.attributes.device_id;
+ transformedPort.networkProviderId = port.attributes.network_id;
+ transformedPort.changeType = 'untouched';
+ var added = contains(diff.add, path);
+ var removed = contains(diff.remove, path);
+ if(added && removed){
+ transformedPort.changeType = "MODIFIED";
+ }
+ else{
+ if(removed){
+ transformedPort.changeType = "REMOVED";
+ }
+ if(added){
+ transformedPort.changeType = "ADDED";
+ }
+ }
+ if('untouched' != transformedPort.changeType && managedPort){
+ transformedPorts.push(transformedPort)
+ }
+ })
+ return transformedPorts;
+};
+
+function contains(resourceChanges, path){
+ var keys = Object.keys(resourceChanges);
+ return keys.indexOf(path) !== -1;
+}
+
+function collectResources(path, root, pathToResouceMap, onResources){
+ root && Object.keys(root).forEach(function(item) {
+ if(item == 'resource_type' && root[item] == 'OS::Neutron::Port'){
+ pathToResouceMap[path] = root
+ }
+ else if(typeof root[item] === "object"){
+ var newItem = onResources ? "" : item;
+ var newPath = path;
+ if('' != newItem && path != ''){
+ newPath += ".";
+ }
+ newPath += newItem;
+ collectResources(newPath, root[item], pathToResouceMap, !onResources)
+ }
+ });
+};
+
diff --git a/nokiav2/docs/sample/cbam.post.collectConnectionPoints.js b/nokiav2/docs/sample/cbam.post.collectConnectionPoints.js
new file mode 100644
index 00000000..c70d36ed
--- /dev/null
+++ b/nokiav2/docs/sample/cbam.post.collectConnectionPoints.js
@@ -0,0 +1,4 @@
+return {
+ "cbam_post" : collectConnectionPoints($.resource_model, $.model_diff),
+ "cbam_pre" : $.operation_result.cbam_pre
+ }
diff --git a/nokiav2/docs/sample/cbam.pre.collectConnectionPoints.js b/nokiav2/docs/sample/cbam.pre.collectConnectionPoints.js
new file mode 100644
index 00000000..64153a20
--- /dev/null
+++ b/nokiav2/docs/sample/cbam.pre.collectConnectionPoints.js
@@ -0,0 +1 @@
+return { "cbam_pre" : collectConnectionPoints($.resource_model, $.model_diff) }
diff --git a/nokiav2/docs/sampleVnfs/simple/cbam.instantiation.request.json b/nokiav2/docs/sampleVnfs/simple/cbam.instantiation.request.json
new file mode 100644
index 00000000..5ec6acbc
--- /dev/null
+++ b/nokiav2/docs/sampleVnfs/simple/cbam.instantiation.request.json
@@ -0,0 +1,60 @@
+{
+ "apiVersion":"3.1",
+ "computeResourceFlavours": [
+ {
+ "vnfdVirtualComputeDescId": "server_compute",
+ "resourceId": "m1.small"
+ }
+ ],
+ "extVirtualLinks": [
+ {
+ "extCps": [
+ {
+ "cpdId": "commisioning_ecp"
+ }
+ ],
+ "resourceId": "pub_net"
+ },
+ {
+ "extCps": [
+ {
+ "cpdId": "vnftovnf_ecp"
+ }
+ ],
+ "resourceId": "preservedNetwork"
+ }
+ ],
+ "zones": [
+ {
+ "resourceId": "compute-a",
+ "id": "zoneInfoId"
+ }
+ ],
+ "flavourId": "scalable",
+ "grantlessMode": true,
+ "softwareImages": [
+ {
+ "resourceId": "ubuntu.16.04",
+ "vnfdSoftwareImageId": "server_image"
+ }
+ ],
+ "vims": [
+ {
+ "accessInfo": {
+ "username": "develadm",
+ "tenant": "devel",
+ "password": "develpass",
+ "region": "RegionOne"
+ },
+ "interfaceInfo": {
+ "endpoint": "https://10.41.49.107:5000/v2.0/",
+ "trustedCertificates": [],
+ "skipCertificateVerification": true,
+ "skipCertificateHostnameCheck": true
+ },
+ "vimInfoType": "OPENSTACK_V2_INFO",
+ "id": "vim_id"
+ }
+ ],
+ "instantiationLevelId": "default"
+}
diff --git a/nokiav2/docs/sampleVnfs/simple/simple.csar b/nokiav2/docs/sampleVnfs/simple/simple.csar
new file mode 100644
index 00000000..3d87246d
--- /dev/null
+++ b/nokiav2/docs/sampleVnfs/simple/simple.csar
Binary files differ
diff --git a/nokiav2/docs/sampleVnfs/simple/vfc.ns.create.request.json b/nokiav2/docs/sampleVnfs/simple/vfc.ns.create.request.json
new file mode 100644
index 00000000..81e9abc4
--- /dev/null
+++ b/nokiav2/docs/sampleVnfs/simple/vfc.ns.create.request.json
@@ -0,0 +1,9 @@
+{
+ "nsName": "cbam_ns_dual_2",
+ "csarId": "0479b45c-85cb-4dae-979a-e44618b1a49f",
+ "context": {
+ "globalCustomerId" : "123456",
+ "serviceType" : "Database"
+ },
+ "description": "string"
+}
diff --git a/nokiav2/docs/sampleVnfs/simple/vfc.ns.instantiation.request.json b/nokiav2/docs/sampleVnfs/simple/vfc.ns.instantiation.request.json
new file mode 100644
index 00000000..30efc96e
--- /dev/null
+++ b/nokiav2/docs/sampleVnfs/simple/vfc.ns.instantiation.request.json
@@ -0,0 +1,41 @@
+{
+ "nsInstanceId": "e7d79bd8-8e97-48fa-bbb8-fe2e8166b61c",
+ "additionalParamForNs": {
+ "location": "Nokia_RegionOne",
+ "vnfs": {
+ "669e8f94-b3a4-47ff-9245-c023c9fd5657": {
+ "computeResourceFlavours": [
+ {
+ "vnfdVirtualComputeDescId": "server_compute",
+ "resourceId": "m1.small"
+ }
+ ],
+ "extVirtualLinks": [
+ {
+ "extCps": [
+ {
+ "cpdId": "comuniversal_ecp"
+ }
+ ],
+ "resourceId": "external"
+ }
+ ],
+ "zones": [
+ {
+ "resourceId": "nova",
+ "id": "zoneInfoId"
+ }
+ ],
+ "flavourId": "scalable",
+ "vimType": "OPENSTACK_V2_INFO",
+ "instantiationLevel": "default",
+ "softwareImages": [
+ {
+ "resourceId": "ubuntu-16.04",
+ "vnfdSoftwareImageId": "server_image"
+ }
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/nokiav2/docs/sampleVnfs/simpleDual/cbam.instantiation.request.json b/nokiav2/docs/sampleVnfs/simpleDual/cbam.instantiation.request.json
new file mode 100644
index 00000000..5ec6acbc
--- /dev/null
+++ b/nokiav2/docs/sampleVnfs/simpleDual/cbam.instantiation.request.json
@@ -0,0 +1,60 @@
+{
+ "apiVersion":"3.1",
+ "computeResourceFlavours": [
+ {
+ "vnfdVirtualComputeDescId": "server_compute",
+ "resourceId": "m1.small"
+ }
+ ],
+ "extVirtualLinks": [
+ {
+ "extCps": [
+ {
+ "cpdId": "commisioning_ecp"
+ }
+ ],
+ "resourceId": "pub_net"
+ },
+ {
+ "extCps": [
+ {
+ "cpdId": "vnftovnf_ecp"
+ }
+ ],
+ "resourceId": "preservedNetwork"
+ }
+ ],
+ "zones": [
+ {
+ "resourceId": "compute-a",
+ "id": "zoneInfoId"
+ }
+ ],
+ "flavourId": "scalable",
+ "grantlessMode": true,
+ "softwareImages": [
+ {
+ "resourceId": "ubuntu.16.04",
+ "vnfdSoftwareImageId": "server_image"
+ }
+ ],
+ "vims": [
+ {
+ "accessInfo": {
+ "username": "develadm",
+ "tenant": "devel",
+ "password": "develpass",
+ "region": "RegionOne"
+ },
+ "interfaceInfo": {
+ "endpoint": "https://10.41.49.107:5000/v2.0/",
+ "trustedCertificates": [],
+ "skipCertificateVerification": true,
+ "skipCertificateHostnameCheck": true
+ },
+ "vimInfoType": "OPENSTACK_V2_INFO",
+ "id": "vim_id"
+ }
+ ],
+ "instantiationLevelId": "default"
+}
diff --git a/nokiav2/docs/sampleVnfs/simpleDual/sample/vfc.to.cbam.instantiation.json b/nokiav2/docs/sampleVnfs/simpleDual/sample/vfc.to.cbam.instantiation.json
new file mode 100644
index 00000000..504c7f11
--- /dev/null
+++ b/nokiav2/docs/sampleVnfs/simpleDual/sample/vfc.to.cbam.instantiation.json
@@ -0,0 +1,65 @@
+{
+ "vnfInstanceName": "vnf669e8f94-b3a4-47ff-9245-c02",
+ "extVirtualLink": [
+ {
+ "resourceSubnetId": "23abdbc0-7c16-4dbc-a879-2d68f87c0ecf",
+ "resourceId": "da9a2d26-e70b-4402-b343-d0060f2ab298",
+ "vlInstanceId": "c1d78629-7121-400d-9ced-84340508feec",
+ "cpdId": "vnftovnf_cp",
+ "vim": {
+ "vimid": "Nokia_RegionOne"
+ }
+ }
+ ],
+ "vnfPackageId": "669e8f94-b3a4-47ff-9245-c023c9fd5657",
+ "additionalParam": {
+ "inputs": {
+ "vnfs": {
+ "669e8f94-b3a4-47ff-9245-c023c9fd5657": {
+ "extVirtualLinks": [
+ {
+ "resourceId": "external",
+ "extCps": [
+ {
+ "cpdId": "commisioning_ecp"
+ }
+ ]
+ }
+ ],
+ "vimType": "OPENSTACK_V2_INFO",
+ "instantiationLevel": "default",
+ "softwareImages": [
+ {
+ "vnfdSoftwareImageId": "server_image",
+ "resourceId": "ubuntu-16.04"
+ }
+ ],
+ "flavourId": "scalable",
+ "zones": [
+ {
+ "resourceId": "nova",
+ "id": "zoneInfoId"
+ }
+ ],
+ "computeResourceFlavours": [
+ {
+ "resourceId": "m1.small",
+ "vnfdVirtualComputeDescId": "server_compute"
+ }
+ ]
+ }
+ },
+ "location": "Nokia_RegionOne"
+ },
+ "extVirtualLinks": [
+ {
+ "key_name": "vnftovnf_cp.virtual_link",
+ "vl_instance_id": "c1d78629-7121-400d-9ced-84340508feec",
+ "network_name": "myNetworkName",
+ "subnetwork_name": "mySubnetName"
+ }
+ ],
+ "vimId": "Nokia_RegionOne"
+ },
+ "vnfDescriptorId": "669e8f94-b3a4-47ff-9245-c023c9fd5657"
+} \ No newline at end of file
diff --git a/nokiav2/docs/sampleVnfs/simpleDual/simpleDual.csar b/nokiav2/docs/sampleVnfs/simpleDual/simpleDual.csar
new file mode 100644
index 00000000..32c3f893
--- /dev/null
+++ b/nokiav2/docs/sampleVnfs/simpleDual/simpleDual.csar
Binary files differ
diff --git a/nokiav2/docs/sampleVnfs/simpleDual/vfc.ns.create.request.json b/nokiav2/docs/sampleVnfs/simpleDual/vfc.ns.create.request.json
new file mode 100644
index 00000000..fd2f724b
--- /dev/null
+++ b/nokiav2/docs/sampleVnfs/simpleDual/vfc.ns.create.request.json
@@ -0,0 +1,9 @@
+{
+ "nsName": "cbam_ns_dual_20180125_1",
+ "csarId": "96ea0048-b91d-4478-ab18-b88d15bcd1aa",
+ "context": {
+ "globalCustomerId" : "123456",
+ "serviceType" : "Database"
+ },
+ "description": "string"
+} \ No newline at end of file
diff --git a/nokiav2/docs/sampleVnfs/simpleDual/vfc.ns.heal.request.json b/nokiav2/docs/sampleVnfs/simpleDual/vfc.ns.heal.request.json
new file mode 100644
index 00000000..e62665db
--- /dev/null
+++ b/nokiav2/docs/sampleVnfs/simpleDual/vfc.ns.heal.request.json
@@ -0,0 +1,13 @@
+{
+ "healVnfData": {
+ "vnfInstanceId": "05901205-622e-495b-9673-25c433c1c35a",
+ "cause": "cause",
+ "additionalParams": {
+ "action": "restartvm",
+ "actionvminfo": {
+ "vmid": "vmId",
+ "vmname": "vmname"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/nokiav2/docs/sampleVnfs/simpleDual/vfc.ns.instantiation.request.json b/nokiav2/docs/sampleVnfs/simpleDual/vfc.ns.instantiation.request.json
new file mode 100644
index 00000000..4b0ce8fd
--- /dev/null
+++ b/nokiav2/docs/sampleVnfs/simpleDual/vfc.ns.instantiation.request.json
@@ -0,0 +1,41 @@
+{
+ "nsInstanceId": "b65572a1-4f2e-4787-950d-bb489e970623",
+ "additionalParamForNs": {
+ "location": "Nokia_RegionOne",
+ "vnfs": {
+ "f85f054f-0928-4fab-ac76-b47b8fba0d6d": {
+ "computeResourceFlavours": [
+ {
+ "vnfdVirtualComputeDescId": "server_compute",
+ "resourceId": "m1.small"
+ }
+ ],
+ "extVirtualLinks": [
+ {
+ "extCps": [
+ {
+ "cpdId": "commisioning_ecp"
+ }
+ ],
+ "resourceId": "pub_net"
+ }
+ ],
+ "zones": [
+ {
+ "resourceId": "compute-a",
+ "id": "zoneInfoId"
+ }
+ ],
+ "flavourId": "scalable",
+ "vimType": "OPENSTACK_V2_INFO",
+ "instantiationLevel": "default",
+ "softwareImages": [
+ {
+ "resourceId": "ubuntu.16.04",
+ "vnfdSoftwareImageId": "server_image"
+ }
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/nokiav2/docs/sampleVnfs/simpleDual/vfc.vnf.scale.request.json b/nokiav2/docs/sampleVnfs/simpleDual/vfc.vnf.scale.request.json
new file mode 100644
index 00000000..af194c88
--- /dev/null
+++ b/nokiav2/docs/sampleVnfs/simpleDual/vfc.vnf.scale.request.json
@@ -0,0 +1,9 @@
+{
+ "scaleVnfData" : [
+ {
+ "type" : "SCALE_OUT",
+ "aspectId" : "simpleAspect",
+ "numberOfSteps" : "1"
+ }
+ ]
+} \ No newline at end of file
diff --git a/nokiav2/docs/samplevnf.rst b/nokiav2/docs/samplevnf.rst
new file mode 100644
index 00000000..6561575a
--- /dev/null
+++ b/nokiav2/docs/samplevnf.rst
@@ -0,0 +1,19 @@
+Sample VNFs
+===========
+
+Simple
+------
+
+- CSAR: :download:`csar <sampleVnfs/simple/simple.csar>`
+- NS creation request on VF-C API :download:`create.json <sampleVnfs/simple/vfc.ns.create.request.json>` (several fields must be changed to fit actual environment)
+- NS instantiation request on VF-C API :download:`instantiate.json <sampleVnfs/simple/vfc.ns.instantiation.request.json>` (several fields must be changed to fit actual environment)
+
+Simple Dual
+-----------
+
+- CSAR: :download:`csar <sampleVnfs/simpleDual/simpleDual.csar>`
+- NS creation request on VF-C API :download:`create.json <sampleVnfs/simpleDual/vfc.ns.create.request.json>` (several fields must be changed to fit actual environment)
+- NS instantiation request on VF-C API :download:`instantiate.json <sampleVnfs/simpleDual/vfc.ns.instantiation.request.json>` (several fields must be changed to fit actual environment)
+- NS heal request on VF-C API: :download:`heal.json <sampleVnfs/simpleDual/vfc.ns.heal.request.json>` (several fields must be changed to fit actual environment)
+- VNF scale request on VF-C API: :download:`scale.json <sampleVnfs/simpleDual/vfc.vnf.scale.request.json>` (several fields must be changed to fit actual environment)
+
diff --git a/nokiav2/docs/vnfintegration.rst b/nokiav2/docs/vnfintegration.rst
new file mode 100644
index 00000000..62674e53
--- /dev/null
+++ b/nokiav2/docs/vnfintegration.rst
@@ -0,0 +1,51 @@
+Prepare a ONAP VNF package
+==========================
+
+Automatic
+---------
+
+- Visit http://msb.api.simpledemo.onap.org/api/NokiaSVNFM/v1/convert
+- Select the CBAM package to be converted into an ONAP package
+- Click on upload button and the ONAP package will be donwloaded
+
+
+Manual
+------
+
+- the VNF must declare the externalVnfmId and onapCsarId as modifyable attribute in CBAM package (value will be filled out by CBAM)
+- each operation must declare a jobId additional parameter in CBAM package (value will be filled out by CBAM)
+- the heal operation must declare the jobId, vmName and action parameters in CBAM package (values will be filled out by CBAM)
+- each operation (including built-in) must include the following section as the last pre_action (all JS are provided by CBAM)
+
+.. code-block:: console
+
+ - javascript: javascript/cbam.pre.collectConnectionPoints.js
+ include:
+ - javascript/cbam.collectConnectionPoints.js
+ output: operation_result
+
+- each operation must include the following section as the last post_action (all JS are provided by CBAM)
+
+.. code-block:: console
+
+ - javascript: javascript/cbam.post.collectConnectionPoints.js
+ include:
+ - javascript/cbam.collectConnectionPoints.js
+ output: operation_result
+
+- CBAM supplied JavaScrips
+
+ - :download:`cbam.post.collectConnectionPoints.js <sample/cbam.post.collectConnectionPoints.js>`
+ - :download:`cbam.pre.collectConnectionPoints.js <sample/cbam.pre.collectConnectionPoints.js>`
+ - :download:`cbam.collectConnectionPoints.js <sample/cbam.collectConnectionPoints.js>`
+
+- the ONAP package must be written so that the VDU.Compute, VDU.VirtualStorage, VnfVirtualLinkDesc, VduCpd has exactly the same name as in CBAM package
+- the metadata section of the ONAP package must be the following
+
+ - the vendor must be the same as in Nokia package vendor field
+ - the vnfdVersion must be the same as in Nokia package the descriptor_version field
+ - the name must be the same as in Nokia package the product_info_name field
+ - the version must be the same as in Nokia package the software_version field
+ - the vnfmType must be NokiaSVNFM
+
+- the complete CBAM package must be placed in the in Artifacts/OTHER/cbam.package.zip file