src/lib/dhcpsrv/pgsql_exchange.h
src/lib/dhcpsrv/pgsql_exchange.cc
src/lib/dhcpsrv/pgsql_lease_mgr.cc
Moved getIPv6Value() from PgSqlLease6Exchange to
PgSqlExchange and made it static
PgSqlExchange::dumpRow() gets number of columns
from result set, not parameter
src/lib/dhcpsrv/pgsql_host_data_source.cc
PgSqlIPv6ReservationExchange
PgSqlHostIPv6Exchange - now functional
src/lib/dhcpsrv/tests/pgsql_host_data_source_unittest.cc
TEST_F(PgSqlHostDataSourceTest, get6AddrWithDuid)
TEST_F(PgSqlHostDataSourceTest, addDuplicate6WithHWAddr)
TEST_F(PgSqlHostDataSourceTest, optionsReservations6)
TEST_F(PgSqlHostDataSourceTest, optionsReservations46)
TEST_F(PgSqlHostDataSourceTest, formattedOptionsReservations6)
TEST_F(PgSqlHostDataSourceTest, formattedOptionsReservations46)
- All included and passing.
class PgSqlExchange
- getColumnLabel() - now gets column name from result set
- getColumnValue variants are now static methods
- rename column_labels_ to columns_
- isColumnNull() new method tests if column in row is null
- dumpRow() - debug method dumps row as text
src/lib/dhcpsrv/pgsql_host_data_source.cc
PgSqlHostWithOptionsExchange
PgSqlOptionExchange now functional
src/lib/dhcpsrv/tests/pgsql_host_data_source_unittest.cc
TEST_F(PgSqlHostDataSourceTest, addDuplicate4)
TEST_F(PgSqlHostDataSourceTest, formattedOptionsReservations4)
- Enabled and passing.
share/database/scripts/pgsql/dhcpdb_create.pgsql
Added entry for client_id to hosts_identifier
Added commentrary for dhcp_option_scope
Added periods to the ends of sentences.
[4275] Postgresql schema 3.0 now matches MySql schema 4.2
Added 4.1 to 4.2 updates from MySQL and created upgrade
script for 2.0 to 3.0
src/share/database/scripts/pgsql/dhcpdb_create.pgsql
- Enclosed the entire script in a single transaction
- Removed DROP TABLE statements
- Added host_identifier_type table and data
- Added dhcp_option_scope table and data
- Updated unqiue constraints for hosts table
- Added scope_id and foreign key constraint to dhcp4_options table
- Added scope_id and foreign key constraint to dhcp6_options table
- Added unique contraint to ipv6_reservations table
- Changed 'HWADDR_SOURCE_DOCSIS' to 'HWADDR_SOURCE_DOCSIS_CMTS'
- Inserted row for 'HWADDR_SOURCE_UKNOWN'
src/share/database/scripts/pgsql/dhcpdb_drop.pgsql
Added drops for host_identifier_type and dhcp_option_scope
src/share/database/scripts/pgsql/upgrade_2.0_to_3.0.sh.in
New file for upgrading Postgresql from 2.0 to 3.0
src/bin/admin/tests/pgsql_tests.sh.in
- pgsql_upgrade_1_0_to_2_0 - new function which contains all the checks used
to verify 1.0 to 2.0 upgrade (extracted from pgsql_upgrade_test)
- pgsql_upgrade_2_0_to_3_0 - new function which contains all the checks used
to verify 2.0 to 3.0 upgrade
- pgsql_upgrade_test() - modified use new upgrade check fucntions
src/share/database/scripts/pgsql/Makefile.am
Added entry for upgrade_2.0_to_3.0.sh
- lease6DumpHeader() - added labels for new columns
- lease6DumpData() - added new columns, results now sorted by
lease address
- schema_vesion - bumped version to 3
src/share/database/scripts/pgsql/dhcpdb_drop.pgsql
Added drops of new tables
src/lib/dhcpsrv/pgsql_lease_mgr.cc
- PgSqlLeaseMgr::PgSqlLeaseMgr() - added logic to detect schema
mismatch between the code and configured database
src/lib/dhcpsrv/pgsql_lease_mgr.h
- Bumped PG_CURRENT_VERSION from 2 to 3
src/bin/admin/tests/data/pgsql.lease6_dump_test.reference.csv
- Reordered entries to account for dump function sort order
- Added values for new columns on lease6 table
src/bin/admin/tests/pgsql_tests.sh.in
- pgsql_lease_version_test() - changed expected version to 3.0
- pgsql_lease6_dump_test() - added new column values to inserted rows
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.