]> git.ipfire.org Git - thirdparty/kea.git/commit
[3601] Addressed review comments, added ability to downgrade
authorThomas Markwalder <tmark@isc.org>
Tue, 10 Nov 2015 14:20:44 +0000 (09:20 -0500)
committerThomas Markwalder <tmark@isc.org>
Tue, 10 Nov 2015 14:20:44 +0000 (09:20 -0500)
commit91a4978e3045a547921f357ffea90bb48fca37c5
treead927c177d4a09be409fe98be666ae9c1abd222a
parent91a9427f7feaadb4b18bcd2c151918ae3e0510b6
[3601] Addressed review comments, added ability to downgrade

Several minor cleanup items based on review comments.  Implemented
support for downgrading files from newer schema versions:

doc/guide/admin.xml
    amended text on upgrading memfile to discuss downgrading

src/lib/dhcpsrv/dhcpsrv_messages.mes
src/lib/dhcpsrv/lease_file_loader.h
    revamped log messages to accomodate downgrading

src/lib/dhcpsrv/memfile_lease_mgr.cc
src/lib/dhcpsrv/memfile_lease_mgr.h
    added commentary to MemfileLeaseMgr ctor
    automatic conversion logic accomdates both upgrading and downgrading

src/lib/dhcpsrv/tests/csv_lease_file4_unittest.cc
src/lib/dhcpsrv/tests/csv_lease_file6_unittest.cc
    replaced tooManyHeaderColumns test with downGrade test

src/lib/util/csv_file.h
src/lib/util/csv_file.cc
    added CSVRow::trim()

src/lib/util/tests/csv_file_unittest.cc
    added CSVRow.trim test

src/lib/util/tests/versioned_csv_file_unittest.cc
    added VersionedCSVFileTest.currentSchemaTest test
    replaced tooManyHeaderColumns test with downGrading test
    revamped tests to check  getInputSchemaState() and needsConversion()

src/lib/util/versioned_csv_file.h
    Updated commentary to describe downgrade support

src/lib/util/versioned_csv_file.cc
    enum InputSchemaState
    input_schema_state_
    input_header_count_
    getInputHeaderCount()
    getInputSchemaState()
    needsConversion()

    next(CSVRow& row) - now supports downgrading rows
    validateHeder() -  now throws if called when no schema has been defined,
    and supports downgrading rows
13 files changed:
doc/guide/admin.xml
src/lib/dhcpsrv/dhcpsrv_messages.mes
src/lib/dhcpsrv/lease_file_loader.h
src/lib/dhcpsrv/memfile_lease_mgr.cc
src/lib/dhcpsrv/memfile_lease_mgr.h
src/lib/dhcpsrv/tests/csv_lease_file4_unittest.cc
src/lib/dhcpsrv/tests/csv_lease_file6_unittest.cc
src/lib/util/csv_file.cc
src/lib/util/csv_file.h
src/lib/util/tests/csv_file_unittest.cc
src/lib/util/tests/versioned_csv_file_unittest.cc
src/lib/util/versioned_csv_file.cc
src/lib/util/versioned_csv_file.h