1 # Licensed under the Apache License, Version 2.0 (the "License");
2 # you may not use this file except in compliance with the License.
3 # You may obtain a copy of the License at
5 # http://www.apache.org/licenses/LICENSE-2.0
7 # Unless required by applicable law or agreed to in writing, software
8 # distributed under the License is distributed on an "AS IS" BASIS,
9 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
15 ===========================
17 Step 1: Change directory to where the scripts are present.
23 Step 2: Copy the YANG file which needs to be converted into TOSCA to
24 current (parser/yang2tosca) folder.
26 Step 3: Run the python script "parser.py" with the YANG file as an input option.
30 python parser.py -n "YANG filename"
36 python parser.py -n example.yaml
38 Step 4: Verify the TOSCA YAMl which file has been created with the same name
39 as the YANG file with a “_tosca” suffix.
43 cat "YANG filename_tosca.yaml"
49 cat example_tosca.yaml