From: Tomek Mrugalski Date: Wed, 17 Oct 2018 15:43:01 +0000 (+0200) Subject: [#65,!46] Minor clarifications in comments. X-Git-Tag: 153-netconf-agent_base~2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06ed2a4d4a32040a46594018023800085d606933;p=thirdparty%2Fkea.git [#65,!46] Minor clarifications in comments. --- diff --git a/src/lib/yang/translator_host.cc b/src/lib/yang/translator_host.cc index 96fc7a51c7..3bfade1991 100644 --- a/src/lib/yang/translator_host.cc +++ b/src/lib/yang/translator_host.cc @@ -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()), diff --git a/src/lib/yang/translator_host.h b/src/lib/yang/translator_host.h index 378168c55d..beac9ddbee 100644 --- a/src/lib/yang/translator_host.h +++ b/src/lib/yang/translator_host.h @@ -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: