Add script to generate the augmented Python classes and the jsTree files for VNFD...
[osm/IM.git] / augments / apply_augments.sh
1 #!/bin/bash
2 # Copyright 2020 Whitestack LLC
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 # implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16
17 # Instructions:
18 # 1. Clone the SOL006 repo: git clone --single-branch --branch v2.6.1 https://forge.etsi.org/rep/nfv/SOL006.git
19 # 2. Put the etsi-nfv-* files from SOL006 repo on folder named etsi/
20 # 3. Set $PYBINDPLUGIN env var to pyangbind plugin folder
21 # 4. Run this :)
22
23 #VNFD
24 pyang -Werror --plugindir $PYBINDPLUGIN --path vnfd:etsi -f pybind vnfd/* etsi/etsi-nfv-vnfd.yang > vnfd_extended.py
25 pyang -Werror -f jstree --path vnfd:etsi -o vnfd.html etsi/etsi-nfv-vnfd.yang vnfd/*
26
27 #NSD
28 pyang -Werror --plugindir $PYBINDPLUGIN --path nsd:etsi -f pybind nsd/* etsi/etsi-nfv-nsd.yang > nsd_extended.py
29 pyang -Werror -f jstree --path nsd:etsi -o nsd.html etsi/etsi-nfv-nsd.yang nsd/*