+++ /dev/null
-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'
+++ /dev/null
-.. 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|
+++ /dev/null
-.. 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|
+++ /dev/null
-****************
-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
--- /dev/null
+********************
+Parser Project
+********************
+
+Contents:
+
+.. toctree::
+ :numbered:
+ :maxdepth: 6
+
+ intro/intro.rst
+ yang2tosca/yang2tosca.rst
+ tosca2heat/parser_new_keywords.rst
+ tosca2heat/vRNC_tosca_intro.rst
..
This work is licensed under a Creative Commons Attribution 3.0 Unported
License.
-
+..
http://creativecommons.org/licenses/by/3.0/legalcode
============================
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.
..
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 3.0 Unported
License.
-
+..
http://creativecommons.org/licenses/by/3.0/legalcode
================
--- /dev/null
+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
-=========================\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
+++ /dev/null
-****************
-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
+++ /dev/null
-****************\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