Bug fix.
[sim/o1-interface.git] / ntsimulator / yang / auto-load-yangs.sh
index 402d076..fe2a1c1 100755 (executable)
@@ -28,13 +28,6 @@ shopt -s failglob
 
 declare -a excludedModules=()
 
-# Uninstall the NTS Manager YANG model
-$SYSREPOCTL -u -m network-topology-simulator
-# $SYSREPOCTL -u -m iana-if-type
-# $SYSREPOCTL -u -m ietf-ip
-# $SYSREPOCTL -u -m ietf-interfaces
-
-
 sleep 5
 
 pyang -f clearmust *.yang
@@ -64,6 +57,13 @@ else
         skip_model=true
       fi
     done
+
+    isSubmoduleOnly=$(pyang -f submodule --submodule-only $model)
+
+    if [ "$isSubmoduleOnly" == "True" ]; then
+      echo "Skipping installation of model $modelName because it only contains submodules..."
+      continue
+    fi
     
     if [ "$skip_model" = true ]; then
       echo "Skipping installation of excluded model $modelName..."