From: Francis Dupont Date: Mon, 10 Dec 2018 13:50:41 +0000 (+0100) Subject: [204-move-models-] Addressing comments (finished) X-Git-Tag: 339-doxygen-errors_base~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e772e1472e073ee85924cfc706cb57a5e70a0b1;p=thirdparty%2Fkea.git [204-move-models-] Addressing comments (finished) --- diff --git a/src/lib/yang/yang.dox b/src/lib/yang/yang.dox index ecc14c4fc7..cf61927000 100644 --- a/src/lib/yang/yang.dox +++ b/src/lib/yang/yang.dox @@ -115,7 +115,9 @@ For details, see Section 20 "YANG/NETCONF support" in the Kea User's Guide. You also need to install YANG schemas, so the unit-tests are able to retrieve, add, update and generally interact with the sysrepo information. There are several production Kea models (src/share/yang/modules/kea*.yang) -and one test specific model (src/share/yang/modules/keatest-module*.yang). +and one test specific model (src/share/yang/modules/keatest-module*.yang) +which is only required if you want to run Kea unit tests, i.e. it is not +used in production. To install the test module, issue the following command: diff --git a/src/share/yang/modules/utils/check-hashes.sh b/src/share/yang/modules/utils/check-hashes.sh index 1e067fe018..7117606eab 100755 --- a/src/share/yang/modules/utils/check-hashes.sh +++ b/src/share/yang/modules/utils/check-hashes.sh @@ -5,8 +5,14 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -# Check hashes: +# Check hashes +# +# This developer script verifies recorded hashes still match the +# result of SHA-256 checksums of the YIN format. +# Requires yanglint to translate YANG to YIN formats and openssl +# for a system independent SHA-256. +error=0 for m in *.yang do hash1=`yanglint -f yin $m | openssl dgst -sha256 | sed 's/(stdin)= //'` @@ -16,9 +22,12 @@ do hash2=`cat $h` if test $hash1 != $hash2 then + error=1 echo hash mismatch on $m expected $hash1 in $h fi else + error=1 echo missing hash file $h for $m fi done +exit $error diff --git a/src/share/yang/modules/utils/check-revisions.sh b/src/share/yang/modules/utils/check-revisions.sh index 41b0fe18bd..58b34367d7 100755 --- a/src/share/yang/modules/utils/check-revisions.sh +++ b/src/share/yang/modules/utils/check-revisions.sh @@ -5,8 +5,14 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -# Check revisions: +# Check revisions +# +# This developer script verifies versions in module contents match +# the version in the name. +# Requires yanglint to translate YANG to YIN formats. +# Fixme: use xlstproc to extract the revision. +error=0 for m in *.yang do rev1=`yanglint -f yin $m | grep '