use local yangmodels/openconfig (if present) instead of github

This commit is contained in:
Olof hagsand 2023-09-29 22:06:18 +02:00
parent 794a17c2bb
commit 06d8e85290
9 changed files with 58 additions and 39 deletions

14
docker/test/getopenconfig.sh Executable file
View file

@ -0,0 +1,14 @@
#!/usr/bin/env bash
# Script to get openconfig, either from local installation, or from remote
# This is an optimization from always getting it from github inside the dockerfile
if [ -d openconfig ]; then
rm -rf openconfig
fi
mkdir -p openconfig
if [ -d /usr/local/share/openconfig ]; then
cp -R /usr/local/share/openconfig openconfig/
else
(cd openconfig && git clone https://github.com/openconfig/public)
fi