2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 21:45:37 +00:00
Commit Graph

23067 Commits

Author SHA1 Message Date
Thomas Markwalder
3466f6506d [4277] Fixed PsqlBindArray.basicOperation unit test
Fixed test now that PsqlBindArray.toText() works right.
2016-06-24 14:35:10 -04:00
Thomas Markwalder
0ce4fe5b36 [4277] Fixed bug in PsqlBindArray:toText 2016-06-24 14:30:35 -04:00
Thomas Markwalder
3c22198304 [4277] Rollback test passes
tests/pgsql_host_data_source_unittest.cc
    TEST_F(PgSqlHostDataSourceTest, testAddRollback) now
    functions and passes
2016-06-24 13:22:20 -04:00
Thomas Markwalder
8f21305bd3 [4277] IPv6 Reservations now functional
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.
2016-06-24 11:56:07 -04:00
Thomas Markwalder
3c01633e93 [4277] PgSqlHostWithOptionsExchange, PgSqlOptionExchange now functional
src/lib/dhcpsrv/pgsql_connection.h
    Added OID_TEXT

src/lib/dhcpsrv/pgsql_exchange.cc
    PsqlBindArray::addNull()

    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.
2016-06-24 07:31:24 -04:00
Thomas Markwalder
8047f97887 [4277] Insert and fetch IPv4 Hosts plus tests work (without options)
src/lib/dhcpsrv/host_data_source_factory.cc
    HostDataSourceFactory::create() - now instantiates PgSqlHostDataSource

src/lib/dhcpsrv/pgsql_host_data_source.cc
    Enabled basic IPv4 host statements and methods

src/lib/dhcpsrv/tests
    New file: pgsql_host_data_source_unittest.cc

src/lib/dhcpsrv/tests/Makefile.am
    Added pgsql_host_data_source_unittest.cc
2016-06-22 07:40:52 -04:00
Thomas Markwalder
7e11527e91 [4277] Pull 4275 changes
Merge branch 'master' into trac4277
2016-06-22 07:28:21 -04:00
Thomas Markwalder
334289573e [4277] Bare bones implementation of PgSqlHostDataSource
src/lib/dhcpsrv
    pgsql_host_data_source.c
    pgsql_host_data_source.h  - new files, preliminary implementation

src/lib/dhcpsrv/Makefile.am
    Added new files pgsql_host_data_source.cc, pgsql_host_data_source.h

src/lib/dhcpsrv/dhcpsrv_messages.mes
    Added log messages DHCPSRV_PGSQL_HOST_DB_GET_VERSION, DHCPSRV_PGSQL_START_TRANSACTION

src/lib/dhcpsrv/pgsql_connection.cc
src/lib/dhcpsrv/pgsql_connection.h
    Added PgSqlTransaction
    Added PgSqlConnection::startTransaction()

src/lib/dhcpsrv/pgsql_exchange.cc
src/lib/dhcpsrv/pgsql_exchange.h
    PsqlBindArray
    - Added storage of conversion strings used for bound values
    - Added add() variants for uint8_t, IOAddress, uint8_t buffer
    - Added templated variant for miscellaneous types

    PgSqlExchange
    - Removed getColumnValue variants for various integers, replaced
    with templated version for miscellaneous types

src/lib/dhcpsrv/pgsql_lease_mgr.cc
    Added todo comment to remember to account for hwaddr columns added to lease6

src/lib/dhcpsrv/tests/pgsql_exchange_unittest.cc
    TEST(PsqlBindArray, basicOperation) - new test to exercise bind functions
2016-06-21 13:21:40 -04:00
Thomas Markwalder
f15c1a1190 [master] Added ChangeLog 1132 for #4275 trac4500_base 2016-06-21 11:56:56 -04:00
Thomas Markwalder
6f8e646bee [master] PostgreSQL schema 3.0, support for host reservations
Merges in branch 'trac4275'
2016-06-21 11:36:03 -04:00
Thomas Markwalder
0433e62cdb [4275] Addressed review comments
bin/admin/tests/pgsql_tests.sh.in
    Typos
