From: Francis Dupont Date: Mon, 24 Sep 2018 14:35:57 +0000 (+0200) Subject: [65-libyang-control-socket] Added example X-Git-Tag: 165-netbsd-8-fixes_base^2~3^2^2~1^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=787aedbca19bba5f6537f2f09ef0ecc9515b5d48;p=thirdparty%2Fkea.git [65-libyang-control-socket] Added example --- diff --git a/src/lib/yang/translator_control_socket.h b/src/lib/yang/translator_control_socket.h index efd79760c4..b8e923efa9 100644 --- a/src/lib/yang/translator_control_socket.h +++ b/src/lib/yang/translator_control_socket.h @@ -13,11 +13,7 @@ namespace isc { namespace yang { -// @brief A translator class for converting a control socket between -// YANG and JSON. -// -// Supports all kea-* models at the exception of kea-dhcp-ddns. -// Specific to Kea so does not exists in ietf-dhcpv6-server. +// Control socket translation between YANG and JSON // // JSON syntax for all Kea servers with command channel is: // @code @@ -38,6 +34,36 @@ namespace yang { // +--rw user-context? string // @endcode // +// An example in JSON and YANG formats: +// @code +// { +// "socket-name": "/tmp/kea.sock", +// "socket-type": "unix", +// "user-context": { "foo": 1 } +// } +// @endcode +// @code +// /kea-ctrl-agent:config (container) +// /kea-ctrl-agent:config/control-sockets (container) +// /kea-ctrl-agent:config/control-sockets/ +// socket[server-type='dhcp4'] (list instance) +// /kea-ctrl-agent:config/control-sockets/socket[server-type='dhcp4']/ +// server-type = dhcp4 +// /kea-ctrl-agent:config/control-sockets/socket[server-type='dhcp4']/ +// control-socket (container) +// /kea-ctrl-agent:config/control-sockets/socket[server-type='dhcp4']/ +// control-socket/socket-name = /tmp/kea.sock +// /kea-ctrl-agent:config/control-sockets/socket[server-type='dhcp4']/ +// control-socket/socket-type = unix +// /kea-ctrl-agent:config/control-sockets/socket[server-type='dhcp4']/ +// control-socket/user-context = { \"foo\": 1 } +// @endcode + +// @brief A translator class for converting a control socket between +// YANG and JSON. +// +// Supports all kea-* models at the exception of kea-dhcp-ddns. +// Specific to Kea so does not exists in ietf-dhcpv6-server. class TranslatorControlSocket : virtual public TranslatorBasic { public: