Bug fix. 83/4283/1
authorAlex Stancu <alexandru.stancu@highstreet-technologies.com>
Tue, 30 Jun 2020 16:07:54 +0000 (19:07 +0300)
committerAlex Stancu <alexandru.stancu@highstreet-technologies.com>
Tue, 30 Jun 2020 16:08:13 +0000 (19:08 +0300)
Fix bug where YANG models contain only submodule definition throw error.

Issue-ID: SIM-32
Change-Id: Ibd4ec1ac51235cb8f955f5a1cf7bb4d1c7402fd1
Signed-off-by: Alex Stancu <alexandru.stancu@highstreet-technologies.com>
ntsimulator/yang/auto-load-yangs.sh

index 3c4f409..fe2a1c1 100755 (executable)
@@ -57,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..."