[dn42-schema.py] implement find() using git remote

without depending on registry.dn42.us

[dn42-schema.py]: implement _get_parent_inetnums for policy checks of new inetnums

[dn42-schema.py] implement as-block check backend

[dn42-schema.py] implement for route{,6}

[dn42-schema.py] implement @family= without @netlevel

[dn42-schema.py] move new to dn42_schema_local.py + restore dn42-schema.py

[dn42-schema.py] add "check-pol2" using new dn42_schema_local.py
This commit is contained in:
lare 2024-03-15 12:07:37 +01:00
parent 0ae2622f58
commit 1f76bc5adb
No known key found for this signature in database
GPG Key ID: 30C10A93B8B8E9FE
3 changed files with 1464 additions and 1 deletions

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
set -eo pipefail
set -o pipefail
if [ $# -eq 0 ]
then

18
check-pol2 Executable file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -o pipefail
if [ $# -eq 0 ]
then
echo "Usage: $0 COMMIT YOUR-MNT"
exit
fi
BASE="$(readlink -f "$0" 2>/dev/null || python -c 'import os,sys;print(os.path.realpath(sys.argv[1]))' "$0")"
BASE="$(dirname "$BASE")"
cd "$BASE" || exit 1
git diff --name-only $1 | while IFS='/' read -ra LINE; do
if [[ "${LINE[0]}" = "data" && -n "${LINE[2]}" ]]; then
utils/schema-check/dn42_schema_local.py -v policy ${LINE[1]} ${LINE[2]} $2
fi
done

File diff suppressed because it is too large Load Diff