Add script to generate the augmented Python classes and the jsTree files for VNFD...
[osm/IM.git] / augments / apply_augments.sh
diff --git a/augments/apply_augments.sh b/augments/apply_augments.sh
new file mode 100644 (file)
index 0000000..939824e
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/bash
+# Copyright 2020 Whitestack LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Instructions:
+# 1. Clone the SOL006 repo: git clone --single-branch --branch v2.6.1 https://forge.etsi.org/rep/nfv/SOL006.git
+# 2. Put the etsi-nfv-* files from SOL006 repo on folder named etsi/
+# 3. Set $PYBINDPLUGIN env var to pyangbind plugin folder
+# 4. Run this :)
+
+#VNFD
+pyang -Werror --plugindir $PYBINDPLUGIN --path vnfd:etsi -f pybind vnfd/* etsi/etsi-nfv-vnfd.yang > vnfd_extended.py
+pyang -Werror -f jstree --path vnfd:etsi -o vnfd.html etsi/etsi-nfv-vnfd.yang vnfd/*
+
+#NSD
+pyang -Werror --plugindir $PYBINDPLUGIN --path nsd:etsi -f pybind nsd/* etsi/etsi-nfv-nsd.yang > nsd_extended.py
+pyang -Werror -f jstree --path nsd:etsi -o nsd.html etsi/etsi-nfv-nsd.yang nsd/*
\ No newline at end of file