From b8166cdc5294cdee0c717085d659b4a8f0834313 Mon Sep 17 00:00:00 2001 From: Alex Stancu Date: Tue, 30 Jun 2020 19:07:54 +0300 Subject: [PATCH] Bug fix. Fix bug where YANG models contain only submodule definition throw error. Issue-ID: SIM-32 Change-Id: Ibd4ec1ac51235cb8f955f5a1cf7bb4d1c7402fd1 Signed-off-by: Alex Stancu --- ntsimulator/yang/auto-load-yangs.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ntsimulator/yang/auto-load-yangs.sh b/ntsimulator/yang/auto-load-yangs.sh index 3c4f409..fe2a1c1 100755 --- a/ntsimulator/yang/auto-load-yangs.sh +++ b/ntsimulator/yang/auto-load-yangs.sh @@ -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..." -- 2.16.6