5 echo "Loading data into sysrepo..."
7 SSH_PUB_KEY="$(cat /home/netconf/.ssh/id_dsa.pub| awk '{print $2}')"
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
12 sysrepocfg --merge=load_auth_pubkey.xml --format=xml ietf-system
13 rm load_auth_pubkey.xml
15 ssh-keyscan -p 830 localhost >> ~/.ssh/known_hosts
17 pyang -f sample-xml-skeleton --sample-xml-list-entries 3 *.yang
19 result=$(netopeer2-cli <<-END
20 auth pref publickey 1000
21 auth keys add /home/netconf/.ssh/id_dsa.pub /home/netconf/.ssh/id_dsa
22 connect --login netconf
23 user-rpc --content=/opt/dev/yang/edit_config_operation.xml
28 while [[ "$result" != "OK" ]]
30 pyang -f sample-xml-skeleton --sample-xml-list-entries 2 *.yang
32 result=$(netopeer2-cli <<-END
33 connect --login netconf
34 user-rpc --content=edit_config_operation.xml
39 echo "Finished loading data into sysrepo..."