diff options
Diffstat (limited to 'docs')
34 files changed, 1548 insertions, 0 deletions
diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..d0c3cbf --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +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) diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 0000000..061f32f --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.https://www.sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt new file mode 100644 index 0000000..5a3d2f1 --- /dev/null +++ b/docs/requirements-docs.txt @@ -0,0 +1 @@ +lfdocs-conf
\ No newline at end of file diff --git a/docs/source/_static/css/ribbon.css b/docs/source/_static/css/ribbon.css new file mode 100644 index 0000000..6008cb1 --- /dev/null +++ b/docs/source/_static/css/ribbon.css @@ -0,0 +1,63 @@ +.ribbon { + z-index: 1000; + background-color: #a00; + overflow: hidden; + white-space: nowrap; + position: fixed; + top: 25px; + right: -50px; + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -ms-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); + -webkit-box-shadow: 0 0 10px #888; + -moz-box-shadow: 0 0 10px #888; + box-shadow: 0 0 10px #888; + +} + +.ribbon a { + border: 1px solid #faa; + color: #fff; + display: block; + font: bold 81.25% 'Helvetica Neue', Helvetica, Arial, sans-serif; + margin: 1px 0; + padding: 10px 50px; + text-align: center; + text-decoration: none; + text-shadow: 0 0 5px #444; + transition: 0.5s; +} + +.ribbon a:hover { + background: #c11; + color: #fff; +} + + +/* override table width restrictions */ +@media screen and (min-width: 767px) { + + .wy-table-responsive table td, .wy-table-responsive table th { + /* !important prevents the common CSS stylesheets from overriding + this as on RTD they are loaded after this stylesheet */ + white-space: normal !important; + } + + .wy-table-responsive { + overflow: visible !important; + } +} + +@media screen and (max-width: 767px) { + .wy-table-responsive table td { + white-space: nowrap; + } +} + +/* fix width of the screen */ + +.wy-nav-content { + max-width: none; +} diff --git a/docs/source/_static/data_flow.png b/docs/source/_static/data_flow.png Binary files differnew file mode 100644 index 0000000..ffb41d8 --- /dev/null +++ b/docs/source/_static/data_flow.png diff --git a/docs/source/_static/data_flow.puml b/docs/source/_static/data_flow.puml new file mode 100644 index 0000000..30f526d --- /dev/null +++ b/docs/source/_static/data_flow.puml @@ -0,0 +1,14 @@ +@startuml + +left to right direction + +agent "YAML entities file" as yaml_file +agent "Data provider" as data_provider +agent "ONAP PYTHON SDK" as onapsdk +agent "ONAP" as onap + +yaml_file --> data_provider +data_provider --> onapsdk +onapsdk --> onap + +@enduml
\ No newline at end of file diff --git a/docs/source/_static/favicon.ico b/docs/source/_static/favicon.ico Binary files differnew file mode 100755 index 0000000..cb712eb --- /dev/null +++ b/docs/source/_static/favicon.ico diff --git a/docs/source/_static/logo_onap_2017.png b/docs/source/_static/logo_onap_2017.png Binary files differnew file mode 100644 index 0000000..5d064f4 --- /dev/null +++ b/docs/source/_static/logo_onap_2017.png diff --git a/docs/source/conf.py b/docs/source/conf.py new file mode 100644 index 0000000..e782429 --- /dev/null +++ b/docs/source/conf.py @@ -0,0 +1,19 @@ +from docs_conf.conf import * + +branch = 'latest' +master_doc = 'index' + +linkcheck_ignore = [ + 'http://localhost', +] + +exclude_patterns = [ + '.tox' +] + +intersphinx_mapping = {} + +html_last_updated_fmt = '%d-%b-%y %H:%M' + +def setup(app): + app.add_css_file("css/ribbon.css") diff --git a/docs/source/conf.yaml b/docs/source/conf.yaml new file mode 100644 index 0000000..ab59281 --- /dev/null +++ b/docs/source/conf.yaml @@ -0,0 +1,7 @@ +--- +project_cfg: onap +project: onap + +# Change this to ReleaseBranchName to modify the header +default-version: latest +# diff --git a/docs/source/description.rst b/docs/source/description.rst new file mode 100644 index 0000000..3fa8d1a --- /dev/null +++ b/docs/source/description.rst @@ -0,0 +1,17 @@ +Description +=========== + +Data provider is a project to provide a tool to automate common ONAP resource creation. +For many of tasks in ONAP some resources are needed and could be created once, like cloud region, complex or customer in A\&AI. +With that tool it can be automated to create them for every ONAP instance. It can be also used to create requested resource on already running +instance on demand. + +Data provider reads data needed to be created from YAML files. YAML schema is described in the relevant section. + +Project is written in Python is based on the `ONAP Python SDK <https://python-onapsdk.readthedocs.io/en/latest/>`_ library and uses it for all +communication with ONAP components. All ONAP SDK features (like settings custom URLs for ONAP instance) could be used. + +The data flow is described by diagram below: + +.. image:: _static/data_flow.png + :alt: Data flow diagram diff --git a/docs/source/index.rst b/docs/source/index.rst new file mode 100644 index 0000000..5cadde1 --- /dev/null +++ b/docs/source/index.rst @@ -0,0 +1,23 @@ +.. ONAP data provider documentation master file, created by + sphinx-quickstart on Mon Dec 13 13:22:50 2021. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to ONAP data provider's documentation! +============================================== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + description + schemas + usage + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/docs/source/schemas.rst b/docs/source/schemas.rst new file mode 100644 index 0000000..c399ae1 --- /dev/null +++ b/docs/source/schemas.rst @@ -0,0 +1,23 @@ +YAML schemas +============ + +Data consumed by Data provider needs to be described in `YAML <https://yaml.org/>`_ files. We used specific format: + +.. code-block:: yaml + + odpSchemaVersion: # Version + resources: + # List of resources to create + +.. toctree:: + :maxdepth: 3 + :caption: Available schema versions: + + schemas/version_1_0.rst + schemas/version_1_1.rst + +.. note:: + Versioning was not provided with the very beginning version of the data provider. To keep the backward compatibility + we keep the old-time schema files support where you don't need to provide the version and resources section, version 1.0 + of schema would be used then by default. + That format is deprecated and shouldn't be used. diff --git a/docs/source/schemas/resources/shared/aai_service_design_and_creation_service.rst b/docs/source/schemas/resources/shared/aai_service_design_and_creation_service.rst new file mode 100644 index 0000000..300a549 --- /dev/null +++ b/docs/source/schemas/resources/shared/aai_service_design_and_creation_service.rst @@ -0,0 +1,18 @@ +A&AI service design and creation service +---------------------------------------- + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - service-id + - string + - YES + - + * - service-description + - string + - YES + -
\ No newline at end of file diff --git a/docs/source/schemas/resources/shared/cloud_region_availability_zones.rst b/docs/source/schemas/resources/shared/cloud_region_availability_zones.rst new file mode 100644 index 0000000..7297a4b --- /dev/null +++ b/docs/source/schemas/resources/shared/cloud_region_availability_zones.rst @@ -0,0 +1,18 @@ +Availability zone +^^^^^^^^^^^^^^^^^ + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - availability-zone-name + - string + - YES + - + * - hypervisor-type + - string + - YES + -
\ No newline at end of file diff --git a/docs/source/schemas/resources/shared/cloud_region_esr_system_infos.rst b/docs/source/schemas/resources/shared/cloud_region_esr_system_infos.rst new file mode 100644 index 0000000..c57f12f --- /dev/null +++ b/docs/source/schemas/resources/shared/cloud_region_esr_system_infos.rst @@ -0,0 +1,38 @@ +ESR sytem info +^^^^^^^^^^^^^^ + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - esr-system-info-id + - string + - YES + - + * - user-name + - string + - YES + - + * - password + - string + - YES + - + * - system-type + - string + - YES + - + * - service-url + - string + - YES + - + * - cloud-domain + - string + - YES + - + * - default-tenant + - string + - NO + -
\ No newline at end of file diff --git a/docs/source/schemas/resources/shared/cloud_region_tenants.rst b/docs/source/schemas/resources/shared/cloud_region_tenants.rst new file mode 100644 index 0000000..59608fa --- /dev/null +++ b/docs/source/schemas/resources/shared/cloud_region_tenants.rst @@ -0,0 +1,22 @@ +Cloud region's tenant +^^^^^^^^^^^^^^^^^^^^^ + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - tenant-id + - string + - YES + - + * - tenant-name + - string + - YES + - + * - tenant-context + - string + - NO + -
\ No newline at end of file diff --git a/docs/source/schemas/resources/shared/complex.rst b/docs/source/schemas/resources/shared/complex.rst new file mode 100644 index 0000000..ac00420 --- /dev/null +++ b/docs/source/schemas/resources/shared/complex.rst @@ -0,0 +1,74 @@ +Complex +------- + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - physical-location-id + - string + - YES + - + * - complex-name + - string + - NO + - + * - data-center-code + - string + - NO + - + * - identity-url + - string + - NO + - + * - physical-location-type + - string + - NO + - + * - street1 + - string + - NO + - + * - street2 + - string + - NO + - + * - city + - string + - NO + - + * - state + - string + - NO + - + * - postal-code + - string + - NO + - + * - country + - string + - NO + - + * - region + - string + - NO + - + * - latitude + - string + - NO + - + * - longitude + - string + - NO + - + * - elevation + - string + - NO + - + * - lata + - string + - NO + -
\ No newline at end of file diff --git a/docs/source/schemas/resources/shared/customer_service_subscription_tenant_relationship.rst b/docs/source/schemas/resources/shared/customer_service_subscription_tenant_relationship.rst new file mode 100644 index 0000000..824beb9 --- /dev/null +++ b/docs/source/schemas/resources/shared/customer_service_subscription_tenant_relationship.rst @@ -0,0 +1,22 @@ +Service subscription tenant relationship +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - tenant-id + - string + - YES + - + * - cloud-owner + - string + - YES + - + * - cloud-region-id + - string + - YES + - diff --git a/docs/source/schemas/resources/shared/line_of_business.rst b/docs/source/schemas/resources/shared/line_of_business.rst new file mode 100644 index 0000000..cd2c987 --- /dev/null +++ b/docs/source/schemas/resources/shared/line_of_business.rst @@ -0,0 +1,14 @@ +Line of business +---------------- + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - name + - string + - YES + -
\ No newline at end of file diff --git a/docs/source/schemas/resources/shared/msb_profile.rst b/docs/source/schemas/resources/shared/msb_profile.rst new file mode 100644 index 0000000..e2ccc17 --- /dev/null +++ b/docs/source/schemas/resources/shared/msb_profile.rst @@ -0,0 +1,26 @@ +MSB k8s profile +--------------- + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - name + - string + - YES + - + * - namespace + - string + - YES + - + * - k8s-version + - string + - YES + - + * - artifact + - string + - YES + - Path to the profile artifact
\ No newline at end of file diff --git a/docs/source/schemas/resources/shared/owning_entity.rst b/docs/source/schemas/resources/shared/owning_entity.rst new file mode 100644 index 0000000..6dc5047 --- /dev/null +++ b/docs/source/schemas/resources/shared/owning_entity.rst @@ -0,0 +1,14 @@ +Owning entity +------------- + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - name + - string + - YES + -
\ No newline at end of file diff --git a/docs/source/schemas/resources/shared/platform.rst b/docs/source/schemas/resources/shared/platform.rst new file mode 100644 index 0000000..da713df --- /dev/null +++ b/docs/source/schemas/resources/shared/platform.rst @@ -0,0 +1,14 @@ +Platform +-------- + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - name + - string + - YES + -
\ No newline at end of file diff --git a/docs/source/schemas/resources/shared/project.rst b/docs/source/schemas/resources/shared/project.rst new file mode 100644 index 0000000..3c47e91 --- /dev/null +++ b/docs/source/schemas/resources/shared/project.rst @@ -0,0 +1,14 @@ +Project +------- + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - name + - string + - YES + -
\ No newline at end of file diff --git a/docs/source/schemas/resources/shared/service_properties.rst b/docs/source/schemas/resources/shared/service_properties.rst new file mode 100644 index 0000000..74af460 --- /dev/null +++ b/docs/source/schemas/resources/shared/service_properties.rst @@ -0,0 +1,22 @@ +Service properties +^^^^^^^^^^^^^^^^^^ + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - name + - string + - YES + - + * - type + - string + - YES + - + * - value + - string + - YES + -
\ No newline at end of file diff --git a/docs/source/schemas/resources/shared/service_resources.rst b/docs/source/schemas/resources/shared/service_resources.rst new file mode 100644 index 0000000..ba5dd32 --- /dev/null +++ b/docs/source/schemas/resources/shared/service_resources.rst @@ -0,0 +1,18 @@ +Service resources +^^^^^^^^^^^^^^^^^ + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - name + - string + - YES + - Name of existing SDC resource + * - type + - string + - YES + - Type of existing SDC resource (VF, PNF, etc.)
\ No newline at end of file diff --git a/docs/source/schemas/resources/shared/vendor.rst b/docs/source/schemas/resources/shared/vendor.rst new file mode 100644 index 0000000..8c2aede --- /dev/null +++ b/docs/source/schemas/resources/shared/vendor.rst @@ -0,0 +1,14 @@ +Vendor +------ + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - name + - string + - YES + -
\ No newline at end of file diff --git a/docs/source/schemas/resources/shared/vsp.rst b/docs/source/schemas/resources/shared/vsp.rst new file mode 100644 index 0000000..55a8479 --- /dev/null +++ b/docs/source/schemas/resources/shared/vsp.rst @@ -0,0 +1,22 @@ +VSP +--- + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - name + - string + - YES + - + * - vendor + - string + - YES + - Vendor name, make sure it exists + * - package + - string + - YES + - Path to VSP package file
\ No newline at end of file diff --git a/docs/source/schemas/resources/shared/xnf_deployment_artifact.rst b/docs/source/schemas/resources/shared/xnf_deployment_artifact.rst new file mode 100644 index 0000000..aa68d0a --- /dev/null +++ b/docs/source/schemas/resources/shared/xnf_deployment_artifact.rst @@ -0,0 +1,26 @@ +Deployment artifact +^^^^^^^^^^^^^^^^^^^ + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - artifact_type + - string + - YES + - + * - artifact_name + - string + - YES + - + * - artifact_label + - string + - YES + - + * - artifact_file_name + - string + - YES + - Path to artifact file
\ No newline at end of file diff --git a/docs/source/schemas/resources/shared/xnf_property.rst b/docs/source/schemas/resources/shared/xnf_property.rst new file mode 100644 index 0000000..f8066ed --- /dev/null +++ b/docs/source/schemas/resources/shared/xnf_property.rst @@ -0,0 +1,22 @@ +Property +^^^^^^^^ + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - name + - string + - YES + - + * - type + - string + - YES + - + * - value + - string + - NO + -
\ No newline at end of file diff --git a/docs/source/schemas/version_1_0.rst b/docs/source/schemas/version_1_0.rst new file mode 100644 index 0000000..ffc65ca --- /dev/null +++ b/docs/source/schemas/version_1_0.rst @@ -0,0 +1,401 @@ +Schema v1.0 +=========== + +To use v1.0 schema you need to use: + +.. code-block:: yaml + + odpSchemaVersion: 1.0 + resources: + # List of resources to create + +.. |version| replace:: v1.0 + +.. contents:: Table of Contents + :local: + +.. include:: /schemas/resources/shared/aai_service_design_and_creation_service.rst + +Cloud region +------------ + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - cloud-owner + - string + - YES + - + * - cloud-region-id + - string + - YES + - + * - orchestration-disabled + - string + - YES + - + * - in-maint + - string + - YES + - + * - cloud-type + - string + - NO + - + * - kube-config + - string + - NO + - Path to kubernetes config file + * - tenants + - List of `Cloud region's tenants 1.0`_ + - NO + - + * - est-system-infos + - List of `ESR sytem infos 1.0`_ + - NO + - + * - complex + - string + - NO + - physical-location-id of the complex to create relationship with + * - available-zones + - List of `Availability zones 1.0`_ + - NO + - + +.. _Cloud region's tenants 1.0: + +.. include:: /schemas/resources/shared/cloud_region_tenants.rst + +.. _ESR sytem infos 1.0: + +.. include:: /schemas/resources/shared/cloud_region_esr_system_infos.rst + +.. _Availability zones 1.0: + +.. include:: /schemas/resources/shared/complex.rst + +Customer +-------- + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - global-customer-id + - string + - YES + - + * - subscriber-name + - string + - YES + - + * - subscriber-type + - string + - YES + - + * - service-subscriptions + - List of `Service subscriptions 1.0`_ + - NO + - + +.. _Service subscriptions 1.0: + +Service subscription +^^^^^^^^^^^^^^^^^^^^ + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - service-type + - string + - YES + - + * - tenants + - List of `Service subscription tenant relationships 1.0`_ + - NO + - + +.. _Service subscription tenant relationships 1.0: + +.. include:: /schemas/resources/shared/customer_service_subscription_tenant_relationship.rst + +.. include:: /schemas/resources/shared/vendor.rst + +.. include:: /schemas/resources/shared/vsp.rst + +Service +------- + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - name + - string + - YES + - + * - resources + - List of `Service resources 1.0`_ + - NO + - + * - properties + - List of `Service properties 1.0`_ + - NO + - + +.. _Service resources 1.0: + +.. include:: /schemas/resources/shared/service_resources.rst + +.. _Service properties 1.0: + +.. include:: /schemas/resources/shared/service_properties.rst + +PNF +--- + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - name + - string + - YES + - + * - vendor + - string + - NO + - + * - vsp + - string + - NO + - + * - deployment_artifact + - `PNF deployment artifact 1.0`_ + - NO + - + * - properties + - List of `PNF Properties 1.0`_ + - NO + - + +.. _PNF deployment artifact 1.0: + +.. include:: /schemas/resources/shared/xnf_deployment_artifact.rst + +.. _PNF properties 1.0: + +.. include:: /schemas/resources/shared/xnf_property.rst + +VNF +--- + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - name + - string + - YES + - + * - vsp + - string + - NO + - + * - deployment_artifact + - `VNF deployment artifact 1.0`_ + - NO + - + * - properties + - List of `VNF properties 1.0`_ + - NO + - + +.. _VNF deployment artifact 1.0: + +.. include:: /schemas/resources/shared/xnf_deployment_artifact.rst + +.. _VNF properties 1.0: + +.. include:: /schemas/resources/shared/xnf_property.rst + +.. include:: /schemas/resources/shared/owning_entity.rst + +.. include:: /schemas/resources/shared/project.rst + +.. include:: /schemas/resources/shared/platform.rst + +.. include:: /schemas/resources/shared/line_of_business.rst + +MSB k8s definition +------------------ + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - name + - string + - YES + - + * - version + - string + - YES + - + * - chart-name + - string + - NO + - + * - description + - string + - NO + - + * - artifact + - string + - YES + - Path to the artifact file + * - profiles + - List of `Profiles 1.0`_ + - NO + - + +.. _Profiles 1.0: + +.. include:: /schemas/resources/shared/msb_profile.rst + +Service instance +---------------- + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - service_instance_name + - string + - YES + - + * - service_name + - string + - YES + - + * - cloud_region + - string + - YES + - + * - customer_id + - string + - YES + - + * - owning_entity + - string + - YES + - + * - project + - string + - YES + - + * - platform + - string + - YES + - + * - line_of_business + - string + - YES + - + * - cloud_region_id + - string + - YES + - + * - cloud_owner + - string + - YES + - + * - timeout + - number + - NO + - + * - aai_service + - string + - NO + - + * - service_subscription_type + - string + - NO + - + * - instantiation_parameters + - List of `Instantiation parameters 1.0`_ + - YES + - + +.. _Instantiation parameters 1.0: + +Instantiation parameters +^^^^^^^^^^^^^^^^^^^^^^^^ + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - vnf_name + - string + - NO + - + * - parameters + - List of key-value parameters + - NO + - + * - vf_modules + - List of `VF modules instantiation parameters 1.0`_ + - NO + - + +.. _VF modules instantiation parameters 1.0: + +VF modules instantiation parameters +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - name + - string + - NO + - Name of the vf module + * - parameters + - List of key-value parameters + - NO + - diff --git a/docs/source/schemas/version_1_1.rst b/docs/source/schemas/version_1_1.rst new file mode 100644 index 0000000..ee0db96 --- /dev/null +++ b/docs/source/schemas/version_1_1.rst @@ -0,0 +1,395 @@ +Schema v1.1 +=========== + +To use v1.1 schema you need to use: + +.. code-block:: yaml + + odpSchemaVersion: 1.1 + resources: + # List of resources to create + +.. |version| replace:: v1.1 + +.. contents:: Table of Contents + :local: + +.. include:: /schemas/resources/shared/aai_service_design_and_creation_service.rst + +Cloud region +------------ + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - cloud-owner + - string + - YES + - + * - cloud-region-id + - string + - YES + - + * - orchestration-disabled + - string + - YES + - + * - in-maint + - string + - YES + - + * - cloud-type + - string + - NO + - + * - kube-config + - string + - NO + - Path to kubernetes config file + * - tenants + - List of `Cloud region's tenants 1.1`_ + - NO + - + * - est-system-infos + - List of `ESR sytem infos 1.1`_ + - NO + - + * - complex + - string + - NO + - physical-location-id of the complex to create relationship with + * - available-zones + - List of `Availability zones 1.1`_ + - NO + - + +.. _Cloud region's tenants 1.1: + +.. include:: /schemas/resources/shared/cloud_region_tenants.rst + +.. _ESR sytem infos 1.1: + +.. include:: /schemas/resources/shared/cloud_region_esr_system_infos.rst + +.. _Availability zones 1.1: + +.. include:: /schemas/resources/shared/cloud_region_availability_zones.rst + +.. include:: /schemas/resources/shared/complex.rst + +Customer +-------- + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - global-customer-id + - string + - YES + - + * - subscriber-name + - string + - YES + - + * - subscriber-type + - string + - YES + - + * - service-subscriptions + - List of `Service subscriptions 1.1`_ + - NO + - + +.. _Service subscriptions 1.1: + +Service subscription +^^^^^^^^^^^^^^^^^^^^ + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - service-type + - string + - YES + - + * - tenants + - List of `Service subscription tenant relationships 1.1`_ + - NO + - + +.. _Service subscription tenant relationships 1.1: + +.. include:: /schemas/resources/shared/customer_service_subscription_tenant_relationship.rst + +.. include:: /schemas/resources/shared/vendor.rst + +.. include:: /schemas/resources/shared/vsp.rst + +Service +------- + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - name + - string + - YES + - + * - resources + - List of `Service resources 1.1`_ + - NO + - + * - properties + - List of `Service properties 1.1`_ + - NO + - + +.. _Service resources 1.1: + +.. include:: /schemas/resources/shared/service_resources.rst + +.. _Service properties 1.1: + +.. include:: /schemas/resources/shared/service_properties.rst + +PNF +--- + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - name + - string + - YES + - + * - vendor + - string + - NO + - + * - vsp + - string + - NO + - + * - deployment_artifact + - `PNF deployment artifact 1.1`_ + - NO + - + * - properties + - List of `PNF Properties 1.1`_ + - NO + - + +.. _PNF deployment artifact 1.1: + +.. include:: /schemas/resources/shared/xnf_deployment_artifact.rst + +.. _PNF properties 1.1: + +.. include:: /schemas/resources/shared/xnf_property.rst + +VNF +--- + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - name + - string + - YES + - + * - vsp + - string + - NO + - + * - deployment_artifact + - `VNF deployment artifact 1.1`_ + - NO + - + * - properties + - List of `VNF properties 1.1`_ + - NO + - + +.. _VNF deployment artifact 1.1: + +.. include:: /schemas/resources/shared/xnf_deployment_artifact.rst + +.. _VNF properties 1.1: + +.. include:: /schemas/resources/shared/owning_entity.rst + +MSB k8s definition +------------------ + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - name + - string + - YES + - + * - version + - string + - YES + - + * - chart-name + - string + - NO + - + * - description + - string + - NO + - + * - artifact + - string + - YES + - Path to the artifact file + * - profiles + - List of `Profiles 1.1`_ + - NO + - + +.. _Profiles 1.1: + +.. include:: /schemas/resources/shared/msb_profile.rst + +Service instance +---------------- + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - service_instance_name + - string + - YES + - + * - service_name + - string + - YES + - + * - cloud_region + - string + - YES + - + * - customer_id + - string + - YES + - + * - owning_entity + - string + - YES + - + * - project + - string + - YES + - + * - platform + - string + - YES + - + * - line_of_business + - string + - YES + - + * - cloud_region_id + - string + - YES + - + * - cloud_owner + - string + - YES + - + * - timeout + - number + - NO + - + * - aai_service + - string + - YES + - + * - service_subscription_type + - string + - NO + - + * - instantiation_parameters + - List of `Instantiation parameters 1.1`_ + - YES + - + +.. _Instantiation parameters 1.1: + +Instantiation parameters +^^^^^^^^^^^^^^^^^^^^^^^^ + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - vnf_name + - string + - NO + - + * - parameters + - List of key-value parameters + - NO + - + * - vf_modules + - List of `VF modules instantiation parameters 1.1`_ + - NO + - + +.. _VF modules instantiation parameters 1.1: + +VF modules instantiation parameters +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - name + - string + - NO + - Name of the vf module + * - parameters + - List of key-value parameters + - NO + - diff --git a/docs/source/usage.rst b/docs/source/usage.rst new file mode 100644 index 0000000..1d54d51 --- /dev/null +++ b/docs/source/usage.rst @@ -0,0 +1,106 @@ +Usage +===== + +This project is intended to be included in automation chain, e.g. triggered from the pipeline. +You can also run it locally using Python interpreter or Docker image. + +Installation +------------ + +To run `onap-data-provider` Python >= 3.8 version is required. Install it using + +.. code-block:: bash + + python setup.py install + +command. You can call then + +.. code-block:: bash + + onap-data-provider + +command. + +Run locally +^^^^^^^^^^^ + +When installed `onap-data-provider` is ready to work. We need some data to be created. Let's use `samples/vendor.yaml` and create SDC's Vendor resource. Call + +.. code-block:: bash + + onap-data-provider -f samples/vendor.yaml + +and in your ONAP instance Vendor resource should be created. If that resource already exists no new data will be created. Check `samples` directory to get more examples of files which describes resources to create. + +You can use multiple files as an input: + +.. code-block:: bash + + onap-data-provider -f samples/vendor.yaml -f samples/vsp.yaml + +Directories could be used as well: + +.. code-block:: bash + + onap-data-provider -f samples/ + +Configuration +^^^^^^^^^^^^^ + +Configuration is needed if your environment setup is different that usuall so ONAP components +listen on different hosts/ports than default, so are available on other URLs than: + +.. code-block:: python + + AAI_URL = "https://aai.api.sparky.simpledemo.onap.org:30233" + CDS_URL = "http://portal.api.simpledemo.onap.org:30449" + MSB_URL = "https://msb.api.simpledemo.onap.org:30283" + SDC_BE_URL = "https://sdc.api.be.simpledemo.onap.org:30204" + SDC_FE_URL = "https://sdc.api.fe.simpledemo.onap.org:30207" + SDNC_URL = "https://sdnc.api.simpledemo.onap.org:30267" + SO_URL = "http://so.api.simpledemo.onap.org:30277" + VID_URL = "https://vid.api.simpledemo.onap.org:30200" + CLAMP_URL = "https://clamp.api.simpledemo.onap.org:30258" + VES_URL = "http://ves.api.simpledemo.onap.org:30417" + DMAAP_URL = "http://dmaap.api.simpledemo.onap.org:3904" + +If you want to use another URLs you need to override default `onap-data-provider` settings by create Python file with values you want to use. +Example: I want to test `onap-data-provider` data creation on my "test" ONAP instance which is available on "172.17.0.1" IP address, +so I need to create `my_test_onap_instance_settings.py` Python file which looks: + +.. code-block:: python + + AAI_URL = "https://172.17.0.1:30233" + CDS_URL = "http://172.17.0.1:30449" + MSB_URL = "https://172.17.0.1:30283" + SDC_BE_URL = "https://172.17.0.1:30204" + SDC_FE_URL = "https://172.17.0.1:30207" + SDNC_URL = "https://172.17.0.1:30267" + SO_URL = "http://172.17.0.1:30277" + VID_URL = "https://172.17.0.1:30200" + CLAMP_URL = "https://172.17.0.1:30258" + VES_URL = "http://172.17.0.1:30417" + DMAAP_URL = "http://172.17.0.1:3904" + +and then if I call + +.. code-block:: bash + + ONAP_PYTHON_SDK_SETTINGS=my_test_onap_instance_settings onap-data-provider ... + +all data are going to be created on my local instance. + +Set proxy +^^^^^^^^^ + +ONAP data provider can be run with proxy configured. You need to pass urls you want to use for proxy connection as `--proxy` arguments. Call `onap-data-provider -f <infra-file> --proxy http://localhost:8080 https://localhost:8080` to setup proxy for `http` and `https` on `localhost:8080` address. + +Data verification +^^^^^^^^^^^^^^^^^ + +You can verify the data provided is correct, before you would try to actually push it +to the ONAP instance. To do so, use the flag `--validate-only`: + +.. code-block:: bash + + onap-data-provider -f samples/vendor.yml --validate-only diff --git a/docs/tox.ini b/docs/tox.ini new file mode 100644 index 0000000..c86077b --- /dev/null +++ b/docs/tox.ini @@ -0,0 +1,26 @@ +[tox] +minversion = 1.6 +envlist = docs,docs-linkcheck +skipsdist = true + +[testenv:docs] +basepython = python3 +deps = + -r{toxinidir}/requirements-docs.txt + -chttps://git.onap.org/doc/plain/etc/upper-constraints.os.txt?h=master + -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt?h=master +commands = + sphinx-build -W -b html -n -d {envtmpdir}/doctrees ./source {toxinidir}/_build/html + echo "Generated docs available in {toxinidir}/_build/html" +whitelist_externals = + echo + +[testenv:docs-linkcheck] +basepython = python3 +deps = + -r{toxinidir}/requirements-docs.txt + -chttps://git.onap.org/doc/plain/etc/upper-constraints.os.txt?h=master + -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt?h=master +commands = + sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees ./source {toxinidir}/_build/linkcheck + |