From 787aedbca19bba5f6537f2f09ef0ecc9515b5d48 Mon Sep 17 00:00:00 2001 From: Francis Dupont Date: Mon, 24 Sep 2018 16:35:57 +0200 Subject: [PATCH] [65-libyang-control-socket] Added example --- src/lib/yang/translator_control_socket.h | 36 ++++++++++++++++++++---- 1 file changed, 31 insertions(+), 5 deletions(-) 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: -- 2.47.3