]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#65,!46] Minor clarifications in comments.
authorTomek Mrugalski <tomasz@isc.org>
Wed, 17 Oct 2018 15:43:01 +0000 (17:43 +0200)
committerTomek Mrugalski <tomasz@isc.org>
Wed, 17 Oct 2018 15:43:01 +0000 (17:43 +0200)
src/lib/yang/translator_host.cc
src/lib/yang/translator_host.h

index 96fc7a51c7b096f16cb042b7f8b2d777189c5c98..3bfade199151d2e5f1cbdfe158cb1471a2835d4a 100644 (file)
@@ -152,6 +152,8 @@ TranslatorHost::setHostKea(const string& xpath, ConstElementPtr elem) {
             setItem(xpath + "/client-classes", cclass, SR_STRING_T);
         }
     }
+
+    // These are DHCPv4-specific parameters.
     if (model_ == KEA_DHCP4_SERVER) {
         ConstElementPtr next = elem->get("next-server");
         if (next) {
@@ -166,6 +168,8 @@ TranslatorHost::setHostKea(const string& xpath, ConstElementPtr elem) {
             setItem(xpath + "/boot-file-name", boot, SR_STRING_T);
         }
     }
+
+    // User context is supported in both kea-dhcp4-server and kea-dhcp6-server.
     ConstElementPtr context = Adaptor::getContext(elem);
     if (context) {
         setItem(xpath + "/user-context", Element::create(context->str()),
index 378168c55d3ba44fa87e00a7f90c9b66eeb998e5..beac9ddbee9d7caae6193e8acaa34aa5e960cd9f 100644 (file)
@@ -13,7 +13,7 @@
 namespace isc {
 namespace yang {
 
-/// Host reservation translation between YANG and JSON
+/// Translation between YANG and JSON for a single host reservation.
 ///
 /// JSON syntax for kea-dhcp4 is:
 /// @code
@@ -107,7 +107,11 @@ namespace yang {
 /// @brief A translator class for converting a host reservation between
 /// YANG and JSON.
 ///
-/// Currently supports on kea-dhcp[46]-server, not yet ietf-dhcpv6-server.
+/// Currently supported models are:
+/// - kea-dhcp4-server
+/// - kea-dhcp6-server
+///
+/// ietf-dhcpv6-server is not supported yet.
 class TranslatorHost : virtual public TranslatorOptionDataList {
 public:
 
@@ -134,13 +138,13 @@ public:
     void setHost(const std::string& xpath, isc::data::ConstElementPtr elem);
 
 protected:
-    /// @brief getHost for kea-dhcp[46].
+    /// @brief getHost for kea-dhcp[46]-server models.
     ///
     /// @param xpath The xpath of the host reservation.
     /// @return JSON representation of the host reservation.
     isc::data::ElementPtr getHostKea(const std::string& xpath);
 
-    /// @brief setHost for kea-dhcp[46].
+    /// @brief setHost for kea-dhcp[46]-server models.
     ///
     /// @param xpath The xpath of the host reservation.
     /// @param elem The JSON element.
@@ -150,11 +154,14 @@ protected:
     std::string model_;
 };
 
-/// @brief A translator class for converting host reservations between
+/// @brief A translator class for converting host reservations list between
 /// YANG and JSON.
 ///
-/// Currently supports on kea-dhcp[46]-server, not yet ietf-dhcpv6-server.
+/// Currently supports the following models:
+/// - kea-dhcp4-server
+/// - kea-dhcp6-server
 ///
+/// The ietf-dhcpv6-server model is not yet supported.
 class TranslatorHosts : virtual public TranslatorHost {
 public: