Merge "JIRA:PARSER-17 Clean up documentation setup" into stable/brahmaputra
[parser.git] / docs / yang2tosca / README.rst
1 =========================\r
2 Parser YANG2TOSCA\r
3 ========================\r
4 \r
5 Overview\r
6 ===========================\r
7 \r
8 Parser is an open source project and licensed under Apache 2. Parser will help\r
9 to provide a tooling mechanism, by parsing Telecom operators’ VNF descriptors\r
10 (YANG templates) into TOSCA templates and then further translate TOSCA\r
11 templates into certain common templates, which could be used in IaaS orchestration\r
12 projects like OpenStack Heat.\r
13 \r
14 Prerequisites\r
15 ==========================\r
16 \r
17 Parser requires the following to be installed.\r
18 \r
19 1. PYANG\r
20 -----------------\r
21 \r
22 Please follow the below installation steps.\r
23 \r
24 Step 1: Clone pyang tool or download the zip file from the following link.\r
25                 git clone https://github.com/mbj4668/pyang.git\r
26                                 or\r
27                 wget https://github.com/mbj4668/pyang/archive/master.zip\r
28 \r
29 Step 2: Change directory to the downloaded directory and run the setup file.\r
30                 cd pyang\r
31                 python setup.py\r
32 \r
33 2. python-lxml\r
34 --------------------\r
35 \r
36 Please follow the below installation link.\r
37         http://lxml.de/installation.html\r
38 \r
39 \r
40 Installation\r
41 ============================\r
42 \r
43 Please follow the below installation steps to install parser.\r
44 \r
45 Step 1: Clone the parser project.\r
46         git clone https://gerrit.opnfv.org/gerrit/parser\r
47 \r
48 Execution\r
49 ===========================\r
50 \r
51 Step 1: Change directory to where the scripts are present.\r
52         cd parser/yang2tosca\r
53 \r
54 Step 2: Copy the YANG file which needs to be converted into TOSCA to\r
55         current (parser/yang2tosca) folder.\r
56 \r
57 Step 3: Run the python script "parser.py" with the YANG file as an input option.\r
58                 python parser.py -n "YANG filename"\r
59         Example:\r
60                 python parser.py -n example.yaml\r
61 \r
62 Step 4: Verify the TOSCA YAMl which file has been created with the same name\r
63         as the YANG file with a “_tosca” suffix.\r
64                 cat "YANG filename_tosca.yaml"\r
65         Example:\r
66                 cat example_tosca.yaml\r