]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#642,!373] Explained how globals are fetched for various selectors.
authorMarcin Siodelski <marcin@isc.org>
Mon, 17 Jun 2019 13:10:52 +0000 (15:10 +0200)
committerMarcin Siodelski <marcin@isc.org>
Thu, 27 Jun 2019 18:51:31 +0000 (14:51 -0400)
src/hooks/dhcp/mysql_cb/mysql_cb_dhcp4.h
src/hooks/dhcp/mysql_cb/mysql_cb_dhcp6.h
src/lib/dhcpsrv/config_backend_dhcp4.h
src/lib/dhcpsrv/config_backend_dhcp6.h

index 961aa9d7e3832c78a5c33220d7ef594151c5c50f..988bcf3d9165e67de34fd0a35cbf9f221049db84 100644 (file)
@@ -162,6 +162,10 @@ public:
 
     /// @brief Retrieves global parameter value.
     ///
+    /// Typically, the server selector used for this query should be set to
+    /// ONE. It is possible to use the MULTIPLE server selector but in that
+    /// case only the first found parameter is returned.
+    ///
     /// @param server_selector Server selector.
     /// @param name Name of the global parameter to be retrieved.
     /// @return Value of the global parameter.
@@ -172,6 +176,33 @@ public:
 
     /// @brief Retrieves all global parameters.
     ///
+    /// Using the server selector it is possible to fetch the parameters for
+    /// one or more servers. The following list describes what parameters are
+    /// returned depending on the server selector specified:
+    /// - ALL: only common parameters are returned which are associated with
+    ///   the logical server 'all'. No parameters associated with the explicit
+    ///    server tags are returned.
+    ///
+    /// - ONE: parameters used by the particular sever are returned. This includes
+    ///   parameters associated with the particular server (identified by tag)
+    ///   and parameters associated with the logical server 'all' when server
+    ///   specific parameters are not given. For example, if there is a
+    ///   renew-timer specified for 'server1' tag, different value of the
+    ///   renew-timer specified for 'all' servers and a rebind-timer specified
+    ///   for 'all' servers, the caller will receive renew-timer value associated
+    ///   with the server1 and the rebind-timer value associated with all servers,
+    ///   because there is no explicit rebind-timer specified for server1.
+    ///
+    /// - MULTIPLE: parameters used by multiple servers, but those associated
+    ///   with specific server tags take precedence over the values specified for
+    ///   'all' servers. This is similar to the case of ONE server described
+    ///   above. The effect of querying for parameters belonging to multiple
+    ///   servers is the same as issuing multiple queries with ONE server
+    ///   being selected multiple times.
+    ///
+    /// - UNASSIGNED: parameters not associated with any servers.
+    ///
+    ///
     /// @param server_selector Server selector.
     virtual data::StampedValueCollection
     getAllGlobalParameters4(const db::ServerSelector& server_selector) const;
index b51fe722a1336fca14ffb9733a53097b6428ae1b..16d3fd659fa137fc307739cd6c4313fabf44aa86 100644 (file)
@@ -162,6 +162,10 @@ public:
 
     /// @brief Retrieves global parameter value.
     ///
+    /// Typically, the server selector used for this query should be set to
+    /// ONE. It is possible to use the MULTIPLE server selector but in that
+    /// case only the first found parameter is returned.
+    ///
     /// @param server_selector Server selector.
     /// @param name Name of the global parameter to be retrieved.
     /// @return Value of the global parameter.
@@ -172,6 +176,33 @@ public:
 
     /// @brief Retrieves all global parameters.
     ///
+    /// Using the server selector it is possible to fetch the parameters for
+    /// one or more servers. The following list describes what parameters are
+    /// returned depending on the server selector specified:
+    /// - ALL: only common parameters are returned which are associated with
+    ///   the logical server 'all'. No parameters associated with the explicit
+    ///    server tags are returned.
+    ///
+    /// - ONE: parameters used by the particular sever are returned. This includes
+    ///   parameters associated with the particular server (identified by tag)
+    ///   and parameters associated with the logical server 'all' when server
+    ///   specific parameters are not given. For example, if there is a
+    ///   renew-timer specified for 'server1' tag, different value of the
+    ///   renew-timer specified for 'all' servers and a rebind-timer specified
+    ///   for 'all' servers, the caller will receive renew-timer value associated
+    ///   with the server1 and the rebind-timer value associated with all servers,
+    ///   because there is no explicit rebind-timer specified for server1.
+    ///
+    /// - MULTIPLE: parameters used by multiple servers, but those associated
+    ///   with specific server tags take precedence over the values specified for
+    ///   'all' servers. This is similar to the case of ONE server described
+    ///   above. The effect of querying for parameters belonging to multiple
+    ///   servers is the same as issuing multiple queries with ONE server
+    ///   being selected multiple times.
+    ///
+    /// - UNASSIGNED: parameters not associated with any servers.
+    ///
+    ///
     /// @param server_selector Server selector.
     virtual data::StampedValueCollection
     getAllGlobalParameters6(const db::ServerSelector& server_selector) const;
