X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ntsimulator%2Fyang%2Fsysrepo-configuration-load.sh;h=71ba5d44ba6a3048b803a3e0f8d0d867e666b8bc;hb=a19f893a70c03dee9312e1208301d079409d84ac;hp=ed210ff6f90b0d8b60d46943e80d5d6a6655831c;hpb=0c00182421feb00a63a76555844dba5b72639b8e;p=sim%2Fo1-interface.git diff --git a/ntsimulator/yang/sysrepo-configuration-load.sh b/ntsimulator/yang/sysrepo-configuration-load.sh index ed210ff..71ba5d4 100755 --- a/ntsimulator/yang/sysrepo-configuration-load.sh +++ b/ntsimulator/yang/sysrepo-configuration-load.sh @@ -20,17 +20,7 @@ sleep 20 echo "Loading data into sysrepo..." -#SSH_PUB_KEY="$(cat /home/netconf/.ssh/id_dsa.pub| awk '{print $2}')" - -#echo 'netconfssh_keyssh-dss' >> load_auth_pubkey.xml -#echo ''"$SSH_PUB_KEY"'' >> load_auth_pubkey.xml - -#sysrepocfg --merge=load_auth_pubkey.xml --format=xml ietf-system -#rm load_auth_pubkey.xml -# -#ssh-keyscan -p 830 localhost >> ~/.ssh/known_hosts - -pyang -f sample-xml-skeleton --sample-xml-list-entries 3 *.yang +pyang -f sample-xml-skeleton --sample-xml-list-entries 2 *.yang result=$(netopeer2-cli <<-END connect --host 127.0.0.1 --login netconf @@ -39,8 +29,11 @@ result=$(netopeer2-cli <<-END END ) -while [[ "$result" != "OK" ]] +count=1 + +while [[ $count -le 100 ]] && [[ "$result" != "OK" ]] do + ((count++)) pyang -f sample-xml-skeleton --sample-xml-list-entries 2 *.yang result=$(netopeer2-cli <<-END @@ -50,6 +43,11 @@ do END ) done -echo "Finished loading data into sysrepo..." + +echo "Finished loading data into sysrepo. Removing edit-config XML..." +rm -f /opt/dev/yang/edit_config_operation.xml + +echo "Done..." + exit 0 \ No newline at end of file