update parser document 43/7943/1 brahmaputra.1.0
authorMatthewLi <matthew.lijun@huawei.com>
Mon, 25 Jan 2016 07:44:55 +0000 (02:44 -0500)
committerZhipeng (Howard) Huang <huangzhipeng@huawei.com>
Tue, 26 Jan 2016 02:41:46 +0000 (02:41 +0000)
JIRA: PARSER-14

document format has been updated, this patch is to improve the document
in parser project to satisfy the requirement of sphinx.

Change-Id: I629fa84a1b0333e9b59c24cdf7444733f7b35582
Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
(cherry picked from commit f763149f87564d6dc4e0a605dbe5df720ffe4f9a)

18 files changed:
docs/etc/conf.py [deleted file]
docs/etc/opnfv-logo.png [deleted file]
docs/how-to-use-docs/documentation-example.rst [deleted file]
docs/how-to-use-docs/index.rst [deleted file]
docs/intro/index.rst [deleted file]
docs/parser_docs/index.rst [new file with mode: 0644]
docs/parser_docs/intro/intro.rst [moved from docs/intro/intro.rst with 75% similarity]
docs/parser_docs/tosca2heat/examples/Simple_RNC.yaml [moved from docs/tosca2heat/examples/Simple_RNC.yaml with 100% similarity]
docs/parser_docs/tosca2heat/examples/Simple_RNC_definition.yaml [moved from docs/tosca2heat/examples/Simple_RNC_definition.yaml with 100% similarity]
docs/parser_docs/tosca2heat/examples/TOSCA_nfv_definition_1_0.yaml [moved from docs/tosca2heat/examples/TOSCA_nfv_definition_1_0.yaml with 100% similarity]
docs/parser_docs/tosca2heat/image/vRNC_Definition.bmp [moved from docs/tosca2heat/image/vRNC_Definition.bmp with 100% similarity]
docs/parser_docs/tosca2heat/image/vRNC_Topology.bmp [moved from docs/tosca2heat/image/vRNC_Topology.bmp with 100% similarity]
docs/parser_docs/tosca2heat/parser_new_keywords.rst [moved from docs/tosca2heat/parser_new_keywords.rst with 99% similarity]
docs/parser_docs/tosca2heat/vRNC_tosca_intro.rst [moved from docs/tosca2heat/vRNC_tosca_intro.rst with 99% similarity]
docs/parser_docs/yang2tosca/clearwater_tosca.yaml [new file with mode: 0644]
docs/parser_docs/yang2tosca/yang2tosca.rst [moved from docs/yang2tosca/README.rst with 95% similarity]
docs/tosca2heat/index.rst [deleted file]
docs/yang2tosca/index.rst [deleted file]

diff --git a/docs/etc/conf.py b/docs/etc/conf.py
deleted file mode 100644 (file)
index 0066035..0000000
+++ /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
deleted file mode 100644 (file)
index 1519503..0000000
Binary files a/docs/etc/opnfv-logo.png and /dev/null differ
diff --git a/docs/how-to-use-docs/documentation-example.rst b/docs/how-to-use-docs/documentation-example.rst
deleted file mode 100644 (file)
index e4068b1..0000000
+++ /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 (file)
index 36710b3..0000000
+++ /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 (file)
index b60e9a5..0000000
+++ /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/index.rst b/docs/parser_docs/index.rst
new file mode 100644 (file)
index 0000000..b08f31c
--- /dev/null
@@ -0,0 +1,14 @@
+********************
+Parser Project
+********************
+
+Contents:
+
+.. toctree::
+   :numbered:
+   :maxdepth: 6
+
+   intro/intro.rst
+   yang2tosca/yang2tosca.rst
+   tosca2heat/parser_new_keywords.rst
+   tosca2heat/vRNC_tosca_intro.rst
similarity index 75%
rename from docs/intro/intro.rst
rename to docs/parser_docs/intro/intro.rst
index 3272c65..193315b 100644 (file)
@@ -1,7 +1,7 @@
 ..
  This work is licensed under a Creative Commons Attribution 3.0 Unported
  License.
-
+..
  http://creativecommons.org/licenses/by/3.0/legalcode
 
 ============================
@@ -23,10 +23,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.
+
+* 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.
@@ -1,7 +1,7 @@
 ..
  This work is licensed under a Creative Commons Attribution 3.0 Unported
  License.
