From: Razvan Becheriu Date: Wed, 14 Jun 2023 17:23:35 +0000 (+0300) Subject: [#2883] changed declined-nas to declined-addresses X-Git-Tag: Kea-2.4.0~165 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df21029e5bad43b99361f4fffebbd05eaea89791;p=thirdparty%2Fkea.git [#2883] changed declined-nas to declined-addresses --- diff --git a/doc/sphinx/arm/hooks-stat-cmds.rst b/doc/sphinx/arm/hooks-stat-cmds.rst index a5d5d79699..475caf06ad 100644 --- a/doc/sphinx/arm/hooks-stat-cmds.rst +++ b/doc/sphinx/arm/hooks-stat-cmds.rst @@ -188,7 +188,7 @@ The response to either command will contain three elements: - ``assigned-nas`` - the number of NA addresses in the subnet that are currently assigned to a client. - - ``declined-nas`` - the number of NA addresses that are currently + - ``declined-addresses`` - the number of NA addresses that are currently declined and are thus unavailable for assignment. - ``total-pds`` - the total number of PD prefixes available of DHCPv6 @@ -239,7 +239,7 @@ PD pools: "text": "stat-lease6-get: 2 rows found", "arguments": { "result-set": { - "columns": [ "subnet-id", "total-nas", "cumulative-assigned-nas", "assigned-nas", "declined-nas", "total-pds", "cumulative-assigned-pds", "assigned-pds" ], + "columns": [ "subnet-id", "total-nas", "cumulative-assigned-nas", "assigned-nas", "declined-addresses", "total-pds", "cumulative-assigned-pds", "assigned-pds" ], "rows": [ [ 10, 4096, 5000, 2400, 3, 0, 0, 0], [ 20, 0, 0, 0, 0, 1048, 300, 233 ], diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc index d334b12aa0..c47e17c0cb 100644 --- a/src/bin/dhcp6/dhcp6_srv.cc +++ b/src/bin/dhcp6/dhcp6_srv.cc @@ -3990,7 +3990,7 @@ Dhcpv6Srv::declineLease(const Pkt6Ptr& decline, const Lease6Ptr lease, // We do not want to decrease the assigned-nas at this time. While // technically a declined address is no longer allocated, the // primary usage of the assigned-nas statistic is to monitor pool - // utilization. Most people would forget to include declined-nas + // utilization. Most people would forget to include declined-addresses // in the calculation, and simply do assigned-nas/total-nas. This // would have a bias towards under-representing pool utilization, // if we decreased allocated immediately after receiving DHCPDECLINE, diff --git a/src/hooks/dhcp/stat_cmds/stat_cmds.cc b/src/hooks/dhcp/stat_cmds/stat_cmds.cc index 4697611419..e09047f470 100644 --- a/src/hooks/dhcp/stat_cmds/stat_cmds.cc +++ b/src/hooks/dhcp/stat_cmds/stat_cmds.cc @@ -592,7 +592,7 @@ LeaseStatCmdsImpl::makeResultSet6(const ElementPtr& result_wrapper, std::vectorcolumn_labels = { "subnet-id", "total-nas", "cumulative-assigned-nas", "assigned-nas", - "declined-nas", "total-pds", + "declined-addresses", "total-pds", "cumulative-assigned-pds", "assigned-pds" }; ElementPtr value_rows = createResultSet(result_wrapper, column_labels); diff --git a/src/hooks/dhcp/stat_cmds/stat_cmds.dox b/src/hooks/dhcp/stat_cmds/stat_cmds.dox index f27edd6f42..2136046544 100644 --- a/src/hooks/dhcp/stat_cmds/stat_cmds.dox +++ b/src/hooks/dhcp/stat_cmds/stat_cmds.dox @@ -187,7 +187,7 @@ and DHCPv6 response might look like this: "result-set": { "columns": [ "subnet-id", "total-nas", "cumulative-assigned-nas", - "assigned-nas", "declined-nas", "total-pds", + "assigned-nas", "declined-addresses", "total-pds", "cumulative-assigned-pds", "assigned-pds" ], "rows": [ diff --git a/src/hooks/dhcp/stat_cmds/stat_cmds.h b/src/hooks/dhcp/stat_cmds/stat_cmds.h index 97d5163763..2205255574 100644 --- a/src/hooks/dhcp/stat_cmds/stat_cmds.h +++ b/src/hooks/dhcp/stat_cmds/stat_cmds.h @@ -99,7 +99,7 @@ public: /// "timestamp": "2018-03-22 09:43:30.815371", /// "columns": ["subnet_id", "total-nas", /// "cumulative-assigned-nas", - /// "assigned-nas", "declined-nas", + /// "assigned-nas", "declined-addresses", /// "total-pds", "cumulative-assigned-pds", /// "assigned-pds"], /// "rows": [ diff --git a/src/hooks/dhcp/stat_cmds/tests/stat_cmds_unittest.cc b/src/hooks/dhcp/stat_cmds/tests/stat_cmds_unittest.cc index 3d0d7d089a..397479a412 100644 --- a/src/hooks/dhcp/stat_cmds/tests/stat_cmds_unittest.cc +++ b/src/hooks/dhcp/stat_cmds/tests/stat_cmds_unittest.cc @@ -1253,7 +1253,7 @@ TEST_F(StatCmdsTest, statLease6GetValid) { " \"columns\": [\n" " \"subnet-id\", \"total-nas\",\n" " \"cumulative-assigned-nas\", \"assigned-nas\",\n" - " \"declined-nas\", \"total-pds\",\n" + " \"declined-addresses\", \"total-pds\",\n" " \"cumulative-assigned-pds\", \"assigned-pds\"\n" " ],\n" " \"rows\": [\n" @@ -1277,7 +1277,7 @@ TEST_F(StatCmdsTest, statLease6GetValid) { " \"columns\": [\n" " \"subnet-id\", \"total-nas\",\n" " \"cumulative-assigned-nas\", \"assigned-nas\",\n" - " \"declined-nas\", \"total-pds\",\n" + " \"declined-addresses\", \"total-pds\",\n" " \"cumulative-assigned-pds\", \"assigned-pds\"\n" " ],\n" " \"rows\": [\n" @@ -1304,7 +1304,7 @@ TEST_F(StatCmdsTest, statLease6GetValid) { " \"columns\": [\n" " \"subnet-id\", \"total-nas\",\n" " \"cumulative-assigned-nas\", \"assigned-nas\",\n" - " \"declined-nas\", \"total-pds\",\n" + " \"declined-addresses\", \"total-pds\",\n" " \"cumulative-assigned-pds\", \"assigned-pds\"\n" " ],\n" " \"rows\": [\n" @@ -1330,7 +1330,7 @@ TEST_F(StatCmdsTest, statLease6GetValid) { " \"columns\": [\n" " \"subnet-id\", \"total-nas\",\n" " \"cumulative-assigned-nas\", \"assigned-nas\",\n" - " \"declined-nas\", \"total-pds\",\n" + " \"declined-addresses\", \"total-pds\",\n" " \"cumulative-assigned-pds\", \"assigned-pds\"\n" " ],\n" " \"rows\": [\n" @@ -1358,7 +1358,7 @@ TEST_F(StatCmdsTest, statLease6GetValid) { " \"columns\": [\n" " \"subnet-id\", \"total-nas\",\n" " \"cumulative-assigned-nas\", \"assigned-nas\",\n" - " \"declined-nas\", \"total-pds\",\n" + " \"declined-addresses\", \"total-pds\",\n" " \"cumulative-assigned-pds\", \"assigned-pds\"\n" " ],\n" " \"rows\": [\n" @@ -1386,7 +1386,7 @@ TEST_F(StatCmdsTest, statLease6GetValid) { " \"columns\": [\n" " \"subnet-id\", \"total-nas\",\n" " \"cumulative-assigned-nas\", \"assigned-nas\",\n" - " \"declined-nas\", \"total-pds\",\n" + " \"declined-addresses\", \"total-pds\",\n" " \"cumulative-assigned-pds\", \"assigned-pds\"\n" " ],\n" " \"rows\": [\n" @@ -1414,7 +1414,7 @@ TEST_F(StatCmdsTest, statLease6GetValid) { " \"columns\": [\n" " \"subnet-id\", \"total-nas\",\n" " \"cumulative-assigned-nas\", \"assigned-nas\",\n" - " \"declined-nas\", \"total-pds\",\n" + " \"declined-addresses\", \"total-pds\",\n" " \"cumulative-assigned-pds\", \"assigned-pds\"\n" " ],\n" " \"rows\": [\n" @@ -1581,7 +1581,7 @@ TEST_F(StatCmdsTest, statLease6OrphanedStats) { " \"columns\": [\n" " \"subnet-id\", \"total-nas\",\n" " \"cumulative-assigned-nas\", \"assigned-nas\",\n" - " \"declined-nas\", \"total-pds\",\n" + " \"declined-addresses\", \"total-pds\",\n" " \"cumulative-assigned-pds\", \"assigned-pds\"\n" " ],\n" " \"rows\": [\n" diff --git a/src/share/api/stat-lease6-get.json b/src/share/api/stat-lease6-get.json index 76e026a530..389ec83b8b 100644 --- a/src/share/api/stat-lease6-get.json +++ b/src/share/api/stat-lease6-get.json @@ -21,7 +21,7 @@ " \"text\": \"stat-lease6-get: 2 rows found\",", " \"arguments\": {", " \"result-set\": {", - " \"columns\": [ \"subnet-id\", \"total-nas\", \"cumulative-assigned-nas\", \"assigned-nas\", \"declined-nas\", \"total-pds\", \"cumulative-assigned-pds\", \"assigned-pds\" ],", + " \"columns\": [ \"subnet-id\", \"total-nas\", \"cumulative-assigned-nas\", \"assigned-nas\", \"declined-addresses\", \"total-pds\", \"cumulative-assigned-pds\", \"assigned-pds\" ],", " \"rows\": [", " [ 10, 4096, 3000, 2400, 3, 0, 0],", " [ 20, 0, 0, 0, 1048, 500, 233 ],",