2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-10-03 13:16:15 +00:00
Commit Graph

72 Commits

Author SHA1 Message Date
Andrei Pavel
fee2981fd3 [#2039] kea-admin lease-upload pgsql 2022-01-23 21:43:45 +00:00
Andrei Pavel
fe38a4f2dd [#2038] kea-admin lease-dump: compatibility with earlier versions of pgsql 2022-01-18 22:45:25 +02:00
Andrei Pavel
890adb0c94 [#2038] kea-admin lease-dump pgsql outputs a memfile-ready CSV 2022-01-18 22:45:25 +02:00
Thomas Markwalder
e487c18aa6 [#2244] More review comments
src/share/database/scripts/pgsql/dhcpdb_create.pgsql
src/share/database/scripts/pgsql/upgrade_007_to_008.sh.in
    Added missing constraints:
    - fk_dhcp6_options_subnet
    - fk_dhcp4_options_subnet
2022-01-07 15:27:52 -05:00
Thomas Markwalder
88c22c72bd [#2244] Addressed review comments
src/share/database/scripts/pgsql/dhcpdb_create.pgsql
src/share/database/scripts/pgsql/upgrade_007_to_008.sh.in
    Added missing indexes for foreign keys
    fixed commentary

src/share/database/scripts/pgsql/wipe_data.sh.in
    fixed commentary
2022-01-07 15:27:52 -05:00
Thomas Markwalder
6b120d85c1 [#2244] Fix mangled constraints on dhcp4_subnet_server
src/share/database/scripts/pgsql/dhcpdb_create.pgsql
src/share/database/scripts/pgsql/upgrade_007_to_008.sh.in
    - fixed mangled names in contraints
2022-01-07 15:27:52 -05:00
Thomas Markwalder
b2067110b2 [#2244] option scopes and createOptionAuditDHCP6
src/share/database/scripts/pgsql/dhcpdb_create.pgsql
    Added missing option scope values
    Replaced procedure createOptionAuditDHCP6()

src/share/database/scripts/pgsql/dhcpdb_drop.pgsql
    added drop
2022-01-07 15:26:56 -05:00
Thomas Markwalder
fbed254406 [#2244] Added missing columns to PostgreSQL schema
configure.ac
    added src/share/database/scripts/pgsql/upgrade_7.0_to_8.0.sh

src/bin/admin/tests/pgsql_tests.sh.in
    Updated to test upgrading to 8.0
    pgsql_upgrade_7_0_to_8_0() - new function

src/lib/pgsql/pgsql_connection.h
    Updated schema version

src/share/database/scripts/pgsql/Makefile.am
    added upgrade_7.0_to_8.0.sh.in

src/share/database/scripts/pgsql/dhcpdb_create.pgsql
    Adds class_id column and constraints to dhcp4/6_option_def tables
    Adds preferred lifetime columns to dhcp6_client_class

src/share/database/scripts/pgsql/upgrade_7.0_to_8.0.sh.in
    - new file
    Adds class_id column and constraints to dhcp4/6_option_def tables
    Adds preferred lifetime columns to dhcp6_client_class
2022-01-07 15:26:56 -05:00
Andrei Pavel
c160323039 [#2197] release changes 2021-11-22 12:59:15 +02:00
Thomas Markwalder
4b18d98fac [#2166] Addressed further review comments
src/share/database/scripts/pgsql/dhcpdb_drop.pgsql
src/share/database/scripts/pgsql/dhcpdb_create.pgsql
src/share/database/scripts/pgsql/upgrade_6.2_to_7.0.sh.in
    Changed server_tag parameter size to 64 to match tag column size
2021-11-09 19:26:35 +00:00
Thomas Markwalder
b2a04a9413 [#2166] Addressed review comments
src/share/database/scripts/pgsql/dhcpdb_create.pgsql
src/share/database/scripts/pgsql/upgrade_6.2_to_7.0.sh.in
    Replaced use of SMALLINT with BOOLEAN where appropriate.
    Added missing returns to two class functions

src/share/database/scripts/pgsql/dhcpdb_drop.pgsql
    updated to match new boolean funcs
2021-11-09 19:26:35 +00:00
tmark
384c734547 [#2166] More client class function corrections
src/share/database/scripts/pgsql/dhcpdb_create.pgsql
src/share/database/scripts/pgsql/update_6.2_to_7.0.sh.in
    Corrected column/variable ambiguity more issues with client class functions
2021-11-09 19:26:35 +00:00
Thomas Markwalder
57a94f2bbe [#2166] Fixed errors in client class functions
src/bin/admin/tests/pgsql_tests.sh.in
    Fixeda another shell check complaint.

src/share/database/scripts/pgsql/dhcpdb_create.pgsql
src/share/database/scripts/pgsql/upgrade_6.2_to_7.0.sh.in
    - Changed subnet id columns in options tables to BIGINT
    - Fixed column/variable ambiguities in client class functions
2021-11-09 19:26:35 +00:00
Thomas Markwalder
868a65b179 [#2166] More corrections based on manual testing
src/share/database/scripts/pgsql/dhcpdb_create.pgsql
src/share/database/scripts/pgsql/upgrade_6.2_to_7.0.sh.in
    - Removed id=1 from dhcpX_server inserts, id is SERIAL and
    must increment itself
    - Changed dhcpX_subnet::subnet_id from SERIAL to BIGINT to
    allow for manual ID assignments
    - Removed 'STRICT' from SELECT INTO statements, this causes NULL
    returns to throw
    - Return OLD from all BEFORE triggers
2021-11-09 19:26:35 +00:00
Thomas Markwalder
ab3fcdd674 [#2166] Added session value setter functions
src/bin/admin/tests/pgsql_tests.sh.in
    pgsql_upgrade_6_2_to_7_0()  - added session variable tests

src/share/database/scripts/pgsql/dhcpdb_create.pgsql
src/share/database/scripts/pgsql/upgrade_6.2_to_7.0.sh.in
    Added set_session_value functions
    Cleaned up get_session_* functions
    Whitespace cleanup

src/share/database/scripts/pgsql/dhcpdb_drop.pgsql
    Added session variable functions
2021-11-09 19:26:35 +00:00
tmark
658a424d03 [#2166] Added pgsql session value fetch functions
src/share/database/scripts/pgsql/dhcpdb_create.pgsql
src/share/database/scripts/pgsql/upgrade_6.2_to_7.0.sh.in
src/share/database/scripts/pgsql/dhcpdb_drop.pgsql
    Added functions for getting config session
    values that handle unset and NULL values
2021-11-09 19:26:35 +00:00
Thomas Markwalder
c6bbd461cb [#2166] create-drop fixes and 9.2 compatibility
src/share/database/scripts/pgsql/dhcpdb_create.pgsql
src/share/database/scripts/pgsql/upgrade_6.2_to_7.0.sh.in
    added "OR REPLACE" to function creates
    made all TIMESTAMP elements "WITH TIME ZONE"
    replaced use of ON CONFLICT

src/share/database/scripts/pgsql/dhcpdb_drop.pgsql
    Added arguments to function drops. Posgresql requires argument
    lists to match to drop a function.
2021-11-09 19:26:35 +00:00
tmark
6ac227cb79 [#2166] Added missing CB elements to postgresql schema
Initial commit.

src/bin/admin/tests/pgsql_tests.sh.in
    pgsql_upgrade_6_2_to_7_0()  - replaced insert into dhcp6_server
    with selects. Inserting fails without an audit-revision to match.

src/share/database/scripts/pgsql/dhcpdb_create.pgsql
    Reduced to a single transaction and commit to avoid partial
    creations.

    Added CB audit procedures, trigger functions, triggers, and
    client class elements for v4 and v6.

src/share/database/scripts/pgsql/dhcpdb_drop.pgsql
    Added drops of new elements.

src/share/database/scripts/pgsql/upgrade_6.2_to_7.0.sh.in
    Added CB audit procedures, trigger functions, triggers, and
    client class elements for v4 and v6.
2021-11-09 19:26:35 +00:00
Tomek Mrugalski
9a624d3630 [#1848] createAuditRevisionDHCP4 proc added 2021-10-28 12:32:28 +02:00
Andrei Pavel
961707d2c4 [#90] add ON DELETE action on dhcp6_subnet_server 2021-10-28 12:31:41 +02:00
Tomek Mrugalski
5281de721a [#90] tag shortened to 64 bytes 2021-10-28 12:31:41 +02:00
Tomek Mrugalski
afea833b38 [#90] Added dhcp4_shared_network_server table 2021-10-28 12:31:41 +02:00
Tomek Mrugalski
8b2675373b [#90] Added dhcp4_subnet_server table 2021-10-28 12:31:41 +02:00
Tomek Mrugalski
33f8449075 [#90] Added missing constraints 2021-10-28 12:31:41 +02:00
Tomek Mrugalski
a6a1425434 [#90] Updated capitalization, removed extra byte for \0 2021-10-28 12:31:41 +02:00
Tomek Mrugalski
98d46dc464 [#90] Spurious space removed 2021-10-28 12:31:41 +02:00
Tomek Mrugalski
dd9c2fed66 [#90] 2 issues fixed in 7.0 schema creation
- data inserted into incorrect dhcpX_server table
 - duplicate creation of dhcp4_options_server removed
2021-10-28 12:31:41 +02:00
Tomek Mrugalski
a4b5772cd9 [#90] Updated pgsql schema creation script 2021-10-28 12:31:41 +02:00
Tomek Mrugalski
f64d0aa357 [#90] Added 7.0 code to dhcpdb_create.pgsql 2021-10-28 12:31:41 +02:00
Marcin Siodelski
4b2396e908 [#1428] Fixed some typos
- regarless -> regardless
- faciliate -> facilitate
- removed spurious blank line

as a result of review.
2020-10-05 13:14:57 +00:00
Marcin Siodelski
99c44ffd31 [#1428] Allow non-unique IPs in MySQL and PgSQL
Introduced new host API function which allows for configuring selected
backends to accept non-unique IP reservations for multiple hosts. Support
for it was added in MySQL, Postgres and Kea config file. It is not
supported in Cassandra. New migrations for MySQL and Postgres have been
created.
2020-10-05 13:14:57 +00:00
Wlodek Wencel
099412a53c [#1288] code changes for 1.7.9 release 2020-06-22 13:57:32 +02:00
Francis Dupont
571fa79782 [#1196] Checkpoint: fixed pgsql 2020-06-19 17:04:50 +02:00
Francis Dupont
5cde4dd5d3 [393-global-search-through-leases-by-mac-or-hostname-w-o-specifying-a-subnet-id] Addressed comments 2019-10-25 17:26:23 +02:00
Francis Dupont
465cfbd920 [393-global-search-through-leases-by-mac-or-hostname-w-o-specifying-a-subnet-id] Moves lease hostnames to lower case 2019-10-25 17:26:23 +02:00
Francis Dupont
12f3c6d909 [392-search-of-reservations-by-hostname] Checkpoint: updated shcemas, todo tests 2019-10-15 11:45:32 +02:00
Francis Dupont
d8276f1036 [550-authentication-key-to-text-method-miss-spelled] AuthKey is binary 2019-07-02 17:33:39 +02:00
Marcin Siodelski
cee51915c5 [288,!158] Changed references from RFC3315 to RFC8415 in the src code. 2018-12-06 08:20:09 -05:00
Tomek Mrugalski
61267ca824 [github88] CQL/SQL scripts corrected (unit-tests in src/bin/admin now pass) 2018-07-23 16:03:40 +02:00
mayya
f30ca44685 review comments 2
review comments 2

test1

fixed unit tests

fixed cassandra

fixed cassandra2
2018-07-23 13:37:01 +02:00
mayya
beeadf3d59 [lib] Address review comments for #83
See  #88 for review comments

modified upgrade files

modified tests
2018-07-23 13:35:50 +02:00
mayya
2090af48c1 [lib] Extend host structure to support auth keys for reconfiguration.
See issue #83
2018-07-23 13:31:03 +02:00
Francis Dupont
9591b8faaa [5584] Addressed comments 2018-07-07 19:19:15 +02:00
Tomek Mrugalski
e0216b1d54 [5584] Minor changes after review. 2018-07-06 16:37:39 +02:00
Francis Dupont
66f4a42a9b [5584] Checkpoint: core code and test done 2018-06-22 01:05:09 +02:00
Francis Dupont
fe5098fdb3 [5584] Checkpoint: updated schema, code and partially tests 2018-06-21 11:15:48 +02:00
Thomas Markwalder
b0bea19c48 [5587] PostgreSQL support for shared lease stats implementation
src/share/database/scripts/pgsql/dhcpdb_create.pgsql
    Adds lease<4/6>_stat tables and triggers
src/share/database/scripts/pgsql/dhcpdb_drop.pgsql
    Added drops for lease<4/6>_stat tables and triggers

src/share/database/scripts/pgsql/upgrade_3.3_to_4.0.sh.in
    Adds lease<4/6>_stat tables and triggers
    Populates stat tables from existing lease table content
src/bin/admin/tests/mysql_tests.sh.in
    mysql_lease6_stat_per_type() - fixed typo in test

src/bin/admin/tests/pgsql_tests.sh.in
    run_statement() - new convenience fucntion for
    running statement with option expected outcome

    pgsql_upgrade_schema_to_version() - new function
    which converts the existing schema to a target version

    pgsql_lease4_stat_test() - tests v4 stat table and
    triggers in an new database

    pgsql_lease6_stat_test() - tests v6 stat table and
    triggers in an new database.

    pgsql_lease6_stat_per_type() - helper function which
    tests v6 stat table and triggers using a given address
    and lease type

    pgsql_lease_stat_upgrade_test() - tests data migration,
    stat table and trigger operations on an upgraded database

src/lib/dhcpsrv/pgsql_lease_mgr.*
    Added new SQL statements for lease stats queries

    PgSqlLeaseStatsQuery
        Constructors - added variants to support where clause params
        start() - modified to support query variants based
        on where clause params

    PgSqlLeaseMgr
        Added start variants:
        - startSubnetLeaseStatsQuery4(const SubnetID& subnet_id)
        - startSubnetRangeLeaseStatsQuery4(const SubnetID& first_subnet_id,
                                         const SubnetID& last_subnet_id)

src/lib/dhcpsrv/tests/pgsql_lease_mgr_unittest.cc
    New unit tests:
    - TEST_F(PgSqlLeaseMgrTest, leaseStatsQuery4)
    - TEST_F(PgSqlLeaseMgrTest, leaseStatsQuery6)
2018-05-09 14:36:37 -04:00
Tomek Mrugalski
8cd0c1ae41 [master] Merge branch 'github70' (missing CQL backend features)
- host delete
 - user-contexts
 - DHCPv4 fixed fields
 - also PostgreSQL now stores hwaddr type and hwaddr source

# Conflicts:
#	src/lib/dhcpsrv/tests/pgsql_host_data_source_unittest.cc
2018-03-12 18:02:29 +00:00
Thomas Markwalder
d1dd0f2e27 [master] subnet_id column types now consistent in schemas
Merges in branch 'trac5522'
2018-03-05 15:01:29 -05:00
Tomek Mrugalski
53fe223c7a Merge branch 'cassandra_improvements' of https://github.com/razvan-becheriu/kea into github70 2018-03-05 14:56:47 +01:00