X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ntsimulator%2Fyang%2Fauto-load-yangs.sh;h=fe2a1c1ddb4ef777e42a470b97bf871069e38d41;hb=b8166cdc5294cdee0c717085d659b4a8f0834313;hp=402d076f7358124e65d9c8ca8fc5c0247d3c7868;hpb=34ec819462d5f81ceeb723e47467bf50a8454f34;p=sim%2Fo1-interface.git diff --git a/ntsimulator/yang/auto-load-yangs.sh b/ntsimulator/yang/auto-load-yangs.sh index 402d076..fe2a1c1 100755 --- a/ntsimulator/yang/auto-load-yangs.sh +++ b/ntsimulator/yang/auto-load-yangs.sh @@ -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..."