summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthewLi <matthew.lijun@huawei.com>2016-01-25 02:44:55 -0500
committerZhipeng (Howard) Huang <huangzhipeng@huawei.com>2016-01-26 02:41:46 +0000
commitd576c5d1783593dc3943ca1a1278c8f6c911736c (patch)
tree5ee363920a6c1135cb4543a3adc76c9a6703c7dc
parent759f6bcb79adcf60917bf90ca67148e536b24ab3 (diff)
update parser documentbrahmaputra.1.0
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)
-rw-r--r--docs/etc/conf.py34
-rw-r--r--docs/etc/opnfv-logo.pngbin2829 -> 0 bytes
-rw-r--r--docs/how-to-use-docs/documentation-example.rst87
-rw-r--r--docs/how-to-use-docs/index.rst30
-rw-r--r--docs/intro/index.rst13
-rw-r--r--docs/parser_docs/index.rst14
-rw-r--r--docs/parser_docs/intro/intro.rst (renamed from docs/intro/intro.rst)15
-rw-r--r--docs/parser_docs/tosca2heat/examples/Simple_RNC.yaml (renamed from docs/tosca2heat/examples/Simple_RNC.yaml)0
-rw-r--r--docs/parser_docs/tosca2heat/examples/Simple_RNC_definition.yaml (renamed from docs/tosca2heat/examples/Simple_RNC_definition.yaml)0
-rw-r--r--docs/parser_docs/tosca2heat/examples/TOSCA_nfv_definition_1_0.yaml (renamed from docs/tosca2heat/examples/TOSCA_nfv_definition_1_0.yaml)0
-rw-r--r--docs/parser_docs/tosca2heat/image/vRNC_Definition.bmp (renamed from docs/tosca2heat/image/vRNC_Definition.bmp)bin165158 -> 165158 bytes
-rw-r--r--docs/parser_docs/tosca2heat/image/vRNC_Topology.bmp (renamed from docs/tosca2heat/image/vRNC_Topology.bmp)bin483126 -> 483126 bytes
-rw-r--r--docs/parser_docs/tosca2heat/parser_new_keywords.rst (renamed from docs/tosca2heat/parser_new_keywords.rst)2
-rw-r--r--docs/parser_docs/tosca2heat/vRNC_tosca_intro.rst (renamed from docs/tosca2heat/vRNC_tosca_intro.rst)2
-rw-r--r--docs/parser_docs/yang2tosca/clearwater_tosca.yaml151
-rw-r--r--docs/parser_docs/yang2tosca/yang2tosca.rst (renamed from docs/yang2tosca/README.rst)132
-rw-r--r--docs/tosca2heat/index.rst24
-rw-r--r--docs/yang2tosca/index.rst16
18 files changed, 246 insertions, 274 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
deleted file mode 100644
index 1519503..0000000
--- a/docs/etc/opnfv-logo.png
+++ /dev/null
Binary files 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
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/index.rst b/docs/parser_docs/index.rst
new file mode 100644
index 0000000..b08f31c
--- /dev/null
+++ b/docs/parser_docs/index.rst
@@ -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
diff --git a/docs/intro/intro.rst b/docs/parser_docs/intro/intro.rst
index 3272c65..193315b 100644
--- a/docs/intro/intro.rst
+++ b/docs/parser_docs/intro/intro.rst
@@ -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.
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/tosca2heat/image/vRNC_Definition.bmp b/docs/parser_docs/tosca2heat/image/vRNC_Definition.bmp
index 775e4d2..775e4d2 100644
--- a/docs/tosca2heat/image/vRNC_Definition.bmp
+++ b/docs/parser_docs/tosca2heat/image/vRNC_Definition.bmp
Binary files differ
diff --git a/docs/tosca2heat/image/vRNC_Topology.bmp b/docs/parser_docs/tosca2heat/image/vRNC_Topology.bmp
index d4eea84..d4eea84 100644
--- a/docs/tosca2heat/image/vRNC_Topology.bmp
+++ b/docs/parser_docs/tosca2heat/image/vRNC_Topology.bmp
Binary files differ
diff --git a/docs/tosca2heat/parser_new_keywords.rst b/docs/parser_docs/tosca2heat/parser_new_keywords.rst
index f91cacd..361c74c 100644
--- a/docs/tosca2heat/parser_new_keywords.rst
+++ b/docs/parser_docs/tosca2heat/parser_new_keywords.rst
@@ -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/tosca2heat/vRNC_tosca_intro.rst b/docs/parser_docs/tosca2heat/vRNC_tosca_intro.rst
index 30f0f8c..7da100d 100644
--- a/docs/tosca2heat/vRNC_tosca_intro.rst
+++ b/docs/parser_docs/tosca2heat/vRNC_tosca_intro.rst
@@ -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
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/yang2tosca/README.rst b/docs/parser_docs/yang2tosca/yang2tosca.rst
index 0a3b419..7235fc3 100644
--- a/docs/yang2tosca/README.rst
+++ b/docs/parser_docs/yang2tosca/yang2tosca.rst
@@ -1,66 +1,66 @@
-=========================
-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
+========================
+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
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/yang2tosca/index.rst b/docs/yang2tosca/index.rst
deleted file mode 100644
index 47c1b03..0000000
--- a/docs/yang2tosca/index.rst
+++ /dev/null
@@ -1,16 +0,0 @@
-****************
-YANG to TOSCA Documents
-****************
-
-This is the directory to store documents regarding YANG to TOSCA translation.
-
-The "README" document demonstrates 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.
-
-See also https://wiki.opnfv.org/parser .
-
-.. toctree::
- :maxdepth: 2
-
- README.rst