Fix TLS issues. Fix VES faultNotification issues.
[sim/o1-interface.git] / ntsimulator / yang / sysrepo-configuration-load.sh
1 #!/bin/bash
2
3 sleep 20
4
5 echo "Loading data into sysrepo..."
6
7 #SSH_PUB_KEY="$(cat /home/netconf/.ssh/id_dsa.pub| awk '{print $2}')"
8
9 #echo '<system xmlns="urn:ietf:params:xml:ns:yang:ietf-system"><authentication><user><name>netconf</name><authorized-key><name>ssh_key</name><algorithm>ssh-dss</algorithm>' >> load_auth_pubkey.xml
10 #echo '<key-data>'"$SSH_PUB_KEY"'</key-data></authorized-key></user></authentication></system>' >> load_auth_pubkey.xml
11
12 #sysrepocfg --merge=load_auth_pubkey.xml --format=xml ietf-system
13 #rm load_auth_pubkey.xml
14 #
15 #ssh-keyscan -p 830 localhost >> ~/.ssh/known_hosts
16
17 pyang -f sample-xml-skeleton --sample-xml-list-entries 3 *.yang
18
19 result=$(netopeer2-cli <<-END
20         connect --host 127.0.0.1 --login netconf
21         user-rpc --content=/opt/dev/yang/edit_config_operation.xml
22         disconnect
23 END
24 )
25
26 while [[ "$result" != "OK" ]]
27 do
28   pyang -f sample-xml-skeleton --sample-xml-list-entries 2 *.yang
29   
30   result=$(netopeer2-cli <<-END
31         connect --host 127.0.0.1 --login netconf
32         user-rpc --content=edit_config_operation.xml
33         disconnect
34 END
35 )
36 done
37 echo "Finished loading data into sysrepo..."
38
39 exit 0