From: Francis Dupont Date: Wed, 24 Oct 2018 16:24:24 +0000 (+0200) Subject: [65-libyang-config-translator] Added examples X-Git-Tag: 65-libyang-finish-doc_base~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ba2a0862a7a8ad17d4c3d297f24c30f1d11ab3c;p=thirdparty%2Fkea.git [65-libyang-config-translator] Added examples --- diff --git a/src/lib/yang/translator_config.h b/src/lib/yang/translator_config.h index d95efa978b..f855bb4caa 100644 --- a/src/lib/yang/translator_config.h +++ b/src/lib/yang/translator_config.h @@ -20,7 +20,7 @@ namespace yang { /// Configuration translation between YANG and JSON /// -/// JSON syntax for kea-dhcp6-server is: +/// JSON syntax for kea-dhcp6 is: /// @code /// "Dhcp6": { /// "preferred-lifetime": , @@ -133,7 +133,59 @@ namespace yang { /// +--rw loggers /// @endcode /// -/// @todo add example +/// Example of kea-dhcp6 simple configuration: +/// @code +/// { +/// "Dhcp6": { +/// "interfaces-config": +/// { +/// "interfaces": [ "eth1" ] +/// }, +/// "control-socket": { +/// "socket-type": "unix", +/// "socket-name": "/tmp/kea6-sock" +/// }, +/// "subnet6": +/// [ +/// { +/// "subnet": "2001:db8::/64", +/// "pools": +/// [ +/// { +/// "pool": "2001:db8::1:0/112" +/// } +/// ] +/// } +/// ] +/// } +/// } +/// @endcode +/// +/// The same configuration wrote into YANG datastore using @c setConfig() and exported to XML format: +/// @code +/// +/// +/// +/// 1 +/// +/// +/// 2001:db8::1:0 +/// 2001:db8::1:ffff +/// 2001:db8::1:0/112 +/// +/// +/// 2001:db8::/64 +/// +/// +/// +/// eth1 +/// +/// +/// /tmp/kea6-sock +/// unix +/// +/// +/// @endcode /// /// Inheritance graph between translators is: ///