index 457193e757cd37441afff611ec75c3b4e39b9e5c..d1e016bd4e9c69d4e5b753dbfc827959c7fa68c3 100644 (file)
@@ -165,6 +165,10 @@ public:
 
     /// @brief Retrieves global parameter value.
     ///
+    /// Typically, the server selector used for this query should be set to
+    /// ONE. It is possible to use the MULTIPLE server selector but in that
+    /// case only the first found parameter is returned.
+    ///
     /// @param selector Server selector.
     /// @param name Name of the global parameter to be retrieved.
     /// @return Value of the global parameter or null if parameter doesn't
@@ -175,6 +179,32 @@ public:
 
     /// @brief Retrieves all global parameters.
     ///
+    /// Using the server selector it is possible to fetch the parameters for
+    /// one or more servers. The following list describes what parameters are
+    /// returned depending on the server selector specified:
+    /// - ALL: only common parameters are returned which are associated with
+    ///   the logical server 'all'. No parameters associated with the explicit
+    ///    server tags are returned.
+    ///
+    /// - ONE: parameters used by the particular sever are returned. This includes
+    ///   parameters associated with the particular server (identified by tag)
+    ///   and parameters associated with the logical server 'all' when server
+    ///   specific parameters are not given. For example, if there is a
+    ///   renew-timer specified for 'server1' tag, different value of the
+    ///   renew-timer specified for 'all' servers and a rebind-timer specified
+    ///   for 'all' servers, the caller will receive renew-timer value associated
+    ///   with the server1 and the rebind-timer value associated with all servers,
+    ///   because there is no explicit rebind-timer specified for server1.
+    ///
+    /// - MULTIPLE: parameters used by multiple servers, but those associated
+    ///   with specific server tags take precedence over the values specified for
+    ///   'all' servers. This is similar to the case of ONE server described
+    ///   above. The effect of querying for parameters belonging to multiple
+    ///   servers is the same as issuing multiple queries with ONE server
+    ///   being selected multiple times.
+    ///
+    /// - UNASSIGNED: parameters not associated with any servers.
+    ///
     /// @param selector Server selector.
     /// @return Collection of global parameters.
     virtual data::StampedValueCollection
index 7e8be2bc156ff8d2176a3829ecbdfdc1670231e3..900141367351ae031a6290e5d1de1f6afec2b0b9 100644 (file)
@@ -166,6 +166,10 @@ public:
 
     /// @brief Retrieves global parameter value.
     ///
+    /// Typically, the server selector used for this query should be set to
+    /// ONE. It is possible to use the MULTIPLE server selector but in that
+    /// case only the first found parameter is returned.
+    ///
     /// @param selector Server selector.
     /// @param name Name of the global parameter to be retrieved.
     /// @return Value of the global parameter or null if parameter doesn't
@@ -176,6 +180,32 @@ public:
 
     /// @brief Retrieves all global parameters.
     ///
+    /// Using the server selector it is possible to fetch the parameters for
+    /// one or more servers. The following list describes what parameters are
+    /// returned depending on the server selector specified:
+    /// - ALL: only common parameters are returned which are associated with
+    ///   the logical server 'all'. No parameters associated with the explicit
+    ///    server tags are returned.
+    ///
+    /// - ONE: parameters used by the particular sever are returned. This includes
+    ///   parameters associated with the particular server (identified by tag)
+    ///   and parameters associated with the logical server 'all' when server
+    ///   specific parameters are not given. For example, if there is a
+    ///   renew-timer specified for 'server1' tag, different value of the
+    ///   renew-timer specified for 'all' servers and a rebind-timer specified
+    ///   for 'all' servers, the caller will receive renew-timer value associated
+    ///   with the server1 and the rebind-timer value associated with all servers,
+    ///   because there is no explicit rebind-timer specified for server1.
+    ///
+    /// - MULTIPLE: parameters used by multiple servers, but those associated
+    ///   with specific server tags take precedence over the values specified for
+    ///   'all' servers. This is similar to the case of ONE server described
+    ///   above. The effect of querying for parameters belonging to multiple
+    ///   servers is the same as issuing multiple queries with ONE server
+    ///   being selected multiple times.
+    ///
+    /// - UNASSIGNED: parameters not associated with any servers.
+    ///
     /// @param selector Server selector.
     /// @return Collection of global parameters.
     virtual data::StampedValueCollection