Shawn Routhier [Fri, 27 May 2016 04:36:36 +0000 (21:36 -0700)]
[trac4480] Update per review comments
Create a LogContentTest class and move the functions to manipulate
a test to check on the log output there. This will make it available
for other tests in the future. As part of this bundle a bit more
work into the class to minimze the calls in the test routines.
Where reasonable remove extra copys of the values being pushed
onto the stack - instead of generating a copy just for the logging
simply use the value from the top of the stack directly.
Swtich to using single quotes around text values.
Added some more description in the classify document
Shawn Routhier [Fri, 20 May 2016 04:56:18 +0000 (21:56 -0700)]
[4480] Add debug logging for evaluation of classification expressions
This patch adds a set of log messages to indicate what values are
being popped from or pushed to the classification value stack. This
is meant to be used by an administrator when debugging the expression
statements.
Stephen Morris [Thu, 19 May 2016 13:38:19 +0000 (14:38 +0100)]
[3164] Add changes suggested by review
Change the connection timeout parameter from an "int" to an "unsigned
int". Update the checks to allow for lexical_cast not throwing an
exception when converting a string representing a negative number
to an unsigned int.
src/lib/dhcpsrv/Makefile.am
Added pgsql_exchange.cc and pgsql_exchange.h
src/lib/dhcpsrv/pgsql_exchange.h
src/lib/dhcpsrv/pgsql_exchange.cc
New files, containng new base class PgSqlExchange from
which was distilled from PgSqlLeaseExchange
src/lib/dhcpsrv/pgsql_lease_mgr.cc
Refactored exchange classes to use new base class
Moved PsqlBindArray into pgsql_exchange.*
[4481] Made query4 and query6 callout arguments uniformly available
The client packet is now uniformly available to all client packet driven
callouts for both v4 and v6:
Added "query4" to lease4_select and lease4_renew
src/bin/dhcp4/dhcp4_hooks.dox
Added query4 argument to lease4_select and lease4_renew documentation
src/bin/dhcp4/tests/hooks_unittest.cc
Revamped to track both query4 and response4 arguments
TEST_F(HooksDhcpv4SrvTest, lease4RenewSimple) - modified to verify
query4 set by lease4_renew callout
src/lib/dhcpsrv/alloc_engine.cc
- AllocEngine::createLease4()
- AllocEngine::reuseExpiredLease4() - modified to add query4 to
lease4_select callout arguments
- AllocEngine::renewLease4() - modified to add query4 to lease4_renew
callout arguments
src/lib/dhcpsrv/tests/alloc_engine_hooks_unittest.cc
HookAllocEngine4Test() - modified to track query4 argument
TEST_F(HookAllocEngine4Test, lease4_select) - modified to verify query4
callout argument
Added "query6" to pkt6_send and lease6_select
src/bin/dhcp6/dhcp6_hooks.dox
Added query6 argument to pkt6_send and lease6_select documentation
src/bin/dhcp6/dhcp6_srv.cc
Dhcpv6Srv::processPacket(Pkt6Ptr& query, Pkt6Ptr& rsp) - modified to
add query6 to the pkt_send callout arguments
src/bin/dhcp6/tests/hooks_unittest.cc
Revamped to track both query4 and response4 arguments
TEST_F(HooksDhcpv6SrvTest, simplePkt6Send) - modified to
verify query6 set by pkt6_send callout
src/lib/dhcpsrv/alloc_engine.cc
- AllocEngine::createLease4()
- AllocEngine::reuseExpiredLease6() - modified to add query6 to
lease6_select callout arguments
callout arguments
src/lib/dhcpsrv/tests/alloc_engine_hooks_unittest.cc
HookAllocEngine6Test() - modified to track query6 argument
TEST_F(HookAllocEngine6Test, lease4_select) - modified to verify
query6 argument
Stephen Morris [Tue, 10 May 2016 14:03:02 +0000 (15:03 +0100)]
[4485] Change type of variables to overcome compiler objections
One compiler was objecting to placing the address of a size_t variable
into a variable declared as "unsigned long*". Changing the
declaration from "size_t" to "unsigned long" fixes the problem.
src/bin/dhcp4/tests/hooks_unittest.cc
TEST_F(LoadUnloadDhcpv4SrvTest, unloadLibaries) - new test that
verifies Hooks libraries are unloaded by the Dhcpv4Srv destructor
src/bin/dhcp6/tests/hooks_unittest.cc
TEST_F(LoadUnloadDhcpv6SrvTest, unloadLibaries) - new test that
verifies Hooks libraries are unloaded by the Dhcpv4Srv destructor
[4492] Explicitly unload hook libraries prior during shutdown
A call to HooksManager::getHooksManager().unloadLibraries() was added to
the destructors Dhcpv4Srv::~Dhcpv4Srv() and Dhcpv6Srv::~Dhcpv6Srv(). This
ensures hook libraries are unloaded prior to static objects.
[4297] Addressed review comments:
- returnining different values in callout_params_library.cc
- returned values are now described for getParameter
- corrected index syntax comment in getParameter
- added missing include
- hooks_user.dox updated
- hooks unit test moved, so it is now next to other hooks tests