X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ntsimulator%2Fyang%2Fsysrepo-configuration-load.sh;fp=ntsimulator%2Fyang%2Fsysrepo-configuration-load.sh;h=0000000000000000000000000000000000000000;hb=f1d5c9198acde7a7ce296490087cad37e008f688;hp=379ea70f8beaaba1f012cded059bc8fb22018bb3;hpb=f2d8f1002fa93848c80a88e5658db4816cba3020;p=sim%2Fo1-interface.git diff --git a/ntsimulator/yang/sysrepo-configuration-load.sh b/ntsimulator/yang/sysrepo-configuration-load.sh deleted file mode 100755 index 379ea70..0000000 --- a/ntsimulator/yang/sysrepo-configuration-load.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -################################################################################ -# -# Copyright 2019 highstreet technologies GmbH and others -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -################################################################################ - -sleep 20 - -echo "Loading data into sysrepo..." - -result=$(netopeer2-cli <<-END - knownhosts --del 0 - knownhosts --del 0 -END -) - -SSH_PUB_KEY_MELACON="$(cat /home/netconf/.ssh/melacon.server.key.pub)" - -echo "Writing the public key to the known_hosts..." -echo "[127.0.0.1]:830 $SSH_PUB_KEY_MELACON" > /root/.ssh/known_hosts - -pyang -f sample-xml-skeleton --sample-xml-list-entries 2 *.yang - -result=$(netopeer2-cli <<-END - auth keys add /home/netconf/.ssh/melacon.server.key.pub /home/netconf/.ssh/melacon.server.key - connect --host 127.0.0.1 --login netconf - user-rpc --content=/opt/dev/yang/edit_config_operation.xml - disconnect -END -) - -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 - connect --host 127.0.0.1 --login netconf - user-rpc --content=edit_config_operation.xml - disconnect -END -) -done - -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