]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[4277] Added several @todos and fixed formatting.
authorTomek Mrugalski <tomasz@isc.org>
Mon, 25 Jul 2016 18:04:20 +0000 (20:04 +0200)
committerTomek Mrugalski <tomasz@isc.org>
Mon, 25 Jul 2016 18:04:20 +0000 (20:04 +0200)
src/lib/dhcpsrv/mysql_host_data_source.cc
src/lib/dhcpsrv/pgsql_host_data_source.cc
src/lib/dhcpsrv/pgsql_host_data_source.h
src/lib/dhcpsrv/tests/pgsql_exchange_unittest.cc

index 13748dcf2c8ef76b61944f1eac6d7f6c2a0b5a51..150a10391e88b9fc80b28b4a52a913a24ffcf9b2 100644 (file)
@@ -2321,6 +2321,7 @@ MySqlHostDataSource::get4(const SubnetID& subnet_id,
 ConstHostPtr
 MySqlHostDataSource::get4(const SubnetID& subnet_id,
                           const asiolink::IOAddress& address) const {
+    /// @todo: check that address is really v4, not v6.
 
     // Set up the WHERE clause value
     MYSQL_BIND inbind[2];
@@ -2387,6 +2388,7 @@ MySqlHostDataSource::get6(const SubnetID& subnet_id,
 ConstHostPtr
 MySqlHostDataSource::get6(const asiolink::IOAddress& prefix,
                           const uint8_t prefix_len) const {
+    /// @todo: Check that prefix is v6 address, not v4.
 
     // Set up the WHERE clause value
     MYSQL_BIND inbind[2];
index 080de03bf37e029a4baf5335e076012cd1a3f18c..33a75ed262aebd29a2c0cffe875240bcdb8ff5b5 100644 (file)
@@ -1848,6 +1848,8 @@ PgSqlHostDataSource::get6(const SubnetID& subnet_id,
 ConstHostPtr
 PgSqlHostDataSource::get6(const asiolink::IOAddress& prefix,
                           const uint8_t prefix_len) const {
+    /// @todo: Check that prefix is v6 address, not v4.
+
     // Set up the WHERE clause value
     PsqlBindArrayPtr bind_array(new PsqlBindArray());
 
index e4703e25803f8194da9afab81b6e8288b17365f6..084a88f074ac242c778b538c0ade6729e3994e38 100644 (file)
@@ -23,7 +23,7 @@ class PgSqlHostDataSourceImpl;
 /// the PostgreSQL database. Use of this backend presupposes that a PostgreSQL
 /// database is available and that the Kea schema has been created within it.
 ///
-/// Reservations are uniquely identified by identifier type and value. Currently
+/// Reservations are uniquely identified by identifier type and value.
 /// The currently supported values are defined in @ref Host::IdentifierType
 /// as well as in host_identifier_table:
 ///
index c708cb86e006680a1627d7ef8703ef965c28b063..75547a9fac01b79d400fd1186fac950251d1b669 100755 (executable)
@@ -489,15 +489,13 @@ TEST_F(PgSqlBasicsTest, byteaTest) {
     ASSERT_THROW(PgSqlExchange::convertFromBytea(*r, row, BYTEA_COL,
                                                  fetched_bytes,
                                                  sizeof(fetched_bytes),
-                                                 byte_count),
-                 DbOperationError);
+                                                 byte_count), DbOperationError);
 
     // Verify that too small of a buffer throws
     ASSERT_THROW(PgSqlExchange::convertFromBytea(*r, 0, BYTEA_COL,
                                                  fetched_bytes,
                                                  sizeof(fetched_bytes) - 1,
-                                                 byte_count),
-                  DbOperationError);
+                                                 byte_count), DbOperationError);
 
     // Clean out the table
     WIPE_ROWS(r);
@@ -567,8 +565,7 @@ TEST_F(PgSqlBasicsTest, bigIntTest) {
 
     // While we here, verify that bad row throws
     ASSERT_THROW(PgSqlExchange::getColumnValue(*r, row, BIGINT_COL,
-                                               fetched_int),
-                 DbOperationError);
+                                               fetched_int), DbOperationError);
 
     // Clean out the table
     WIPE_ROWS(r);
@@ -817,8 +814,7 @@ TEST_F(PgSqlBasicsTest, varcharTest) {
 
     // While we here, verify that bad row throws
     ASSERT_THROW(PgSqlExchange::getColumnValue(*r, row, VARCHAR_COL,
-                                               fetched_str),
-                 DbOperationError);
+                                               fetched_str), DbOperationError);
 
     // Clean out the table
     WIPE_ROWS(r);
@@ -902,8 +898,7 @@ TEST_F(PgSqlBasicsTest, timeStampTest) {
 
     // While we here, verify that bad row throws
     ASSERT_THROW(PgSqlExchange::getColumnValue(*r, row, TIMESTAMP_COL,
-                                               fetched_str),
-                 DbOperationError);
+                                               fetched_str), DbOperationError);
 
     // Clean out the table
     WIPE_ROWS(r);
@@ -922,8 +917,7 @@ TEST_F(PgSqlBasicsTest, timeStampTest) {
     // Verify exceeding max time throws
     ASSERT_THROW(PgSqlExchange::convertToDatabaseTime(times[0],
                                                       DatabaseConnection::
-                                                      MAX_DB_TIME),
-                 BadValue);
+                                                      MAX_DB_TIME), BadValue);
 }
 
 }; // namespace