-
+..
  http://creativecommons.org/licenses/by/3.0/legalcode
 
 ===================
similarity index 99%
rename from docs/tosca2heat/vRNC_tosca_intro.rst
rename to docs/parser_docs/tosca2heat/vRNC_tosca_intro.rst
index 30f0f8c..7da100d 100644 (file)
@@ -1,7 +1,7 @@
 ..
  This work is licensed under a Creative Commons Attribution 3.0 Unported
  License.
-
+..
  http://creativecommons.org/licenses/by/3.0/legalcode
 
 ================
diff --git a/docs/parser_docs/yang2tosca/clearwater_tosca.yaml b/docs/parser_docs/yang2tosca/clearwater_tosca.yaml
new file mode 100644 (file)
index 0000000..2b4dd52
--- /dev/null
@@ -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
similarity index 95%
rename from docs/yang2tosca/README.rst
rename to docs/parser_docs/yang2tosca/yang2tosca.rst
index 0a3b419..7235fc3 100644 (file)
@@ -1,66 +1,66 @@
-=========================\r
-Parser YANG2TOSCA\r
-========================\r
-\r
-Overview\r
-===========================\r
-\r
-Parser is an open source project and licensed under Apache 2. Parser will help\r
-to provide a tooling mechanism, by parsing Telecom operators’ VNF descriptors\r
-(YANG templates) into TOSCA templates and then further translate TOSCA\r
-templates into certain common templates, which could be used in IaaS orchestration\r
-projects like OpenStack Heat.\r
-\r
-Prerequisites\r
-==========================\r
-\r
-Parser requires the following to be installed.\r
-\r
-1. PYANG\r
------------------\r
-\r
-Please follow the below installation steps.\r
-\r
-Step 1: Clone pyang tool or download the zip file from the following link.\r
-                git clone https://github.com/mbj4668/pyang.git\r
-                                or\r
-                wget https://github.com/mbj4668/pyang/archive/master.zip\r
-\r
-Step 2: Change directory to the downloaded directory and run the setup file.\r
-                cd pyang\r
-                python setup.py\r
-\r
-2. python-lxml\r
---------------------\r
-\r
-Please follow the below installation link.\r
-        http://lxml.de/installation.html\r
-\r
-\r
-Installation\r
-============================\r
-\r
-Please follow the below installation steps to install parser.\r
-\r
-Step 1: Clone the parser project.\r
-        git clone https://gerrit.opnfv.org/gerrit/parser\r
-\r
-Execution\r
-===========================\r
-\r
-Step 1: Change directory to where the scripts are present.\r
-        cd parser/yang2tosca\r
-\r
-Step 2: Copy the YANG file which needs to be converted into TOSCA to\r
-        current (parser/yang2tosca) folder.\r
-\r
-Step 3: Run the python script "parser.py" with the YANG file as an input option.\r
-                python parser.py -n "YANG filename"\r
-        Example:\r
-                python parser.py -n example.yaml\r
-\r
-Step 4: Verify the TOSCA YAMl which file has been created with the same name\r
-        as the YANG file with a “_tosca” suffix.\r
-                cat "YANG filename_tosca.yaml"\r
-        Example:\r
-                cat example_tosca.yaml\r
+========================
+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.
+                git clone https://github.com/mbj4668/pyang.git
+                                or
+                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
+
+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.
+        git clone https://gerrit.opnfv.org/gerrit/parser
+
+Execution
+===========================
+
+Step 1: Change directory to where the scripts are present.
+        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
+
+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
diff --git a/docs/tosca2heat/index.rst b/docs/tosca2heat/index.rst
deleted file mode 100644 (file)
index c7ae649..0000000
+++ /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/yang2tosca/index.rst b/docs/yang2tosca/index.rst
deleted file mode 100644 (file)
index 47c1b03..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-****************\r
-YANG to TOSCA Documents\r
-****************\r
-\r
-This is the directory to store documents regarding YANG to TOSCA translation.\r
-\r
-The "README" document demonstrates parsing Telecom operators’ VNF descriptors (YANG templates)\r
-into TOSCA templates and then further translate TOSCA templates into certain common templates,\r
-which could be used in IaaS orchestration projects like OpenStack Heat.\r
-\r
-See also https://wiki.opnfv.org/parser .\r
-\r
-.. toctree::\r
-   :maxdepth: 2\r
-\r
-   README.rst\r