From b1884e6e8c00e9aa48816a80a3c0da465f8c7bab Mon Sep 17 00:00:00 2001 From: Marek SzwaƂkiewicz Date: Fri, 14 Apr 2023 13:52:30 +0200 Subject: Fix documentation tests and structure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove deprecated whitelist_externals from tox.ini and move docs/source to docs/. to satisfy the doc-rules Issue-ID: INT-2221 Change-Id: I3162eccd91685b98972277b1f8f41b923321889a Signed-off-by: Marek SzwaƂkiewicz --- docs/Makefile | 2 +- docs/_static/css/ribbon.css | 63 +++ docs/_static/data_flow.png | Bin 0 -> 4969 bytes docs/_static/data_flow.puml | 14 + docs/_static/favicon.ico | Bin 0 -> 2102 bytes docs/_static/logo_onap_2017.png | Bin 0 -> 12278 bytes docs/conf.py | 17 + docs/description.rst | 17 + docs/index.rst | 24 + docs/make.bat | 2 +- docs/schemas.rst | 23 + .../aai_service_design_and_creation_service.rst | 18 + .../shared/cloud_region_availability_zones.rst | 18 + .../shared/cloud_region_esr_system_infos.rst | 38 ++ .../resources/shared/cloud_region_tenants.rst | 22 + docs/schemas/resources/shared/complex.rst | 74 ++++ ...er_service_subscription_tenant_relationship.rst | 22 + docs/schemas/resources/shared/line_of_business.rst | 14 + docs/schemas/resources/shared/msb_profile.rst | 26 ++ docs/schemas/resources/shared/owning_entity.rst | 14 + docs/schemas/resources/shared/platform.rst | 14 + docs/schemas/resources/shared/project.rst | 14 + .../resources/shared/service_properties.rst | 22 + .../schemas/resources/shared/service_resources.rst | 18 + docs/schemas/resources/shared/vendor.rst | 14 + docs/schemas/resources/shared/vsp.rst | 22 + .../resources/shared/xnf_deployment_artifact.rst | 26 ++ docs/schemas/resources/shared/xnf_property.rst | 22 + docs/schemas/resources/shared/xnf_resources.rst | 18 + docs/schemas/version_1_0.rst | 433 ++++++++++++++++++ docs/schemas/version_1_1.rst | 488 +++++++++++++++++++++ docs/source/_static/css/ribbon.css | 63 --- docs/source/_static/data_flow.png | Bin 4969 -> 0 bytes docs/source/_static/data_flow.puml | 14 - docs/source/_static/favicon.ico | Bin 2102 -> 0 bytes docs/source/_static/logo_onap_2017.png | Bin 12278 -> 0 bytes docs/source/conf.py | 19 - docs/source/conf.yaml | 7 - docs/source/description.rst | 17 - docs/source/index.rst | 24 - docs/source/schemas.rst | 23 - .../aai_service_design_and_creation_service.rst | 18 - .../shared/cloud_region_availability_zones.rst | 18 - .../shared/cloud_region_esr_system_infos.rst | 38 -- .../resources/shared/cloud_region_tenants.rst | 22 - docs/source/schemas/resources/shared/complex.rst | 74 ---- ...er_service_subscription_tenant_relationship.rst | 22 - .../schemas/resources/shared/line_of_business.rst | 14 - .../schemas/resources/shared/msb_profile.rst | 26 -- .../schemas/resources/shared/owning_entity.rst | 14 - docs/source/schemas/resources/shared/platform.rst | 14 - docs/source/schemas/resources/shared/project.rst | 14 - .../resources/shared/service_properties.rst | 22 - .../schemas/resources/shared/service_resources.rst | 18 - docs/source/schemas/resources/shared/vendor.rst | 14 - docs/source/schemas/resources/shared/vsp.rst | 22 - .../resources/shared/xnf_deployment_artifact.rst | 26 -- .../schemas/resources/shared/xnf_property.rst | 22 - .../schemas/resources/shared/xnf_resources.rst | 18 - docs/source/schemas/version_1_0.rst | 433 ------------------ docs/source/schemas/version_1_1.rst | 488 --------------------- docs/source/tags.rst | 33 -- docs/source/usage.rst | 106 ----- docs/tags.rst | 33 ++ docs/tox.ini | 6 +- docs/usage.rst | 106 +++++ tox.ini | 19 +- 67 files changed, 1650 insertions(+), 1656 deletions(-) create mode 100644 docs/_static/css/ribbon.css create mode 100644 docs/_static/data_flow.png create mode 100644 docs/_static/data_flow.puml create mode 100755 docs/_static/favicon.ico create mode 100644 docs/_static/logo_onap_2017.png create mode 100644 docs/conf.py create mode 100644 docs/description.rst create mode 100644 docs/index.rst create mode 100644 docs/schemas.rst create mode 100644 docs/schemas/resources/shared/aai_service_design_and_creation_service.rst create mode 100644 docs/schemas/resources/shared/cloud_region_availability_zones.rst create mode 100644 docs/schemas/resources/shared/cloud_region_esr_system_infos.rst create mode 100644 docs/schemas/resources/shared/cloud_region_tenants.rst create mode 100644 docs/schemas/resources/shared/complex.rst create mode 100644 docs/schemas/resources/shared/customer_service_subscription_tenant_relationship.rst create mode 100644 docs/schemas/resources/shared/line_of_business.rst create mode 100644 docs/schemas/resources/shared/msb_profile.rst create mode 100644 docs/schemas/resources/shared/owning_entity.rst create mode 100644 docs/schemas/resources/shared/platform.rst create mode 100644 docs/schemas/resources/shared/project.rst create mode 100644 docs/schemas/resources/shared/service_properties.rst create mode 100644 docs/schemas/resources/shared/service_resources.rst create mode 100644 docs/schemas/resources/shared/vendor.rst create mode 100644 docs/schemas/resources/shared/vsp.rst create mode 100644 docs/schemas/resources/shared/xnf_deployment_artifact.rst create mode 100644 docs/schemas/resources/shared/xnf_property.rst create mode 100644 docs/schemas/resources/shared/xnf_resources.rst create mode 100644 docs/schemas/version_1_0.rst create mode 100644 docs/schemas/version_1_1.rst delete mode 100644 docs/source/_static/css/ribbon.css delete mode 100644 docs/source/_static/data_flow.png delete mode 100644 docs/source/_static/data_flow.puml delete mode 100755 docs/source/_static/favicon.ico delete mode 100644 docs/source/_static/logo_onap_2017.png delete mode 100644 docs/source/conf.py delete mode 100644 docs/source/conf.yaml delete mode 100644 docs/source/description.rst delete mode 100644 docs/source/index.rst delete mode 100644 docs/source/schemas.rst delete mode 100644 docs/source/schemas/resources/shared/aai_service_design_and_creation_service.rst delete mode 100644 docs/source/schemas/resources/shared/cloud_region_availability_zones.rst delete mode 100644 docs/source/schemas/resources/shared/cloud_region_esr_system_infos.rst delete mode 100644 docs/source/schemas/resources/shared/cloud_region_tenants.rst delete mode 100644 docs/source/schemas/resources/shared/complex.rst delete mode 100644 docs/source/schemas/resources/shared/customer_service_subscription_tenant_relationship.rst delete mode 100644 docs/source/schemas/resources/shared/line_of_business.rst delete mode 100644 docs/source/schemas/resources/shared/msb_profile.rst delete mode 100644 docs/source/schemas/resources/shared/owning_entity.rst delete mode 100644 docs/source/schemas/resources/shared/platform.rst delete mode 100644 docs/source/schemas/resources/shared/project.rst delete mode 100644 docs/source/schemas/resources/shared/service_properties.rst delete mode 100644 docs/source/schemas/resources/shared/service_resources.rst delete mode 100644 docs/source/schemas/resources/shared/vendor.rst delete mode 100644 docs/source/schemas/resources/shared/vsp.rst delete mode 100644 docs/source/schemas/resources/shared/xnf_deployment_artifact.rst delete mode 100644 docs/source/schemas/resources/shared/xnf_property.rst delete mode 100644 docs/source/schemas/resources/shared/xnf_resources.rst delete mode 100644 docs/source/schemas/version_1_0.rst delete mode 100644 docs/source/schemas/version_1_1.rst delete mode 100644 docs/source/tags.rst delete mode 100644 docs/source/usage.rst create mode 100644 docs/tags.rst create mode 100644 docs/usage.rst diff --git a/docs/Makefile b/docs/Makefile index d0c3cbf..ed88099 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -5,7 +5,7 @@ # from the environment for the first two. SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build -SOURCEDIR = source +SOURCEDIR = . BUILDDIR = build # Put it first so that "make" without argument is like "make help". diff --git a/docs/_static/css/ribbon.css b/docs/_static/css/ribbon.css new file mode 100644 index 0000000..5d41632 --- /dev/null +++ b/docs/_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: 800px; +} diff --git a/docs/_static/data_flow.png b/docs/_static/data_flow.png new file mode 100644 index 0000000..ffb41d8 Binary files /dev/null and b/docs/_static/data_flow.png differ diff --git a/docs/_static/data_flow.puml b/docs/_static/data_flow.puml new file mode 100644 index 0000000..30f526d --- /dev/null +++ b/docs/_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/_static/favicon.ico b/docs/_static/favicon.ico new file mode 100755 index 0000000..cb712eb Binary files /dev/null and b/docs/_static/favicon.ico differ diff --git a/docs/_static/logo_onap_2017.png b/docs/_static/logo_onap_2017.png new file mode 100644 index 0000000..5d064f4 Binary files /dev/null and b/docs/_static/logo_onap_2017.png differ diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 0000000..d065e20 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,17 @@ +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/description.rst b/docs/description.rst new file mode 100644 index 0000000..3fa8d1a --- /dev/null +++ b/docs/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 `_ 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/index.rst b/docs/index.rst new file mode 100644 index 0000000..9360ed3 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,24 @@ +.. 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 + tags + usage + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/docs/make.bat b/docs/make.bat index 061f32f..307157b 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -7,7 +7,7 @@ REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) -set SOURCEDIR=source +set SOURCEDIR=. set BUILDDIR=build if "%1" == "" goto help diff --git a/docs/schemas.rst b/docs/schemas.rst new file mode 100644 index 0000000..c399ae1 --- /dev/null +++ b/docs/schemas.rst @@ -0,0 +1,23 @@ +YAML schemas +============ + +Data consumed by Data provider needs to be described in `YAML `_ 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/schemas/resources/shared/aai_service_design_and_creation_service.rst b/docs/schemas/resources/shared/aai_service_design_and_creation_service.rst new file mode 100644 index 0000000..300a549 --- /dev/null +++ b/docs/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/schemas/resources/shared/cloud_region_availability_zones.rst b/docs/schemas/resources/shared/cloud_region_availability_zones.rst new file mode 100644 index 0000000..7297a4b --- /dev/null +++ b/docs/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/schemas/resources/shared/cloud_region_esr_system_infos.rst b/docs/schemas/resources/shared/cloud_region_esr_system_infos.rst new file mode 100644 index 0000000..c57f12f --- /dev/null +++ b/docs/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/schemas/resources/shared/cloud_region_tenants.rst b/docs/schemas/resources/shared/cloud_region_tenants.rst new file mode 100644 index 0000000..59608fa --- /dev/null +++ b/docs/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/schemas/resources/shared/complex.rst b/docs/schemas/resources/shared/complex.rst new file mode 100644 index 0000000..ac00420 --- /dev/null +++ b/docs/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/schemas/resources/shared/customer_service_subscription_tenant_relationship.rst b/docs/schemas/resources/shared/customer_service_subscription_tenant_relationship.rst new file mode 100644 index 0000000..824beb9 --- /dev/null +++ b/docs/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/schemas/resources/shared/line_of_business.rst b/docs/schemas/resources/shared/line_of_business.rst new file mode 100644 index 0000000..cd2c987 --- /dev/null +++ b/docs/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/schemas/resources/shared/msb_profile.rst b/docs/schemas/resources/shared/msb_profile.rst new file mode 100644 index 0000000..e2ccc17 --- /dev/null +++ b/docs/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/schemas/resources/shared/owning_entity.rst b/docs/schemas/resources/shared/owning_entity.rst new file mode 100644 index 0000000..6dc5047 --- /dev/null +++ b/docs/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/schemas/resources/shared/platform.rst b/docs/schemas/resources/shared/platform.rst new file mode 100644 index 0000000..da713df --- /dev/null +++ b/docs/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/schemas/resources/shared/project.rst b/docs/schemas/resources/shared/project.rst new file mode 100644 index 0000000..3c47e91 --- /dev/null +++ b/docs/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/schemas/resources/shared/service_properties.rst b/docs/schemas/resources/shared/service_properties.rst new file mode 100644 index 0000000..74af460 --- /dev/null +++ b/docs/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/schemas/resources/shared/service_resources.rst b/docs/schemas/resources/shared/service_resources.rst new file mode 100644 index 0000000..ba5dd32 --- /dev/null +++ b/docs/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/schemas/resources/shared/vendor.rst b/docs/schemas/resources/shared/vendor.rst new file mode 100644 index 0000000..8c2aede --- /dev/null +++ b/docs/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/schemas/resources/shared/vsp.rst b/docs/schemas/resources/shared/vsp.rst new file mode 100644 index 0000000..55a8479 --- /dev/null +++ b/docs/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/schemas/resources/shared/xnf_deployment_artifact.rst b/docs/schemas/resources/shared/xnf_deployment_artifact.rst new file mode 100644 index 0000000..aa68d0a --- /dev/null +++ b/docs/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/schemas/resources/shared/xnf_property.rst b/docs/schemas/resources/shared/xnf_property.rst new file mode 100644 index 0000000..f8066ed --- /dev/null +++ b/docs/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/schemas/resources/shared/xnf_resources.rst b/docs/schemas/resources/shared/xnf_resources.rst new file mode 100644 index 0000000..71ad609 --- /dev/null +++ b/docs/schemas/resources/shared/xnf_resources.rst @@ -0,0 +1,18 @@ +Resources +^^^^^^^^^ + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - name + - string + - YES + - + * - xnf_type + - string + - YES + - \ No newline at end of file diff --git a/docs/schemas/version_1_0.rst b/docs/schemas/version_1_0.rst new file mode 100644 index 0000000..a7f700a --- /dev/null +++ b/docs/schemas/version_1_0.rst @@ -0,0 +1,433 @@ +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 + - + * - resources + - List of `PNF Resources 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 + +.. _PNF resources 1.0: + +.. include:: /schemas/resources/shared/xnf_resources.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 + - + * - resources + - List of `VNF Resources 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 + +.. _VNF resources 1.0: + +.. include:: /schemas/resources/shared/xnf_resources.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 + - + +Data dictionary +--------------- + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - file-path + - string + - YES + - diff --git a/docs/schemas/version_1_1.rst b/docs/schemas/version_1_1.rst new file mode 100644 index 0000000..ce74c91 --- /dev/null +++ b/docs/schemas/version_1_1.rst @@ -0,0 +1,488 @@ +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 + - + * - inputs + - List of `Service inputs 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 + +.. _Service inputs 1.1: + +Service inputs +^^^^^^^^^^^^^^ + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - name + - string + - YES + - + * - type + - string + - NO + - Required if new input is going to be declared + * - value + - string|boolean|number + - NO + - Required if a default value is going to be set + * - nested-input + - boolean + - NO + - Determines if nested input is going to be created + * - resource-property + - boolean + - NO + - Determines whether use resource's property as an input + * - resource + - boolean + - NO + - Required if nested input is going to be created + +PNF +--- + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - name + - string + - YES + - + * - vendor + - string + - NO + - + * - vsp + - string + - NO + - + * - category + - string + - NO + - + * - subcategory + - string + - NO + - + * - deployment_artifact + - `PNF deployment artifact 1.1`_ + - NO + - + * - properties + - List of `PNF Properties 1.1`_ + - NO + - + * - resources + - List of `PNF Resources 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 + +.. _PNF resources 1.1: + +.. include:: /schemas/resources/shared/xnf_resources.rst + +VNF +--- + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - name + - string + - YES + - + * - vendor + - string + - NO + - + * - vsp + - string + - NO + - + * - category + - string + - NO + - + * - subcategory + - string + - NO + - + * - deployment_artifact + - `VNF deployment artifact 1.1`_ + - NO + - + * - properties + - List of `VNF properties 1.1`_ + - NO + - + * - resources + - List of `VNF Resources 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 + +.. _VNF resources 1.1: + +.. include:: /schemas/resources/shared/xnf_resources.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 + - + +Data dictionary +--------------- + +.. list-table:: + :header-rows: 1 + + * - Property + - Type + - Required + - Comment + * - file-path + - string + - YES + - diff --git a/docs/source/_static/css/ribbon.css b/docs/source/_static/css/ribbon.css deleted file mode 100644 index 6008cb1..0000000 --- a/docs/source/_static/css/ribbon.css +++ /dev/null @@ -1,63 +0,0 @@ -.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 deleted file mode 100644 index ffb41d8..0000000 Binary files a/docs/source/_static/data_flow.png and /dev/null differ diff --git a/docs/source/_static/data_flow.puml b/docs/source/_static/data_flow.puml deleted file mode 100644 index 30f526d..0000000 --- a/docs/source/_static/data_flow.puml +++ /dev/null @@ -1,14 +0,0 @@ -@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 deleted file mode 100755 index cb712eb..0000000 Binary files a/docs/source/_static/favicon.ico and /dev/null differ diff --git a/docs/source/_static/logo_onap_2017.png b/docs/source/_static/logo_onap_2017.png deleted file mode 100644 index 5d064f4..0000000 Binary files a/docs/source/_static/logo_onap_2017.png and /dev/null differ diff --git a/docs/source/conf.py b/docs/source/conf.py deleted file mode 100644 index e782429..0000000 --- a/docs/source/conf.py +++ /dev/null @@ -1,19 +0,0 @@ -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 deleted file mode 100644 index ab59281..0000000 --- a/docs/source/conf.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -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 deleted file mode 100644 index 3fa8d1a..0000000 --- a/docs/source/description.rst +++ /dev/null @@ -1,17 +0,0 @@ -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 `_ 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 deleted file mode 100644 index 9360ed3..0000000 --- a/docs/source/index.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. 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 - tags - usage - - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` diff --git a/docs/source/schemas.rst b/docs/source/schemas.rst deleted file mode 100644 index c399ae1..0000000 --- a/docs/source/schemas.rst +++ /dev/null @@ -1,23 +0,0 @@ -YAML schemas -============ - -Data consumed by Data provider needs to be described in `YAML `_ 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 deleted file mode 100644 index 300a549..0000000 --- a/docs/source/schemas/resources/shared/aai_service_design_and_creation_service.rst +++ /dev/null @@ -1,18 +0,0 @@ -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 deleted file mode 100644 index 7297a4b..0000000 --- a/docs/source/schemas/resources/shared/cloud_region_availability_zones.rst +++ /dev/null @@ -1,18 +0,0 @@ -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 deleted file mode 100644 index c57f12f..0000000 --- a/docs/source/schemas/resources/shared/cloud_region_esr_system_infos.rst +++ /dev/null @@ -1,38 +0,0 @@ -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 deleted file mode 100644 index 59608fa..0000000 --- a/docs/source/schemas/resources/shared/cloud_region_tenants.rst +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index ac00420..0000000 --- a/docs/source/schemas/resources/shared/complex.rst +++ /dev/null @@ -1,74 +0,0 @@ -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 deleted file mode 100644 index 824beb9..0000000 --- a/docs/source/schemas/resources/shared/customer_service_subscription_tenant_relationship.rst +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index cd2c987..0000000 --- a/docs/source/schemas/resources/shared/line_of_business.rst +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index e2ccc17..0000000 --- a/docs/source/schemas/resources/shared/msb_profile.rst +++ /dev/null @@ -1,26 +0,0 @@ -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 deleted file mode 100644 index 6dc5047..0000000 --- a/docs/source/schemas/resources/shared/owning_entity.rst +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index da713df..0000000 --- a/docs/source/schemas/resources/shared/platform.rst +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 3c47e91..0000000 --- a/docs/source/schemas/resources/shared/project.rst +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 74af460..0000000 --- a/docs/source/schemas/resources/shared/service_properties.rst +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index ba5dd32..0000000 --- a/docs/source/schemas/resources/shared/service_resources.rst +++ /dev/null @@ -1,18 +0,0 @@ -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 deleted file mode 100644 index 8c2aede..0000000 --- a/docs/source/schemas/resources/shared/vendor.rst +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 55a8479..0000000 --- a/docs/source/schemas/resources/shared/vsp.rst +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index aa68d0a..0000000 --- a/docs/source/schemas/resources/shared/xnf_deployment_artifact.rst +++ /dev/null @@ -1,26 +0,0 @@ -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 deleted file mode 100644 index f8066ed..0000000 --- a/docs/source/schemas/resources/shared/xnf_property.rst +++ /dev/null @@ -1,22 +0,0 @@ -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/resources/shared/xnf_resources.rst b/docs/source/schemas/resources/shared/xnf_resources.rst deleted file mode 100644 index 71ad609..0000000 --- a/docs/source/schemas/resources/shared/xnf_resources.rst +++ /dev/null @@ -1,18 +0,0 @@ -Resources -^^^^^^^^^ - -.. list-table:: - :header-rows: 1 - - * - Property - - Type - - Required - - Comment - * - name - - string - - YES - - - * - xnf_type - - string - - YES - - \ No newline at end of file diff --git a/docs/source/schemas/version_1_0.rst b/docs/source/schemas/version_1_0.rst deleted file mode 100644 index a7f700a..0000000 --- a/docs/source/schemas/version_1_0.rst +++ /dev/null @@ -1,433 +0,0 @@ -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 - - - * - resources - - List of `PNF Resources 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 - -.. _PNF resources 1.0: - -.. include:: /schemas/resources/shared/xnf_resources.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 - - - * - resources - - List of `VNF Resources 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 - -.. _VNF resources 1.0: - -.. include:: /schemas/resources/shared/xnf_resources.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 - - - -Data dictionary ---------------- - -.. list-table:: - :header-rows: 1 - - * - Property - - Type - - Required - - Comment - * - file-path - - string - - YES - - diff --git a/docs/source/schemas/version_1_1.rst b/docs/source/schemas/version_1_1.rst deleted file mode 100644 index ce74c91..0000000 --- a/docs/source/schemas/version_1_1.rst +++ /dev/null @@ -1,488 +0,0 @@ -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 - - - * - inputs - - List of `Service inputs 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 - -.. _Service inputs 1.1: - -Service inputs -^^^^^^^^^^^^^^ - -.. list-table:: - :header-rows: 1 - - * - Property - - Type - - Required - - Comment - * - name - - string - - YES - - - * - type - - string - - NO - - Required if new input is going to be declared - * - value - - string|boolean|number - - NO - - Required if a default value is going to be set - * - nested-input - - boolean - - NO - - Determines if nested input is going to be created - * - resource-property - - boolean - - NO - - Determines whether use resource's property as an input - * - resource - - boolean - - NO - - Required if nested input is going to be created - -PNF ---- - -.. list-table:: - :header-rows: 1 - - * - Property - - Type - - Required - - Comment - * - name - - string - - YES - - - * - vendor - - string - - NO - - - * - vsp - - string - - NO - - - * - category - - string - - NO - - - * - subcategory - - string - - NO - - - * - deployment_artifact - - `PNF deployment artifact 1.1`_ - - NO - - - * - properties - - List of `PNF Properties 1.1`_ - - NO - - - * - resources - - List of `PNF Resources 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 - -.. _PNF resources 1.1: - -.. include:: /schemas/resources/shared/xnf_resources.rst - -VNF ---- - -.. list-table:: - :header-rows: 1 - - * - Property - - Type - - Required - - Comment - * - name - - string - - YES - - - * - vendor - - string - - NO - - - * - vsp - - string - - NO - - - * - category - - string - - NO - - - * - subcategory - - string - - NO - - - * - deployment_artifact - - `VNF deployment artifact 1.1`_ - - NO - - - * - properties - - List of `VNF properties 1.1`_ - - NO - - - * - resources - - List of `VNF Resources 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 - -.. _VNF resources 1.1: - -.. include:: /schemas/resources/shared/xnf_resources.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 - - - -Data dictionary ---------------- - -.. list-table:: - :header-rows: 1 - - * - Property - - Type - - Required - - Comment - * - file-path - - string - - YES - - diff --git a/docs/source/tags.rst b/docs/source/tags.rst deleted file mode 100644 index b16e83e..0000000 --- a/docs/source/tags.rst +++ /dev/null @@ -1,33 +0,0 @@ -ONAP data provider custom YAML tags -=================================== - -In ONAP data provider we created a few custom YAML tags which could be used (and useful) in entities files. - -!join tag ---------- - -Concatenate multiple strings in YAML value. - -`!join [a, b, c]` result is `abc` - -`!join ['_', [a, b, c]]` result is `a_b_c` - -!uuid4 tag ----------- - -Generates a random UUID4 - -`!uuid4` result is random UUID4 value - -!onap_resource_property ------------------------ - -Gets the property value from the already existing ONAP resources. - -Available resources: - -* SDC service - -`!onap_resource_property service identifier service-model-name` result is a SDC service "service-model-name" model "identifier" property value - -`!onap_resource_property service identifier service-model-name 1.0` result is a SDC service "service-model-name" version 1.0 model "identifier" property value diff --git a/docs/source/usage.rst b/docs/source/usage.rst deleted file mode 100644 index 1d54d51..0000000 --- a/docs/source/usage.rst +++ /dev/null @@ -1,106 +0,0 @@ -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 --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/tags.rst b/docs/tags.rst new file mode 100644 index 0000000..b16e83e --- /dev/null +++ b/docs/tags.rst @@ -0,0 +1,33 @@ +ONAP data provider custom YAML tags +=================================== + +In ONAP data provider we created a few custom YAML tags which could be used (and useful) in entities files. + +!join tag +--------- + +Concatenate multiple strings in YAML value. + +`!join [a, b, c]` result is `abc` + +`!join ['_', [a, b, c]]` result is `a_b_c` + +!uuid4 tag +---------- + +Generates a random UUID4 + +`!uuid4` result is random UUID4 value + +!onap_resource_property +----------------------- + +Gets the property value from the already existing ONAP resources. + +Available resources: + +* SDC service + +`!onap_resource_property service identifier service-model-name` result is a SDC service "service-model-name" model "identifier" property value + +`!onap_resource_property service identifier service-model-name 1.0` result is a SDC service "service-model-name" version 1.0 model "identifier" property value diff --git a/docs/tox.ini b/docs/tox.ini index c86077b..c18c28d 100644 --- a/docs/tox.ini +++ b/docs/tox.ini @@ -10,9 +10,9 @@ deps = -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 + sphinx-build -W -b html -n -d {envtmpdir}/doctrees {toxinidir} {toxinidir}/_build/html echo "Generated docs available in {toxinidir}/_build/html" -whitelist_externals = +allowlist_externals = echo [testenv:docs-linkcheck] @@ -22,5 +22,5 @@ deps = -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 + sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees {toxinidir} {toxinidir}/_build/linkcheck diff --git a/docs/usage.rst b/docs/usage.rst new file mode 100644 index 0000000..1d54d51 --- /dev/null +++ b/docs/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 --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/tox.ini b/tox.ini index b068f01..ef6cea4 100644 --- a/tox.ini +++ b/tox.ini @@ -6,16 +6,19 @@ requires = pip >= 8 [testenv] basepython = python3.8 -whitelist_externals = +allowlist_externals = git bash + /bin/bash + sh + /bin/sh deps = coala-bears nodeenv [testenv:json] commands_pre = - /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.json' > /tmp/.coalist_json" + /bin/sh -c "git --no-pager diff HEAD^ HEAD --name-only '*.json' > /tmp/.coalist_json" commands = # '\ ' at the end of command is needed for a case where above command returns empty list (it adds empty file # parameter to '--files' opt @@ -23,7 +26,7 @@ commands = [testenv:yaml] commands_pre = - /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.yaml' '*.yml' > /tmp/.coalist_yaml" + /bin/sh -c "git --no-pager diff HEAD^ HEAD --name-only '*.yaml' '*.yml' > /tmp/.coalist_yaml" commands = # '\ ' at the end of command is needed for a case where above command returns empty list (it adds empty file # parameter to '--files' opt @@ -31,26 +34,26 @@ commands = [testenv:py] commands_pre = - /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.py' > /tmp/.coalist_py" + /bin/sh -c "git --no-pager diff HEAD^ HEAD --name-only '*.py' > /tmp/.coalist_py" commands = /bin/bash -c "coala --non-interactive --disable-caching --no-autoapply-warn py --files $( /tmp/.coalist_rst" + /bin/sh -c "git --no-pager diff HEAD^ HEAD --name-only '*.rst' > /tmp/.coalist_rst" deps = -r{toxinidir}/docs/requirements-docs.txt -chttps://git.onap.org/doc/plain/etc/upper-constraints.os.txt -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt commands = - /bin/sh -c "sphinx-build -n -b html docs/source docs/build/html $( /tmp/.coalist_md" + /bin/sh -c "git --no-pager diff HEAD^ HEAD --name-only '*.md' > /tmp/.coalist_md" commands = /bin/bash -c "coala --non-interactive --disable-caching --no-autoapply-warn md --files $(