From: Francis Dupont Date: Fri, 21 Sep 2018 23:28:22 +0000 (+0200) Subject: [65-libyang-control-socket] Moved syntax comments - capitalized YANG X-Git-Tag: 165-netbsd-8-fixes_base^2~3^2^2~1^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=643aaac127ad3bc705a55658cd8bd5c30d699aa5;p=thirdparty%2Fkea.git [65-libyang-control-socket] Moved syntax comments - capitalized YANG --- diff --git a/src/lib/yang/translator_control_socket.h b/src/lib/yang/translator_control_socket.h index bd662ffc1e..50c43662f8 100644 --- a/src/lib/yang/translator_control_socket.h +++ b/src/lib/yang/translator_control_socket.h @@ -13,7 +13,31 @@ namespace isc { namespace yang { -// @brief Between Yang and JSON translator class for the control socket. +// @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. +// +// JSON syntax for all Kea servers with command channel is: +// @code +// "control-socket": { +// "socket-type": "", +// "socket-name": "", +// "user-context": { }, +// "comment": "" +// } +// @endcode +// +// YANG syntax is: +// @code +// +--rw control-socket container +// | +// +--rw socket-name string +// +--rw socket-type enumeration +// +--rw user-context? string +// @endcode +// class TranslatorControlSocket : virtual public TranslatorBasic { public: @@ -26,24 +50,14 @@ public: /// @brief Destructor. virtual ~TranslatorControlSocket(); - /// @brief Get and translate a control socket from Yang to JSON. - /// - /// JSON syntax for all Kea servers with command channel is: - /// @code - /// "control-socket": { - /// "socket-type": "", - /// "socket-name": "", - /// "user-context": { }, - /// "comment": "" - /// } - /// @endcode + /// @brief Get and translate a control socket from YANG to JSON. /// /// @param xpath The xpath of the control socket. /// @return JSON representation of the control socket. /// @throw SysrepoError when sysrepo raises an error. isc::data::ConstElementPtr getControlSocket(const std::string& xpath); - /// @brief Translate and set control socket from JSON to Yang. + /// @brief Translate and set control socket from JSON to YANG. /// /// @param xpath The xpath of the control socket. /// @param elem The JSON element. @@ -60,15 +74,6 @@ protected: /// @brief setControlSocket for kea models. /// - /// Yang syntax is: - /// @code - /// +--rw control-socket container - /// | - /// +--rw socket-name string - /// +--rw socket-type enumeration - /// +--rw user-context? string - /// @endcode - /// /// Null elem argument removes the container. /// /// @param xpath The xpath of the control socket.