From d576c5d1783593dc3943ca1a1278c8f6c911736c Mon Sep 17 00:00:00 2001 From: MatthewLi Date: Mon, 25 Jan 2016 02:44:55 -0500 Subject: [PATCH] update parser document 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 (cherry picked from commit f763149f87564d6dc4e0a605dbe5df720ffe4f9a) --- docs/etc/conf.py | 34 ----- docs/etc/opnfv-logo.png | Bin 2829 -> 0 bytes docs/how-to-use-docs/documentation-example.rst | 87 ------------ docs/how-to-use-docs/index.rst | 30 ---- docs/intro/index.rst | 13 -- docs/parser_docs/index.rst | 14 ++ docs/{ => parser_docs}/intro/intro.rst | 15 +- .../tosca2heat/examples/Simple_RNC.yaml | 0 .../tosca2heat/examples/Simple_RNC_definition.yaml | 0 .../examples/TOSCA_nfv_definition_1_0.yaml | 0 .../tosca2heat/image/vRNC_Definition.bmp | Bin .../tosca2heat/image/vRNC_Topology.bmp | Bin .../tosca2heat/parser_new_keywords.rst | 2 +- .../tosca2heat/vRNC_tosca_intro.rst | 2 +- docs/parser_docs/yang2tosca/clearwater_tosca.yaml | 151 +++++++++++++++++++++ .../yang2tosca/yang2tosca.rst} | 132 +++++++++--------- docs/tosca2heat/index.rst | 24 ---- docs/yang2tosca/index.rst | 16 --- 18 files changed, 246 insertions(+), 274 deletions(-) delete mode 100644 docs/etc/conf.py delete mode 100644 docs/etc/opnfv-logo.png delete mode 100644 docs/how-to-use-docs/documentation-example.rst delete mode 100644 docs/how-to-use-docs/index.rst delete mode 100644 docs/intro/index.rst create mode 100644 docs/parser_docs/index.rst rename docs/{ => parser_docs}/intro/intro.rst (75%) rename docs/{ => parser_docs}/tosca2heat/examples/Simple_RNC.yaml (100%) rename docs/{ => parser_docs}/tosca2heat/examples/Simple_RNC_definition.yaml (100%) rename docs/{ => parser_docs}/tosca2heat/examples/TOSCA_nfv_definition_1_0.yaml (100%) rename docs/{ => parser_docs}/tosca2heat/image/vRNC_Definition.bmp (100%) rename docs/{ => parser_docs}/tosca2heat/image/vRNC_Topology.bmp (100%) rename docs/{ => parser_docs}/tosca2heat/parser_new_keywords.rst (99%) rename docs/{ => parser_docs}/tosca2heat/vRNC_tosca_intro.rst (99%) create mode 100644 docs/parser_docs/yang2tosca/clearwater_tosca.yaml rename docs/{yang2tosca/README.rst => parser_docs/yang2tosca/yang2tosca.rst} (95%) delete mode 100644 docs/tosca2heat/index.rst delete mode 100644 docs/yang2tosca/index.rst 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 1519503eba764f7a00877b9b8bdbbd37fd3707c6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2829 zcmV+o3-a`dP)3)28sjxMC?FF++Bq$U6w!I|Q zuDk75d^``ll?O5~(CmjEDa)%lO*g>n_g{0#>mC}Gzk+T4rzf9>j53xroI0y~C_9nZ zRT`GLg0kl=wSC&o>6~=+jNzR71<#dp4To_2s0>t*!h`9cI?8$fX~Qs`rR1m400P?y z90%)qtm)id4ON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ze6EpDkzx5k3v5joGO*Bjy-? + 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 similarity index 95% rename from docs/yang2tosca/README.rst rename to 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 -- 2.16.6