]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[65-libyang-control-socket] Added example
authorFrancis Dupont <fdupont@isc.org>
Mon, 24 Sep 2018 14:35:57 +0000 (16:35 +0200)
committerFrancis Dupont <fdupont@isc.org>
Mon, 24 Sep 2018 14:35:57 +0000 (16:35 +0200)
src/lib/yang/translator_control_socket.h

index efd79760c461ace7818a49eefba7e3eb1f2b1cc8..b8e923efa97859b1b158592bb8989f0321e73d54 100644 (file)
 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: