From bc48fc2afdb10c98edb05cc980a20f83cb70f863 Mon Sep 17 00:00:00 2001 From: Ryota MIBU Date: Fri, 26 Feb 2016 03:38:12 +0900 Subject: docs: fix issues Change-Id: Ie0917b70674a7a16c89c8e6bc79aed5e436cabdd Signed-off-by: Ryota MIBU (cherry picked from commit 4e4c86a06d58b1816c074c7f9da4c58bbf10368c) --- docs/parser_docs/images/vRNC_Definition.png | Bin 0 -> 3935 bytes docs/parser_docs/images/vRNC_Topology.png | Bin 0 -> 33723 bytes docs/parser_docs/index.rst | 11 +-- docs/parser_docs/intro/intro.rst | 31 ++++---- .../tosca2heat/image/vRNC_Definition.bmp | Bin 165158 -> 0 bytes .../parser_docs/tosca2heat/image/vRNC_Topology.bmp | Bin 483126 -> 0 bytes .../parser_docs/tosca2heat/parser_new_keywords.rst | 81 ++++++++++----------- docs/parser_docs/tosca2heat/vRNC_tosca_intro.rst | 44 ----------- docs/parser_docs/vRNC_tosca_intro.rst | 50 +++++++++++++ docs/parser_docs/yang2tosca/yang2tosca.rst | 74 +++++++++++++------ 10 files changed, 162 insertions(+), 129 deletions(-) create mode 100644 docs/parser_docs/images/vRNC_Definition.png create mode 100644 docs/parser_docs/images/vRNC_Topology.png delete mode 100644 docs/parser_docs/tosca2heat/image/vRNC_Definition.bmp delete mode 100644 docs/parser_docs/tosca2heat/image/vRNC_Topology.bmp delete mode 100644 docs/parser_docs/tosca2heat/vRNC_tosca_intro.rst create mode 100644 docs/parser_docs/vRNC_tosca_intro.rst (limited to 'docs/parser_docs') diff --git a/docs/parser_docs/images/vRNC_Definition.png b/docs/parser_docs/images/vRNC_Definition.png new file mode 100644 index 0000000..84d25e3 Binary files /dev/null and b/docs/parser_docs/images/vRNC_Definition.png differ diff --git a/docs/parser_docs/images/vRNC_Topology.png b/docs/parser_docs/images/vRNC_Topology.png new file mode 100644 index 0000000..e4f04f1 Binary files /dev/null and b/docs/parser_docs/images/vRNC_Topology.png differ diff --git a/docs/parser_docs/index.rst b/docs/parser_docs/index.rst index b08f31c..791e41c 100644 --- a/docs/parser_docs/index.rst +++ b/docs/parser_docs/index.rst @@ -1,8 +1,9 @@ -******************** -Parser Project -******************** +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 -Contents: +************** +Parser Project +************** .. toctree:: :numbered: @@ -11,4 +12,4 @@ Contents: intro/intro.rst yang2tosca/yang2tosca.rst tosca2heat/parser_new_keywords.rst - tosca2heat/vRNC_tosca_intro.rst + vRNC_tosca_intro.rst diff --git a/docs/parser_docs/intro/intro.rst b/docs/parser_docs/intro/intro.rst index 193315b..2971224 100644 --- a/docs/parser_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. -.. - 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 -============================ +============================== 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, @@ -27,17 +24,17 @@ 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. + 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. + 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. + The "example" folder contains examples of tosca-nfv standard and vRNC scenario. + See also https://wiki.opnfv.org/parser . diff --git a/docs/parser_docs/tosca2heat/image/vRNC_Definition.bmp b/docs/parser_docs/tosca2heat/image/vRNC_Definition.bmp deleted file mode 100644 index 775e4d2..0000000 Binary files a/docs/parser_docs/tosca2heat/image/vRNC_Definition.bmp and /dev/null differ diff --git a/docs/parser_docs/tosca2heat/image/vRNC_Topology.bmp b/docs/parser_docs/tosca2heat/image/vRNC_Topology.bmp deleted file mode 100644 index d4eea84..0000000 Binary files a/docs/parser_docs/tosca2heat/image/vRNC_Topology.bmp and /dev/null differ diff --git a/docs/parser_docs/tosca2heat/parser_new_keywords.rst b/docs/parser_docs/tosca2heat/parser_new_keywords.rst index 361c74c..f430b1d 100644 --- a/docs/parser_docs/tosca2heat/parser_new_keywords.rst +++ b/docs/parser_docs/tosca2heat/parser_new_keywords.rst @@ -1,8 +1,5 @@ -.. - 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 =================== New Parser keywords @@ -20,17 +17,17 @@ implemented by parser. Basic types ^^^^^^^^^^^ -- tosca.nodes.nfv.VDU -- tosca.nodes.nfv.CP -- tosca.nodes.nfv.VL +* 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 +* tosca.nodes.nfv.VL.ELine +* tosca.nodes.nfv.VL.ELAN +* tosca.nodes.nfv.VL.ETree +* tosca.nodes.nfv.FP 1.2 Capability types ~~~~~~~~~~~~~~~~~~~~ @@ -38,23 +35,23 @@ Extend 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 +* 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 +* 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 ~~~~~~~~~~~~~~~~~~~~~~ @@ -62,20 +59,20 @@ Extend types Basic types ^^^^^^^^^^^ -- tosca.relationships.nfv.VirtualBindsTo -- tosca.relationships.nfv.VirtualLinksTo -- tosca.relationships.nfv.HA -- tosca.relationships.nfv.Monitor +* tosca.relationships.nfv.VirtualBindsTo +* tosca.relationships.nfv.VirtualLinksTo +* tosca.relationships.nfv.HA +* tosca.relationships.nfv.Monitor Extend types ^^^^^^^^^^^^ -- tosca.relationships.nfv.ForwardsTo +* tosca.relationships.nfv.ForwardsTo 1.4 Group Types ~~~~~~~~~~~~~~~ -- tosca.groups.nfv.VNFFG +* tosca.groups.nfv.VNFFG 2.Simple-tosca new keywords --------------------------- @@ -87,10 +84,10 @@ completely so far. 2.1 topology template keyname ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- "substitution\_mappings" syntax +* "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. + 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 ~~~~~~~~~~~~~~~ @@ -98,7 +95,7 @@ completely so far. Basic types ^^^^^^^^^^^ -- tosca.group.root +* tosca.group.root 2.3 Policy Types ~~~~~~~~~~~~~~~~ @@ -106,15 +103,15 @@ Basic types Basic types ^^^^^^^^^^^ -- tosca.policies.Root -- tosca.policies.Placement -- tosca.policies.Scaling +* 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 +* tosca.policies.Update +* tosca.policies.Performance +* tosca.policy.placement.Antilocate +* tosca.policy.placement.Colocate diff --git a/docs/parser_docs/tosca2heat/vRNC_tosca_intro.rst b/docs/parser_docs/tosca2heat/vRNC_tosca_intro.rst deleted file mode 100644 index 7da100d..0000000 --- a/docs/parser_docs/tosca2heat/vRNC_tosca_intro.rst +++ /dev/null @@ -1,44 +0,0 @@ -.. - This work is licensed under a Creative Commons Attribution 3.0 Unported - License. -.. - http://creativecommons.org/licenses/by/3.0/legalcode - -================ -1. vRNC Topology -================ - -The simple vRNC topology is shown below: |vRNC Topology| - -- vRNC includes four networks: EMS\_network, CTRL\_network, - Intermedia\_network and extermedia\_network; -- vRNC includes four node types: MM, LB, CM and DM; -- MM: Stands for Maintain Module, which links to EMS\_network, - CTRL\_network and extermedia\_network. It composes of active vdu and - standby vdu. -- CM: Stands for Control Module, which links to CTRL\_network and - intermedia\_network. All CM nodes form resource pool and each node - composes of active vdu and standby vdu. -- DM: Stands for Data Module, which links to CTRL\_network and - intermedia\_network. All DM nodes form resource pool and each node is - a vdu. -- LB: Stands for LineCard Module, which links to CTRL\_network and - intermedia\_network and extermedia\_network. All LB nodes form - resource pool and each node is a vdu. - -2. vRNC Definition -================== - -The files dependency and correspoding specificaiton of vRNC definition -are shown below: |vRNC Definition| - -- TOSCA\_definition\_1.0.yaml should be the lastest version, which is - updated by tosca-parser community, but some keywords (such as - substitution\_mappings) in the correspoding standard of - "TOSCA-simple-profile-YAML-v1.0" is not supported. -- 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/vRNC_tosca_intro.rst b/docs/parser_docs/vRNC_tosca_intro.rst new file mode 100644 index 0000000..5e33ad3 --- /dev/null +++ b/docs/parser_docs/vRNC_tosca_intro.rst @@ -0,0 +1,50 @@ +.. 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: :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; +- vRNC includes four node types: MM, LB, CM and DM; +- MM: Stands for Maintain Module, which links to EMS\_network, + CTRL\_network and extermedia\_network. It composes of active vdu and + standby vdu. +- CM: Stands for Control Module, which links to CTRL\_network and + intermedia\_network. All CM nodes form resource pool and each node + composes of active vdu and standby vdu. +- DM: Stands for Data Module, which links to CTRL\_network and + intermedia\_network. All DM nodes form resource pool and each node is + a vdu. +- LB: Stands for LineCard Module, which links to CTRL\_network and + intermedia\_network and extermedia\_network. All LB nodes form + resource pool and each node is a vdu. + +2. vRNC Definition +================== + +The files dependency and correspoding specificaiton of 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 + substitution\_mappings) in the correspoding standard of + "TOSCA-simple-profile-YAML-v1.0" is not supported. +- 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. diff --git a/docs/parser_docs/yang2tosca/yang2tosca.rst b/docs/parser_docs/yang2tosca/yang2tosca.rst index 7235fc3..5aaf463 100644 --- a/docs/parser_docs/yang2tosca/yang2tosca.rst +++ b/docs/parser_docs/yang2tosca/yang2tosca.rst @@ -1,9 +1,12 @@ -======================== +.. 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 @@ -12,29 +15,38 @@ templates into certain common templates, which could be used in IaaS orchestrati 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. - git clone https://github.com/mbj4668/pyang.git - or - wget https://github.com/mbj4668/pyang/archive/master.zip + +.. 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. - cd pyang - python setup.py + +.. code-block:: bash + + cd pyang + python setup.py 2. python-lxml --------------------- +-------------- -Please follow the below installation link. - http://lxml.de/installation.html +Please follow the below installation link. http://lxml.de/installation.html Installation @@ -43,24 +55,44 @@ Installation Please follow the below installation steps to install parser. Step 1: Clone the parser project. - git clone https://gerrit.opnfv.org/gerrit/parser + +.. code-block:: bash + + git clone https://gerrit.opnfv.org/gerrit/parser Execution =========================== Step 1: Change directory to where the scripts are present. - cd parser/yang2tosca + +.. 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. - python parser.py -n "YANG filename" - Example: - python parser.py -n example.yaml + +.. 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. - cat "YANG filename_tosca.yaml" - Example: - cat example_tosca.yaml + +.. code-block:: bash + + cat "YANG filename_tosca.yaml" + +Example: + +.. code-block:: bash + + cat example_tosca.yaml -- cgit 1.2.3-korg