diff options
Diffstat (limited to 'docs')
20 files changed, 417 insertions, 330 deletions
diff --git a/docs/etc/conf.py b/docs/etc/conf.py deleted file mode 100644 index 0066035..0000000 --- a/docs/etc/conf.py +++ /dev/null @@ -1,34 +0,0 @@ -import datetime -import sys -import os - -try: - __import__('imp').find_module('sphinx.ext.numfig') - extensions = ['sphinx.ext.numfig'] -except ImportError: - # 'pip install sphinx_numfig' - extensions = ['sphinx_numfig'] - -# numfig: -number_figures = True -figure_caption_prefix = "Fig." - -source_suffix = '.rst' -master_doc = 'index' -pygments_style = 'sphinx' -html_use_index = False - -pdf_documents = [('index', u'OPNFV', u'OPNFV Project', u'OPNFV')] -pdf_fit_mode = "shrink" -pdf_stylesheets = ['sphinx','kerning','a4'] -#latex_domain_indices = False -#latex_use_modindex = False - -latex_elements = { - 'printindex': '', -} - -project = u'OPNFV: Template documentation config' -copyright = u'%s, OPNFV' % datetime.date.today().year -version = u'1.0.0' -release = u'1.0.0' diff --git a/docs/etc/opnfv-logo.png b/docs/etc/opnfv-logo.png Binary files differdeleted file mode 100644 index 1519503..0000000 --- a/docs/etc/opnfv-logo.png +++ /dev/null diff --git a/docs/how-to-use-docs/documentation-example.rst b/docs/how-to-use-docs/documentation-example.rst deleted file mode 100644 index e4068b1..0000000 --- a/docs/how-to-use-docs/documentation-example.rst +++ /dev/null @@ -1,87 +0,0 @@ -.. two dots create a comment. please leave this logo at the top of each of your rst files. -.. image:: ../etc/opnfv-logo.png - :height: 40 - :width: 200 - :alt: OPNFV - :align: left -.. these two pipes are to seperate the logo from the first title -| -| -How to create documentation for your OPNFV project -================================================== - -this is the directory structure of the docs/ directory that can be found in the root of your project directory - -.. code-block:: bash - - ./etc - ./etc/opnfv-logo.png - ./etc/conf.py - ./how-to-use-docs - ./how-to-use-docs/documentation-example.rst - ./how-to-use-docs/index.rst - -To create your own documentation, Create any number of directories -(depending on your need) and place in each of them an index.rst. -This index file must refence your other rst files. - -* Here is an example index.rst - -.. code-block:: bash - - Example Documentation table of contents - ======================================= - - Contents: - - .. toctree:: - :numbered: - :maxdepth: 4 - - documentation-example.rst - - Indices and tables - ================== - - * :ref:`search` - - Revision: _sha1_ - - Build date: |today| - - -The Sphinx Build -================ - -When you push documentation changes to gerrit a jenkins job will create html documentation. - -* Verify Jobs -For verify jobs a link to the documentation will show up as a comment in gerrit for you to see the result. - -* Merge jobs - -Once you are happy with the look of your documentation you can submit the patchset the merge job will -copy the output of each documentation directory to http://artifacts.opnfv.org/$project/docs/$name_of_your_folder/index.html - -Here are some quick examples of how to use rst markup - -This is a headline:: - - here is some code, note that it is indented - -links are easy to add: Here is a link to sphinx, the tool that we are using to generate documetation http://sphinx-doc.org/ - -* Bulleted Items - - **this will be bold** - -.. code-block:: bash - - echo "Heres is a code block with bash syntax highlighting" - - -Leave these at the bottom of each of your documents they are used internally - -Revision: _sha1_ - -Build date: |today| diff --git a/docs/how-to-use-docs/index.rst b/docs/how-to-use-docs/index.rst deleted file mode 100644 index 36710b3..0000000 --- a/docs/how-to-use-docs/index.rst +++ /dev/null @@ -1,30 +0,0 @@ -.. OPNFV Release Engineering documentation, created by - sphinx-quickstart on Tue Jun 9 19:12:31 2015. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -.. image:: ../etc/opnfv-logo.png - :height: 40 - :width: 200 - :alt: OPNFV - :align: left - -Example Documentation table of contents -======================================= - -Contents: - -.. toctree:: - :numbered: - :maxdepth: 4 - - documentation-example.rst - -Indices and tables -================== - -* :ref:`search` - -Revision: _sha1_ - -Build date: |today| diff --git a/docs/intro/index.rst b/docs/intro/index.rst deleted file mode 100644 index b60e9a5..0000000 --- a/docs/intro/index.rst +++ /dev/null @@ -1,13 +0,0 @@ -**************** -Parser Introduction Documents -**************** - -This is the directory to store introduction documents for Parser project. - -See also https://wiki.opnfv.org/parser . - -.. toctree:: - :numbered: - :maxdepth: 4 - - intro.rst diff --git a/docs/parser_docs/images/vRNC_Definition.png b/docs/parser_docs/images/vRNC_Definition.png Binary files differnew file mode 100644 index 0000000..84d25e3 --- /dev/null +++ b/docs/parser_docs/images/vRNC_Definition.png diff --git a/docs/parser_docs/images/vRNC_Topology.png b/docs/parser_docs/images/vRNC_Topology.png Binary files differnew file mode 100644 index 0000000..e4f04f1 --- /dev/null +++ b/docs/parser_docs/images/vRNC_Topology.png diff --git a/docs/parser_docs/index.rst b/docs/parser_docs/index.rst new file mode 100644 index 0000000..791e41c --- /dev/null +++ b/docs/parser_docs/index.rst @@ -0,0 +1,15 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 + +************** +Parser Project +************** + +.. toctree:: + :numbered: + :maxdepth: 6 + + intro/intro.rst + yang2tosca/yang2tosca.rst + tosca2heat/parser_new_keywords.rst + vRNC_tosca_intro.rst diff --git a/docs/intro/intro.rst b/docs/parser_docs/intro/intro.rst index 3272c65..2971224 100644 --- a/docs/intro/intro.rst +++ b/docs/parser_docs/intro/intro.rst @@ -1,12 +1,9 @@ -.. - This work is licensed under a Creative Commons Attribution 3.0 Unported - License. +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 - http://creativecommons.org/licenses/by/3.0/legalcode - -============================ +============================== Introduction of Parser Project -============================ +============================== In NFV, various templates (such as descriptors, records and so on) are utilized to describe the deployment requirements (such as basic VM requirements – vCPU, @@ -23,10 +20,21 @@ translate TOSCA/CAMP templates into certain common templates, which could be used in IaaS orchestration projects like OpenStack Heat. For Release B, Parser offers the following capabilities: + * Integration of Heat-Translator Liberty release code. (both heat in-tree code and standalone package are provided) + * Yang2Tosca module which offers the capability to translate yang based -scriptors to tosca formate templates. Users could further use Heat-translator -module to translate this tosca template to Heat Orchestration template. -Yang2Tosca module could be installed seperately after user installed -OPNFV B release platform. -* Use Case Analysis documents which include RNC use case analysis and Parser keyword proposal. + scriptors to tosca formate templates. Users could further use Heat-translator + module to translate this tosca template to Heat Orchestration template. + Yang2Tosca module could be installed seperately after user installed + OPNFV B release platform. + +* The "parser_new_keywords" document demonstrate a set of keywords concluded by + Parser team that need to be supported in tosca to heat translation. However + it should be noted that these keywords only serve as a roadmap. We will start + from Release C to indicate which specific set of keywords are supported in + Parser. + +* The "vRNC_tosca_intro" document describes Parser's use case analysis on vRNC scenario. + The "example" folder contains examples of tosca-nfv standard and vRNC scenario. + See also https://wiki.opnfv.org/parser . diff --git a/docs/tosca2heat/examples/Simple_RNC.yaml b/docs/parser_docs/tosca2heat/examples/Simple_RNC.yaml index 9f99c57..9f99c57 100644 --- a/docs/tosca2heat/examples/Simple_RNC.yaml +++ b/docs/parser_docs/tosca2heat/examples/Simple_RNC.yaml diff --git a/docs/tosca2heat/examples/Simple_RNC_definition.yaml b/docs/parser_docs/tosca2heat/examples/Simple_RNC_definition.yaml index 921da0d..921da0d 100644 --- a/docs/tosca2heat/examples/Simple_RNC_definition.yaml +++ b/docs/parser_docs/tosca2heat/examples/Simple_RNC_definition.yaml diff --git a/docs/tosca2heat/examples/TOSCA_nfv_definition_1_0.yaml b/docs/parser_docs/tosca2heat/examples/TOSCA_nfv_definition_1_0.yaml index 432cee5..432cee5 100644 --- a/docs/tosca2heat/examples/TOSCA_nfv_definition_1_0.yaml +++ b/docs/parser_docs/tosca2heat/examples/TOSCA_nfv_definition_1_0.yaml diff --git a/docs/parser_docs/tosca2heat/parser_new_keywords.rst b/docs/parser_docs/tosca2heat/parser_new_keywords.rst new file mode 100644 index 0000000..f430b1d --- /dev/null +++ b/docs/parser_docs/tosca2heat/parser_new_keywords.rst @@ -0,0 +1,117 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 + +=================== +New Parser keywords +=================== + +1.NFV-tosca new keywords +------------------------ + +All keywords in nfv tosca are not implemented in code, and will be +implemented by parser. + +1.1 Nodes types +~~~~~~~~~~~~~~~ + +Basic types +^^^^^^^^^^^ + +* tosca.nodes.nfv.VDU +* tosca.nodes.nfv.CP +* tosca.nodes.nfv.VL + +Extend types +^^^^^^^^^^^^ + +* tosca.nodes.nfv.VL.ELine +* tosca.nodes.nfv.VL.ELAN +* tosca.nodes.nfv.VL.ETree +* tosca.nodes.nfv.FP + +1.2 Capability types +~~~~~~~~~~~~~~~~~~~~ + +Basic types +^^^^^^^^^^^ + +* tosca.capabilities.nfv.VirtualBindable +* tosca.capabilities.nfv.VirtualLinkable +* tosca.capabilities.nfv.HA.ActiveActive +* tosca.capabilities.nfv.HA.ActivePassive +* tosca.capabilities.nfv.Metric + +Extend types +^^^^^^^^^^^^ + +* tosca.capabilities.nfv.Forwarder +* tosca.capabilities.nfv.CPU\_extension +* tosca.capabilities.nfv.Memory\_extension +* tosca.capabilities.nfv.Hypervisors +* tosca.capabilities.nfv.PCIe +* tosca.capabilities.nfv.network.Interfaces +* tosca.capabilities.nfv.network.Virtual\_switches +* tosca.capabilities.nfv.Storage + +1.3 Relationship types +~~~~~~~~~~~~~~~~~~~~~~ + +Basic types +^^^^^^^^^^^ + +* tosca.relationships.nfv.VirtualBindsTo +* tosca.relationships.nfv.VirtualLinksTo +* tosca.relationships.nfv.HA +* tosca.relationships.nfv.Monitor + +Extend types +^^^^^^^^^^^^ + +* tosca.relationships.nfv.ForwardsTo + +1.4 Group Types +~~~~~~~~~~~~~~~ + +* tosca.groups.nfv.VNFFG + +2.Simple-tosca new keywords +--------------------------- + +Some keywords are only defined in tosca simple profile,but are not +supported in tosca-paser, and some keywords such as "policy type", are not yet defined +completely so far. + +2.1 topology template keyname +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +* "substitution\_mappings" syntax + + An optional declaration that exports the topology template as an + impletmentation of a node type, which is not supported by tosca-parser. + +2.2 Group types +~~~~~~~~~~~~~~~ + +Basic types +^^^^^^^^^^^ + +* tosca.group.root + +2.3 Policy Types +~~~~~~~~~~~~~~~~ + +Basic types +^^^^^^^^^^^ + +* tosca.policies.Root +* tosca.policies.Placement +* tosca.policies.Scaling + +Extend types +^^^^^^^^^^^^ + +* tosca.policies.Update +* tosca.policies.Performance +* tosca.policy.placement.Antilocate +* tosca.policy.placement.Colocate + diff --git a/docs/tosca2heat/vRNC_tosca_intro.rst b/docs/parser_docs/vRNC_tosca_intro.rst index 30f0f8c..5e33ad3 100644 --- a/docs/tosca2heat/vRNC_tosca_intro.rst +++ b/docs/parser_docs/vRNC_tosca_intro.rst @@ -1,14 +1,17 @@ -.. - This work is licensed under a Creative Commons Attribution 3.0 Unported - License. - - http://creativecommons.org/licenses/by/3.0/legalcode +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 ================ 1. vRNC Topology ================ -The simple vRNC topology is shown below: |vRNC Topology| +The simple vRNC topology is shown below: :numref:`figure_topo` + +.. figure:: images/vRNC_Topology.png + :name: figure_topo + :width: 100% + + vRNC Topology - vRNC includes four networks: EMS\_network, CTRL\_network, Intermedia\_network and extermedia\_network; @@ -30,7 +33,13 @@ The simple vRNC topology is shown below: |vRNC Topology| ================== The files dependency and correspoding specificaiton of vRNC definition -are shown below: |vRNC Definition| +are shown below: :numref:`figure_def` + +.. figure:: images/vRNC_Definition.png + :name: figure_def + :width: 100% + + vRNC Definition - TOSCA\_definition\_1.0.yaml should be the lastest version, which is updated by tosca-parser community, but some keywords (such as @@ -39,6 +48,3 @@ are shown below: |vRNC Definition| - TOSCA\_nfv\_definition\_1.0.yaml is a new file, and not implemented in code, and the correspoding standard of "tosca-nfv-v1.0-wd02-rev02" is not complete now. - -.. |vRNC Topology| image:: image/vRNC_Topology.bmp -.. |vRNC Definition| image:: image/vRNC_Definition.bmp diff --git a/docs/parser_docs/yang2tosca/clearwater_tosca.yaml b/docs/parser_docs/yang2tosca/clearwater_tosca.yaml new file mode 100644 index 0000000..2b4dd52 --- /dev/null +++ b/docs/parser_docs/yang2tosca/clearwater_tosca.yaml @@ -0,0 +1,151 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +description: > + This module defines a VNF Deployment Unit. + +metadata: + template_name: clearwater + template_author: HP + +dsl_definitions: + compute_props_host_ellis: &compute_props_host_ellis + num_cpu: 4 + mem_size: 4096 + compute_props_host_bono: &compute_props_host_bono + num_cpu: 3 + mem_size: 2048 + +node_types: + tosca.nodes.compute.ellis: + derived_from: tosca.nodes.compute + + tosca.nodes.compute.bono: + derived_from: tosca.nodes.compute + +topology_template: + # a description of the topology template + description: > + + + inputs: + storage_size: + type: scalar-unit.size + default: 2048 M + description: The required storage resource + + storage_location: + type: string + description: > + Block storage mount point (filesystem path). + + node_templates: + ellis: + type: tosca.nodes.compute.ellis + capabilities: + host: + properties: *compute_props_host_ellis + scalable: + properties: + min_instances: 1 + default_instances: 1 + requirements: + - local_storage: + node: ellis_BlockStorage + relationship: + type: AttachesTo + properties: + location: { get_input: storage_location } + interfaces: + Standard: + start: + implementation: start.sh + delete: + implementaion: stop.sh + stop: + implementaion: shutdown.sh + + ellis_BlockStorage: + type: tosca.nodes.BlockStorage + properties: + size: { get_input: storage_size } + + bono: + type: tosca.nodes.compute.bono + capabilities: + host: + properties: *compute_props_host_bono + scalable: + properties: + min_instances: 3 + default_instances: 3 + requirements: + - local_storage: + node: bono_BlockStorage + relationship: + type: AttachesTo + properties: + location: { get_input: storage_location } + interfaces: + Standard: + start: + implementation: start.sh + delete: + implementaion: stop.sh + stop: + implementaion: shutdown.sh + + bono_BlockStorage: + type: tosca.nodes.BlockStorage + properties: + size: { get_input: storage_size } + + clearwater_network1: + type: tosca.nodes.network.Network + properties: + ip_version: 4 + + ellis_port1: + type: tosca.nodes.network.Port + requirements: + - binding: + node: ellis + - link: + node: clearwater_network1 + + clearwater_network2: + type: tosca.nodes.network.Network + properties: + ip_version: 4 + + ellis_port2: + type: tosca.nodes.network.Port + requirements: + - binding: + node: ellis + - link: + node: clearwater_network2 + + clearwater_network1: + type: tosca.nodes.network.Network + properties: + ip_version: 4 + + bono_port1: + type: tosca.nodes.network.Port + requirements: + - binding: + node: bono + - link: + node: clearwater_network1 + + clearwater_network2: + type: tosca.nodes.network.Network + properties: + ip_version: 4 + + bono_port2: + type: tosca.nodes.network.Port + requirements: + - binding: + node: bono + - link: + node: clearwater_network2 diff --git a/docs/parser_docs/yang2tosca/yang2tosca.rst b/docs/parser_docs/yang2tosca/yang2tosca.rst new file mode 100644 index 0000000..5aaf463 --- /dev/null +++ b/docs/parser_docs/yang2tosca/yang2tosca.rst @@ -0,0 +1,98 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 + +================= +Parser YANG2TOSCA +================= + +Overview +======== + +Parser is an open source project and licensed under Apache 2. Parser will help +to provide a tooling mechanism, by parsing Telecom operators’ VNF descriptors +(YANG templates) into TOSCA templates and then further translate TOSCA +templates into certain common templates, which could be used in IaaS orchestration +projects like OpenStack Heat. + +Prerequisites +============= + +Parser requires the following to be installed. + +1. PYANG +-------- + +Please follow the below installation steps. + +Step 1: Clone pyang tool or download the zip file from the following link. + +.. code-block:: bash + + git clone https://github.com/mbj4668/pyang.git + +OR + +.. code-block:: bash + + wget https://github.com/mbj4668/pyang/archive/master.zip + +Step 2: Change directory to the downloaded directory and run the setup file. + +.. code-block:: bash + + cd pyang + python setup.py + +2. python-lxml +-------------- + +Please follow the below installation link. http://lxml.de/installation.html + + +Installation +============================ + +Please follow the below installation steps to install parser. + +Step 1: Clone the parser project. + +.. code-block:: bash + + git clone https://gerrit.opnfv.org/gerrit/parser + +Execution +=========================== + +Step 1: Change directory to where the scripts are present. + +.. code-block:: bash + + cd parser/yang2tosca + +Step 2: Copy the YANG file which needs to be converted into TOSCA to + current (parser/yang2tosca) folder. + +Step 3: Run the python script "parser.py" with the YANG file as an input option. + +.. code-block:: bash + + python parser.py -n "YANG filename" + +Example: + +.. code-block:: bash + + python parser.py -n example.yaml + +Step 4: Verify the TOSCA YAMl which file has been created with the same name + as the YANG file with a “_tosca” suffix. + +.. code-block:: bash + + cat "YANG filename_tosca.yaml" + +Example: + +.. code-block:: bash + + cat example_tosca.yaml diff --git a/docs/tosca2heat/image/vRNC_Definition.bmp b/docs/tosca2heat/image/vRNC_Definition.bmp Binary files differdeleted file mode 100644 index 775e4d2..0000000 --- a/docs/tosca2heat/image/vRNC_Definition.bmp +++ /dev/null diff --git a/docs/tosca2heat/image/vRNC_Topology.bmp b/docs/tosca2heat/image/vRNC_Topology.bmp Binary files differdeleted file mode 100644 index d4eea84..0000000 --- a/docs/tosca2heat/image/vRNC_Topology.bmp +++ /dev/null diff --git a/docs/tosca2heat/index.rst b/docs/tosca2heat/index.rst deleted file mode 100644 index c7ae649..0000000 --- a/docs/tosca2heat/index.rst +++ /dev/null @@ -1,24 +0,0 @@ -**************** -TOSCA To Heat Documents -**************** - -This is the directory to store documents regarding tosca to heat translation. - -The "parser_new_keywords" document demonstrate a set of keywords concluded by -Parser team that need to be supported in tosca to heat translation. However -it should be noted that these keywords only serve as a roadmap. We will start -from Release C to indicate which specific set of keywords are supported in -Parser. - -The "vRNC_tosca_intro" document describes Parser's use case analysis on vRNC scenario. - -The "example" folder contains examples of tosca-nfv standard and vRNC scenario. - -See also https://wiki.opnfv.org/parser . - -.. toctree:: - :numbered: - :maxdepth: 4 - - parser_new_keywords.rst - vRNC_tosca_intro.rst diff --git a/docs/tosca2heat/parser_new_keywords.rst b/docs/tosca2heat/parser_new_keywords.rst deleted file mode 100644 index f91cacd..0000000 --- a/docs/tosca2heat/parser_new_keywords.rst +++ /dev/null @@ -1,120 +0,0 @@ -.. - This work is licensed under a Creative Commons Attribution 3.0 Unported - License. - - http://creativecommons.org/licenses/by/3.0/legalcode - -=================== -New Parser keywords -=================== - -1.NFV-tosca new keywords ------------------------- - -All keywords in nfv tosca are not implemented in code, and will be -implemented by parser. - -1.1 Nodes types -~~~~~~~~~~~~~~~ - -Basic types -^^^^^^^^^^^ - -- tosca.nodes.nfv.VDU -- tosca.nodes.nfv.CP -- tosca.nodes.nfv.VL - -Extend types -^^^^^^^^^^^^ - -- tosca.nodes.nfv.VL.ELine -- tosca.nodes.nfv.VL.ELAN -- tosca.nodes.nfv.VL.ETree -- tosca.nodes.nfv.FP - -1.2 Capability types -~~~~~~~~~~~~~~~~~~~~ - -Basic types -^^^^^^^^^^^ - -- tosca.capabilities.nfv.VirtualBindable -- tosca.capabilities.nfv.VirtualLinkable -- tosca.capabilities.nfv.HA.ActiveActive -- tosca.capabilities.nfv.HA.ActivePassive -- tosca.capabilities.nfv.Metric - -Extend types -^^^^^^^^^^^^ - -- tosca.capabilities.nfv.Forwarder -- tosca.capabilities.nfv.CPU\_extension -- tosca.capabilities.nfv.Memory\_extension -- tosca.capabilities.nfv.Hypervisors -- tosca.capabilities.nfv.PCIe -- tosca.capabilities.nfv.network.Interfaces -- tosca.capabilities.nfv.network.Virtual\_switches -- tosca.capabilities.nfv.Storage - -1.3 Relationship types -~~~~~~~~~~~~~~~~~~~~~~ - -Basic types -^^^^^^^^^^^ - -- tosca.relationships.nfv.VirtualBindsTo -- tosca.relationships.nfv.VirtualLinksTo -- tosca.relationships.nfv.HA -- tosca.relationships.nfv.Monitor - -Extend types -^^^^^^^^^^^^ - -- tosca.relationships.nfv.ForwardsTo - -1.4 Group Types -~~~~~~~~~~~~~~~ - -- tosca.groups.nfv.VNFFG - -2.Simple-tosca new keywords ---------------------------- - -Some keywords are only defined in tosca simple profile,but are not -supported in tosca-paser, and some keywords such as "policy type", are not yet defined -completely so far. - -2.1 topology template keyname -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- "substitution\_mappings" syntax - - An optional declaration that exports the topology template as an - impletmentation of a node type, which is not supported by tosca-parser. - -2.2 Group types -~~~~~~~~~~~~~~~ - -Basic types -^^^^^^^^^^^ - -- tosca.group.root - -2.3 Policy Types -~~~~~~~~~~~~~~~~ - -Basic types -^^^^^^^^^^^ - -- tosca.policies.Root -- tosca.policies.Placement -- tosca.policies.Scaling - -Extend types -^^^^^^^^^^^^ - -- tosca.policies.Update -- tosca.policies.Performance -- tosca.policy.placement.Antilocate -- tosca.policy.placement.Colocate - |