share/database/scripts/pgsql/.gitignore
    Added upgrade_2.0_to_3.0.sh

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.
2016-06-21 11:33:16 -04:00
Francis Dupont
bf370fb390 [master] Updated git hash trac4109a_base 2016-06-16 20:28:46 +02:00
Francis Dupont
1ce1cba00a [master] Finished merge of trac4106_update (DHCP4o6 IPC) 2016-06-16 20:27:44 +02:00
Francis Dupont
5d69cd905d [master] Merged trac4106_update (DHCP4o6 IPC) 2016-06-16 20:24:43 +02:00
Francis Dupont
828ef3991e [4106_update] Addressed last comments 2016-06-16 18:48:36 +02:00
Tomek Mrugalski
d8280d80c1 [4106_update] Added comment to createDHCPv4MsgOption() 2016-06-16 15:14:29 +02:00
Thomas Markwalder
a7db35543a [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

configure.ac
    Added src/share/database/scripts/pgsql/upgrade_2.0_to_3.0.sh

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
2016-06-15 10:52:14 -04:00
Francis Dupont
2af3e84345 [4106_update] Addressed comments 2016-06-15 16:02:39 +02:00
Francis Dupont
7299124ae6 [master] Updated licence 2016-06-15 15:56:28 +02:00
Thomas Markwalder
67e12a028b [4275] Brought Postgresql schema up to MySQL 4.1 content
Postresql schema now supports host reservations with options,
and lease6 table now includes hardware address and source

src/share/database/scripts/pgsql/dhcpdb_create.pgsql
    Added Schema 3.0 upgrade section:
    - new tables: hosts, dhcp4_options, dhcp6_options,
      ipv6_reservations, lease_hwaddr_source

    - lease4Dumpdata() - results now sorted by lease address

    - lease6 table - added columns hwaddr, hwtype, hwaddr_source

    - 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
2016-06-14 15:51:08 -04:00
Marcin Siodelski
2ac1a5f0fc [master] Added ChangeLog entry for #3573. fdxhook_base 2016-06-14 09:16:37 +02:00
Marcin Siodelski
c29551e430 [master] Merge branch 'trac3573' 2016-06-14 08:47:41 +02:00
Francis Dupont
e7324065c5 [master] typo 2016-06-13 23:43:40 +02:00
Marcin Siodelski
774b4fa4fe [3573] Addressed review comments.
Decided to not move the HostTest::doExchange class to the test
utils as it would cause circular dependency.
2016-06-13 21:00:50 +02:00
Marcin Siodelski
3004ceae1c [master] Merge branch 'trac4320' 2016-06-13 11:31:40 +02:00
Marcin Siodelski
de29ab0fe2 [4320] Fix doxygen errors as a result of the review. 2016-06-13 11:30:31 +02:00
Marcin Siodelski
ad8881db1c [master] Added ChangeLog entry for #4498. 2016-06-10 16:53:10 +02:00
Marcin Siodelski
14716853a9 [master] Merge branch 'trac4498' 2016-06-10 16:22:56 +02:00
Marcin Siodelski
aa0bfc575d [4498] Addressed review comment: renamed 2 libdhcp++ tests. 2016-06-10 16:15:35 +02:00
Shawn Routhier
a0f20e3766 [trac4498] Fix some typos and copyrights 2016-06-09 23:28:50 -07:00
Francis Dupont
c9a717143b [4106_update] Disable openError on Linux 2016-06-09 15:29:35 +02:00
Francis Dupont
138586ec80 [4106_update] Removed invalidPortError6 (was moved to dhcp6/tests) 2016-06-09 15:24:58 +02:00
Francis Dupont
fe532755ef [4106_update] Ported and improved code from old trac4106 including unit tests 2016-06-09 14:22:08 +02:00
Tomek Mrugalski
3f6b567883 [master] ChangeLog updated. trac4272a_base 2016-06-09 13:24:49 +02:00
Tomek Mrugalski
7c74ecdbb6 [master] Merge branch 'trac4308' (interface selection based on name) 2016-06-09 12:35:44 +02:00
Marcin Siodelski
ae890cc840 [master] Added ChangeLog entry for #3572. 2016-06-09 11:07:22 +02:00
Marcin Siodelski
49f67aaf36 [master] Merge branch 'trac3572' 2016-06-09 10:46:14 +02:00
Tomek Mrugalski
da0a231b62 [4308] Minor comment correction. 2016-06-08 21:07:46 +02:00
Tomek Mrugalski
f2bb606118 [4308] Changes after review
- .arg() calls now in separate lines
 - clarified comment about clients meeting client class criteria
2016-06-08 20:55:06 +02:00
Marcin Siodelski
2487e1e223 [3572] Addressed review comments. 2016-06-08 18:27:40 +02:00
Marcin Siodelski
d610482fdc [master] Added ChangeLog entry for #4317. trac4106_update_base 2016-06-08 17:07:15 +02:00
Marcin Siodelski
5f14fca1e0 [master] Merge branch 'trac4317' 2016-06-08 16:44:53 +02:00
Francis Dupont
3a3cc67627 [master] Updating git hash 2016-06-08 16:19:19 +02:00
Francis Dupont
3223bb8280 [master] Finished merge of trac4106 (DHCPv4-over-DHCPv6 IPC) 2016-06-08 16:18:26 +02:00
Francis Dupont
ca4d87e790 [master] Merged trac4106 (DHCPv4-over-DHCPv6 IPC) 2016-06-08 16:16:08 +02:00
Francis Dupont
3917a1b8df [4106_rebase] Addressed last comments before merging 2016-06-08 16:14:35 +02:00
Marcin Siodelski
279a86be11 [4317] Addressed review comments. 2016-06-08 16:00:38 +02:00
Shawn Routhier
25a2992430 [trac4308] Tidy up some typos and copyright statements 2016-06-07 22:57:53 -07:00
Wlodek Wencel
d2da227c2b [master] ChangeLog entries renumbered 2016-06-07 11:45:02 +02:00
Shawn Routhier
98d0fbdf96 [master] update change log entry 2016-06-06 13:17:07 -07:00