]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[204-move-models-] Addressing comments (finished) 204-move-models-
authorFrancis Dupont <fdupont@isc.org>
Mon, 10 Dec 2018 13:50:41 +0000 (14:50 +0100)
committerFrancis Dupont <fdupont@isc.org>
Mon, 10 Dec 2018 13:50:41 +0000 (14:50 +0100)
src/lib/yang/yang.dox
src/share/yang/modules/utils/check-hashes.sh
src/share/yang/modules/utils/check-revisions.sh
src/share/yang/modules/utils/gen-revisions.sh

index ecc14c4fc774ade77ee6e00e91306c4e94ea39ab..cf619270003016e82dbfeb2b1f41d3299ac3f7b7 100644 (file)
@@ -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:
 
index 1e067fe018a1e3177b9963fc990825653eaf8a30..7117606eab2704d366cd25d8135232e3ba70d7e5 100755 (executable)
@@ -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
index 41b0fe18bd6492de973bfd86ef2ea044229a5b61..58b34367d79f89651cff4cc7d7e92470ac9c63c0 100755 (executable)
@@ -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 '<revision date=' | head -1 | sed \
@@ -16,6 +22,8 @@ do
 
     if test $rev1 != $rev2
     then
+        error=1
         echo revision mismatch on $m got $rev1
     fi
 done
+exit $error
index 288a2813b8e2cb00d0bb21dbcb31f9c54b7bc2f3..95b71fb9ed8a3c822fe433dcd7ac197461598686 100755 (executable)
@@ -5,7 +5,12 @@
 # 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/.
 
-# Build module / revision table:
+# Build module / revision table
+#
+# This developer script builds the module / revision table, i.e. fill
+# the content of the src/lib/yang/yang_revisions.h as explained in
+# src/lib/yang/yang_revisions.h.skel
+# The keatest-module entry is enabled only when KEATEST_MODULE is defined.
 
 test=keatest-module*.yang
 last=kea-dhcp-ddns*.yang