]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
fixed pull request
authorRazvan Becheriu <razvan.becheriu@qualitance.com>
Thu, 31 Aug 2017 12:50:45 +0000 (15:50 +0300)
committerRazvan Becheriu <razvan.becheriu@qualitance.com>
Thu, 31 Aug 2017 12:50:45 +0000 (15:50 +0300)
14 files changed:
doc/guide/dhcp4-srv.xml
doc/guide/dhcp6-srv.xml
src/bin/dhcp6/tests/get_config_unittest.cc
src/lib/dhcpsrv/cfg_db_access.cc
src/lib/dhcpsrv/cfg_option.cc
src/lib/dhcpsrv/cql_exchange.cc
src/lib/dhcpsrv/cql_exchange.h
src/lib/dhcpsrv/cql_lease_mgr.cc
src/lib/dhcpsrv/dhcpsrv_messages.mes
src/lib/dhcpsrv/lease_mgr.h
src/lib/dhcpsrv/memfile_lease_mgr.cc
src/lib/dhcpsrv/memfile_lease_mgr.h
src/lib/dhcpsrv/tests/cql_lease_mgr_unittest.cc
src/lib/dhcpsrv/tests/lease_mgr_unittest.cc

index b73a8167999c42b18abb61fa9bf0fef77d7e348c..341742374f6cb1c9d25117cd943dee7ef5a17e8a 100644 (file)
@@ -461,7 +461,7 @@ be followed by a comma and another object definition.</para>
 </screen>
   For Cassandra, multiple contact points can be provided:
 <screen>
-"Dhcp4": { "lease-database": { <userinput>"contact_points": "<replaceable>remote-host-name[, ...] </replaceable>"</userinput>, ... }, ... }
+"Dhcp4": { "lease-database": { <userinput>"contact-points": "<replaceable>remote-host-name[, ...] </replaceable>"</userinput>, ... }, ... }
 </screen>
   The usual state of affairs will be to have the database on the same machine as
   the DHCPv4 server.  In this case, set the value to the empty string:
@@ -470,7 +470,7 @@ be followed by a comma and another object definition.</para>
 </screen>
   For Cassandra:
 <screen>
-"Dhcp4": { "lease-database": { <userinput>"contact_points": ""</userinput>, ... }, ... }
+"Dhcp4": { "lease-database": { <userinput>"contact-points": ""</userinput>, ... }, ... }
 </screen>
   Should the database use a port different than default, it may be
   specified as well:
index c6bf0dc80448cf956d47470b6d12d85645f5e876..723b4a7f66673b68131ff3d5a2dd690f67d22be1 100644 (file)
@@ -456,7 +456,7 @@ be followed by a comma and another object definition.</para>
 </screen>
   For Cassandra, multiple contact points can be provided:
 <screen>
-"Dhcp6": { "lease-database": { <userinput>"contact_points": "<replaceable>remote-host-name[, ...]</replaceable>" </userinput>, ... }, ... }
+"Dhcp6": { "lease-database": { <userinput>"contact-points": "<replaceable>remote-host-name[, ...]</replaceable>" </userinput>, ... }, ... }
 </screen>
   The usual state of affairs will be to have the database on the same machine as
   the DHCPv6 server.  In this case, set the value to the empty string:
@@ -465,7 +465,7 @@ be followed by a comma and another object definition.</para>
 </screen>
   For Cassandra:
 <screen>
-"Dhcp6": { "lease-database": { <userinput>"contact_points": ""</userinput>, ... }, ... }
+"Dhcp6": { "lease-database": { <userinput>"contact-points": ""</userinput>, ... }, ... }
 </screen>
   Should the database use a port different than default, it may be
   specified as well:
index 901e954336bb0957c9e8be307133c09d4c713842..a5bbb142b22a86acfd2bc4b78bf6cdc7306fb521 100644 (file)
@@ -3204,7 +3204,7 @@ const char* UNPARSED_CONFIGS[] = {
 "                    {\n"
 "                        \"always-send\": false,\n"
 "                        \"code\": 7,\n"
-"                        \"csv-format\": false,\n"
+"                        \"csv-format\": true,\n"
 "                        \"data\": \"01\",\n"
 "                        \"name\": \"preference\",\n"
 "                        \"space\": \"dhcp6\"\n"
index e93631dc7b6cd1c9803903703f3e53c6d3409eb5..366cdf4be2bd4e37f7a0723bd9e3eeb8cabf4dd1 100644 (file)
@@ -108,7 +108,7 @@ CfgDbAccess::toElementDbAccessString(const std::string& dbaccess) {
                        (keyword == "password") ||
                        (keyword == "host") ||
                        (keyword == "name") ||
-                       (keyword == "contact_points") ||
+                       (keyword == "contact-points") ||
                        (keyword == "keyspace")) {
                 result->set(keyword, Element::create(value));
             } else {
index 5d6c153918fc9ed6cd17d4a68d31127728c19410..f59d78ae26e81ffc096dc04a8a442be417bfe454 100644 (file)
@@ -169,9 +169,9 @@ CfgOption::mergeInternal(const OptionSpaceContainer<OptionContainer,
             // If there is no such option in the destination container,
             // add one.
             if (std::distance(range.first, range.second) == 0) {
-                dest_container.addItem(OptionDescriptor(src_opt->option_,
-                                                        src_opt->persistent_),
-                                       *it);
+                dest_container.addItem(OptionDescriptor(
+                    src_opt->option_, src_opt->persistent_,
+                    src_opt->formatted_value_), *it);
             }
         }
     }
index ee43993caa5741b9294ec89e5ed81e132fde5152..c6d72bca12339a76943de56f901c74f8e914da78 100644 (file)
@@ -704,11 +704,12 @@ CqlExchange::~CqlExchange() {
 
 void
 CqlExchange::convertToDatabaseTime(const time_t& cltt,
-                                   const cass_int64_t& valid_lifetime,
+                                   const uint32_t& valid_lifetime,
                                    cass_int64_t& expire) {
-    // Calculate expiry time. Store it in the 64-bit value so as we can
+    // Calculate expire time. Store it in the 64-bit value so as we can
     // detect overflows.
-    cass_int64_t expire_time = static_cast<cass_int64_t>(cltt) + valid_lifetime;
+    cass_int64_t expire_time = static_cast<cass_int64_t>(cltt) +
+            static_cast<cass_int64_t>(valid_lifetime);
 
     if (expire_time > DatabaseConnection::MAX_DB_TIME) {
         isc_throw(BadValue,
index 2f4f86ee24624072b60a5c9261f844c44e45d7f5..837fb015935eee779e91cd74d11b712ce9b2a4b9 100644 (file)
@@ -139,7 +139,7 @@ public:
     /// @name Time conversion:
     /// @{
     static void convertToDatabaseTime(const time_t& cltt,
-                                      const cass_int64_t& valid_lifetime,
+                                      const uint32_t& valid_lifetime,
                                       cass_int64_t& expire);
     static void convertFromDatabaseTime(const cass_int64_t& expire,
                                         const cass_int64_t& valid_lifetime,
index 9b4314cc9e5a14a13b2605945aed5afaf4734366..d35184acba5192b479568812b2951dd2ecf62694 100644 (file)
@@ -33,10 +33,6 @@ namespace dhcp {
 static constexpr size_t HOSTNAME_MAX_LEN = 255u;
 static constexpr size_t ADDRESS6_TEXT_MAX_LEN = 39u;
 
-static const CassBlob NULL_HWADDR({0x00, 0x00, 0x00, 0x00, 0x00, 0x00});
-static const CassBlob NULL_CLIENTID({0x00, 0x00, 0x00, 0x00, 0x00, 0x00});
-static const CassBlob NULL_PRIVACY_HASH({0x00, 0x00, 0x00, 0x00, 0x00, 0x00});
-
 /// @brief Common CQL and Lease Data Methods
 ///
 /// The CqlLease4Exchange and CqlLease6Exchange classes provide the
@@ -343,7 +339,7 @@ CqlLease4Exchange::createBindForInsert(const Lease4Ptr &lease, AnyArray &data) {
         }
 
         // valid lifetime: bigint
-        valid_lifetime_ = static_cast<cass_int32_t>(lease_->valid_lft_);
+        valid_lifetime_ = static_cast<cass_int64_t>(lease_->valid_lft_);
 
         // expire: bigint
         // The lease structure holds the client last transmission time
@@ -442,7 +438,7 @@ CqlLease4Exchange::createBindForUpdate(
         }
 
         // valid lifetime: bigint
-        valid_lifetime_ = static_cast<cass_int32_t>(lease_->valid_lft_);
+        valid_lifetime_ = static_cast<cass_int64_t>(lease_->valid_lft_);
 
         // expire: bigint
         // The lease structure holds the client last transmission time
@@ -600,14 +596,6 @@ CqlLease4Exchange::retrieve() {
 
         uint32_t addr4 = static_cast<uint32_t>(address_);
 
-        if (hwaddr->hwaddr_ == NULL_HWADDR) {
-            hwaddr->hwaddr_.clear();
-        }
-
-        if (client_id_ == NULL_CLIENTID) {
-            client_id_.clear();
-        }
-
         Lease4Ptr result(new Lease4(addr4, hwaddr, client_id_.data(),
                                     client_id_.size(), valid_lifetime_, 0, 0,
                                     cltt, subnet_id_, fqdn_fwd_, fqdn_rev_,
@@ -1202,7 +1190,7 @@ CqlLease6Exchange::createBindForDelete(
     // Set up the structures for the various components of the lease4
     // structure.
     try {
-        // address: int
+        // address: varchar
         // The address in the Lease structure is an IOAddress object.
         // Convert this to an integer for storage.
         address_ = address.toText();
@@ -1326,10 +1314,6 @@ CqlLease6Exchange::retrieve() {
             hwaddr->source_ = hwaddr_source_;
         }
 
-        if (hwaddr && hwaddr->hwaddr_ == NULL_HWADDR) {
-            hwaddr.reset();
-        }
-
         // Create the lease and set the cltt (after converting from the
         // expire time retrieved from the database).
         Lease6Ptr result(
index bb24bf495fefaed73fcb9102707dfde1b10efb5b..42e15fa0a1d8cf676d1162fd35a263ebe2d2ddd8 100644 (file)
@@ -198,42 +198,12 @@ the Cassandra database. The connection is closed as part of normal server
 shutdown. This error is most likely a programmatic issue that is highly
 unlikely to occur or negatively impact server operation.
 
-% DHCPSRV_CQL_TRANSACTION_MGR_TRANSACTION_START starting transaction %1.
-The server has issued a begin transaction call.
-
-% DHCPSRV_CQL_TRANSACTION_MGR_REGISTER_TRANSACTION registering action on opened transaction %1.
-The server has issued a begin transaction call on an opened transaction.
-
-% DHCPSRV_CQL_TRANSACTION_MGR_TRANSACTION_COMMIT applying commit on transaction %1.
-The server has issued a commit transaction call.
-
-% DHCPSRV_CQL_TRANSACTION_MGR_REGISTER_TRANSACTION_COMMIT registering commit on opened transaction %1.
-The server has issued a commit transaction call on an opened transaction.
-
-% DHCPSRV_CQL_TRANSACTION_MGR_TRANSACTION_ROLLBACK applying rollback on transaction %1.
-The server has issued a rollback transaction call.
-
-% DHCPSRV_CQL_TRANSACTION_MGR_REGISTER_TRANSACTION_ROLLBACK registering rollback on opened transaction %1.
-The server has issued a rollback transaction call on an opened transaction.
-
-% DHCPSRV_CQL_TRANSACTION_MGR_TRANSACTION_NOT_FOUND failed to select a transaction.
-The server failed to select a transaction to operate on.
-
 % DHCPSRV_CQL_BEGIN_TRANSACTION begin transaction.
 The server has issued a begin transaction call.
 
 % DHCPSRV_CQL_CONNECTION_BEGIN_TRANSACTION begin transaction on current connection.
 The server has issued a begin transaction call.
 
-% DHCPSRV_CQL_TRANSACTION_MGR_START_TRANSACTION start transaction action has been initiated.
-The server has issued a start transaction call.
-
-% DHCPSRV_CQL_TRANSACTION_MGR_COMMIT_TRANSACTION commit transaction action has been initiated.
-The server has issued a commit transaction call.
-
-% DHCPSRV_CQL_TRANSACTION_MGR_ROLLBACK_TRANSACTION rollback transaction action has been initiated.
-The server has issued a rollback transaction call.
-
 % DHCPSRV_CQL_DB opening Cassandra lease database: %1
 This informational message is logged when a DHCP server (either V4 or
 V6) is about to open a Cassandra lease database.  The parameters of
@@ -327,104 +297,6 @@ lease from the Cassandra database for the specified address.
 A debug message issued when the server is attempting to update IPv6
 lease from the Cassandra database for the specified address.
 
-% DHCPSRV_CQL_INSERT_SRV_CONFIG4 Inserting a new DHCPv4 server configuration with id %1
-A debug message issued when there is no existing DHCPv4 server configuration in
-database and a configuration will be inserted.
-
-% DHCPSRV_CQL_INSERT_SRV_CONFIG6 Inserting a new DHCPv6 server configuration with id %1
-A debug message issued when there is no existing DHCPv6 server configuration in
-database and a configuration will be inserted.
-
-% DHCPSRV_CQL_UPDATE_SRV_CONFIG4 Updating the DHCPv4 server configuration with id %1.
-A debug message issued when there already exists a DHCPv4 server configuration
-in database and this configuration is going to be updated.
-
-% DHCPSRV_CQL_UPDATE_SRV_CONFIG6 Updating the DHCPv6 server configuration with id %1.
-A debug message issued when there already exists a DHCPv6 server configuration
-in database and this configuration is going to be updated.
-
-% DHCPSRV_CQL_REQUEST_UPDATE_SRV_CONFIG4 Received request to update the DHCPv4 database server configuration
-A debug message issued when a DHCPv4 server configuration database update request is received.
-If there already exists a configuration in the database then the configuration will be updated.
-Otherwise a new configuration will be inserted.
-
-% DHCPSRV_CQL_REQUEST_UPDATE_SRV_CONFIG6 Received request to update the DHCPv6 database server configuration
-A debug message issued when a DHCPv6 server configuration database update request is received.
-If there already exists a configuration in the database then the configuration will be updated.
-Otherwise a new configuration will be inserted.
-
-% DHCPSRV_CQL_UPDATE_SRV_CONFIG4_TIMESTAMP_CHANGED Cannot update the DHCPv4 database server configuration (old timestamp is %1, new timestamp is %2)
-A warning message issued when DHCPv4 database server configuration cannot be updated.
-On a database server configuration update the actual timestamp of the configuration is also provided to the server.
-If in the meanwhile the database timestamp has been changed by somebody else then the update operation fails.
-
-% DHCPSRV_CQL_UPDATE_SRV_CONFIG6_TIMESTAMP_CHANGED Cannot update the DHCPv6 database server configuration (old timestamp is %1, new timestamp is %2)
-A warning message issued when DHCPv6 database server configuration cannot be updated.
-On a database server configuration update the actual timestamp of the configuration is also provided to the server.
-If in the meanwhile the database timestamp has been changed by somebody else then the update operation fails.
-
-% DHCPSRV_CQL_GET_SRV_CONFIG4_TIMESTAMP Obtaining the DHCPv4 server configuration's version from database
-Obtains the DHCPv4 server configuration's version from database.
-
-% DHCPSRV_CQL_GET_SRV_CONFIG6_TIMESTAMP Obtaining the DHCPv6 server configuration's version from database
-Obtains the DHCPv6 server configuration's version from database.
-
-% DHCPSRV_CQL_GET_SRV_CONFIG4_JSON Obtaining the DHCPv4 server JSON configuration from database
-Obtains the DHCPv4 server JSON configuration from database.
-
-% DHCPSRV_CQL_GET_SRV_CONFIG6_JSON Obtaining the DHCPv6 server JSON configuration from database
-Obtains the DHCPv6 server JSON configuration from database.
-
-% DHCPSRV_CQL_GET_SRV_CONFIG4_GENERIC Obtaining the DHCPv4 server GENERIC configuration from database
-Obtains the DHCPv4 server GENERIC configuration from database.
-
-% DHCPSRV_CQL_GET_SRV_CONFIG6_GENERIC Obtaining the DHCPv6 server GENERIC configuration from database
-Obtains the DHCPv6 server GENERIC configuration from database.
-
-% DHCPSRV_CQL_GET_SRV_MASTER_CONFIG4 Obtaining the DHCPv4 server configuration from the master database id %1
-Obtains the DHCPv4 server configuration from the master database.
-
-% DHCPSRV_CQL_GET_SRV_MASTER_CONFIG6 Obtaining the DHCPv6 server configuration from the master database id %1
-Obtains the DHCPv6 server configuration from the master database.
-
-% DHCPSRV_CQL_GET_SRV_MASTER_CONFIG4_SHARD_DB Obtaining the DHCPv6 server configuration from the master database for '%1' shard database
-Obtains the DHCPv4 server configuration from the master database for the specified shard database.
-
-% DHCPSRV_CQL_GET_SRV_MASTER_CONFIG6_SHARD_DB Obtaining the DHCPv6 server configuration from the master database for '%1' shard database
-Obtains the DHCPv6 server configuration from the master database for the specified shard database.
-
-% DHCPSRV_CQL_GET_SRV_MASTER_CONFIG4_SHARDS_NAME Obtaining the DHCPv4 shards name from the master database
-Obtains the DHCPv4 shards name from the master database
-
-% DHCPSRV_CQL_GET_SRV_MASTER_CONFIG6_SHARDS_NAME Obtaining the DHCPv6 shards name from the master database
-Obtains the DHCPv6 shards name from the master database
-
-% DHCPSRV_CQL_CLEAR_SRV_MASTER_CONFIG4 Clearing the DHCPv4 master configuration from database
-Clears the DHCPv4 master configuration from database
-
-% DHCPSRV_CQL_CLEAR_SRV_MASTER_CONFIG6 Clearing the DHCPv6 master configuration from database
-Clears the DHCPv6 master configuration from database
-
-% DHCPSRV_CQL_DELETE_SRV_MASTER_CONFIG4 Deleting the DHCPv4 master configuration from database id %1
-Clears the DHCPv4 master configuration from database
-
-% DHCPSRV_CQL_DELETE_SRV_MASTER_CONFIG6 Deleting the DHCPv6 master configuration from database id %1
-Clears the DHCPv6 master configuration from database
-
-% DHCPSRV_CQL_INSERT_SRV_MASTER_CONFIG4 Inserting a new DHCPv4 master server configuration with id %1 and shard database %2
-A debug message issued when there is no existing DHCPv4 master server configuration in
-database and a configuration will be inserted.
-
-% DHCPSRV_CQL_INSERT_SRV_MASTER_CONFIG6 Inserting a new DHCPv6 master server configuration with id %1 and shard database %2
-A debug message issued when there is no existing DHCPv6 master server configuration in
-database and a configuration will be inserted.
-
-% DHCPSRV_CQL_GET_SRV_MASTER_CONFIG4_TIMESTAMP Obtaining the DHCPv4 master server configuration's version from database id %1
-Obtains the DHCPv4 master server configuration's version from database.
-
-% DHCPSRV_CQL_GET_SRV_MASTER_CONFIG6_TIMESTAMP Obtaining the DHCPv6 master server configuration's version from database id %1
-Obtains the DHCPv6 master server configuration's version from database.
-
 % DHCPSRV_CQL_HOST_DB Connecting to CQL hosts database: %1
 An informational message logged when the CQL hosts database is about to be
 connected to. The parameters of the connection including database name and
@@ -924,96 +796,6 @@ lease from the MySQL database for the specified address.
 A debug message issued when the server is attempting to update IPv6
 lease from the MySQL database for the specified address.
 
-% DHCPSRV_MYSQL_INSERT_SRV_CONFIG4 Inserting a new DHCPv4 configuration with id %1
-A debug message issued when there is no existing DHCPv4 server configuration in database and a configuration will be inserted.
-
-% DHCPSRV_MYSQL_INSERT_SRV_CONFIG6 Inserting a new DHCPv6 configuration with id %1
-A debug message issued when there is no existing DHCPv6 server configuration in database and a configuration will be inserted.
-
-% DHCPSRV_MYSQL_UPDATE_SRV_CONFIG4 Updating the DHCPv4 server configuration with id %1.
-A debug message issued when there already exists a DHCPv4 server configuration in database
-and this configuration is going to be updated.
-
-% DHCPSRV_MYSQL_UPDATE_SRV_CONFIG6 Updating the DHCPv6 server configuration with id %1.
-A debug message issued when there already exists a DHCPv6 server configuration in database
-and this configuration is going to be updated.
-
-% DHCPSRV_MYSQL_REQUEST_UPDATE_SRV_CONFIG4 Received request to update the DHCPv4 database server configuration
-A debug message issued when a DHCPv4 configuration database update request is received.
-If there already exists a configuration in the database then the configuration will be updated.
-Otherwise a new configuration will be inserted.
-
-% DHCPSRV_MYSQL_REQUEST_UPDATE_SRV_CONFIG6 Received request to update the DHCPv6 database server configuration
-A debug message issued when a DHCPv6 configuration database update request is received.
-If there already exists a configuration in the database then the configuration will be updated.
-Otherwise a new configuration will be inserted.
-
-% DHCPSRV_MYSQL_UPDATE_SRV_CONFIG4_TIMESTAMP_CHANGED Cannot update the DHCP4  database server configuration (old timestamp is %1, new timestamp is %2)
-A warning message issued when DHCP4 database server configuration cannot be updated.
-On a database server configuration update the actual timestamp of the configuration is also provided to the server.
-If in the meanwhile the database timestamp has been changed by somebody else then the update operation fails.
-
-% DHCPSRV_MYSQL_UPDATE_SRV_CONFIG6_TIMESTAMP_CHANGED Cannot update the DHCPv6  database server configuration (old timestamp is %1, new timestamp is %2)
-A warning message issued when DHCPv6 database server configuration cannot be updated.
-On a database server configuration update the actual timestamp of the configuration is also provided to the server.
-If in the meanwhile the database timestamp has been changed by somebody else then the update operation fails.
-
-% DHCPSRV_MYSQL_GET_SRV_CONFIG4_TIMESTAMP Obtaining the DHCPv4 server configuration's timestamp from database
-Obtains the DHCPv4 server configuration's timestamp from database.
-
-% DHCPSRV_MYSQL_GET_SRV_CONFIG6_TIMESTAMP Obtaining the DHCPv6 server configuration's timestamp from database
-Obtains the DHCPv6 server configuration's timestamp from database.
-
-% DHCPSRV_MYSQL_GET_SRV_CONFIG4_JSON Obtaining the DHCPv4 server JSON configuration from database
-Obtains the DHCPv4 server JSON configuration from database.
-
-% DHCPSRV_MYSQL_GET_SRV_CONFIG6_JSON Obtaining the DHCPv6 server JSON configuration from database
-Obtains the DHCPv6 server JSON configuration from database.
-
-% DHCPSRV_MYSQL_GET_SRV_CONFIG4_GENERIC Obtaining the DCHPv4 server GENERIC configuration from database
-Obtains the DCHPv4 server GENERIC configuration from database.
-
-% DHCPSRV_MYSQL_GET_SRV_CONFIG6_GENERIC Obtaining the DCHPv6 server GENERIC configuration from database
-Obtains the DCHPv6 server GENERIC configuration from database.
-
-% DHCPSRV_MYSQL_GET_SRV_MASTER_CONFIG4 Obtaining the DHCPv4 server configuration from the master database id %1
-Obtains the DHCPv4 server configuration from the master database.
-
-% DHCPSRV_MYSQL_GET_SRV_MASTER_CONFIG6 Obtaining the DHCPv6 server configuration from the master database id %1
-Obtains the DHCPv6 server configuration from the master database.
-
-% DHCPSRV_MYSQL_GET_SRV_MASTER_CONFIG4_SHARD_DB Obtaining the DHCPv6 server configuration from the master database for '%1' shard database
-Obtains the DHCPv4 server configuration from the master database for the specified shard database.
-
-% DHCPSRV_MYSQL_GET_SRV_MASTER_CONFIG6_SHARD_DB Obtaining the DHCPv6 server configuration from the master database for '%1' shard database
-Obtains the DHCPv6 server configuration from the master database for the specified shard database.
-
-% DHCPSRV_MYSQL_GET_SRV_MASTER_CONFIG4_SHARDS_NAME Obtaining the DHCPv4 shards name from the master database
-Obtains the DHCPv4 shards name from the master database
-
-% DHCPSRV_MYSQL_GET_SRV_MASTER_CONFIG6_SHARDS_NAME Obtaining the DHCPv6 shards name from the master database
-Obtains the DHCPv6 shards name from the master database
-
-% DHCPSRV_MYSQL_CLEAR_SRV_MASTER_CONFIG4 Clearing the DHCPv4 master configuration from database
-Clears the DHCPv4 master configuration from database
-
-% DHCPSRV_MYSQL_CLEAR_SRV_MASTER_CONFIG6 Clearing the DHCPv6 master configuration from database
-Clears the DHCPv6 master configuration from database
-
-% DHCPSRV_MYSQL_INSERT_SRV_MASTER_CONFIG4 Inserting a new DHCPv4 master server configuration with id %1 and shard database %2
-A debug message issued when there is no existing DHCPv4 master server configuration in
-database and a configuration will be inserted.
-
-% DHCPSRV_MYSQL_INSERT_SRV_MASTER_CONFIG6 Inserting a new DHCPv6 master server configuration with id %1 and shard database %2
-A debug message issued when there is no existing DHCPv6 master server configuration in
-database and a configuration will be inserted.
-
-% DHCPSRV_MYSQL_GET_SRV_MASTER_CONFIG4_TIMESTAMP Obtaining the DHCPv4 master server configuration's version from database id %1
-Obtains the DHCPv4 master server configuration's version from database.
-
-% DHCPSRV_MYSQL_GET_SRV_MASTER_CONFIG6_TIMESTAMP Obtaining the DHCPv6 master server configuration's version from database id %1
-Obtains the DHCPv6 master server configuration's version from database.
-
 % DHCPSRV_NOTYPE_DB no 'type' keyword to determine database backend: %1
 This is an error message, logged when an attempt has been made to access
 a database backend, but where no 'type' keyword has been included in
@@ -1168,96 +950,6 @@ lease from the PostgreSQL database for the specified address.
 A debug message issued when the server is attempting to update IPv6
 lease from the PostgreSQL database for the specified address.
 
-% DHCPSRV_PGSQL_INSERT_SRV_CONFIG4 Inserting a new DHCPv4 server configuration with id %1
-A debug message issued when there is no existing DHCPv4 server configuration in database and a configuration will be inserted.
-
-% DHCPSRV_PGSQL_INSERT_SRV_CONFIG6 Inserting a new DHCPv6 server configuration with id %1
-A debug message issued when there is no existing DHCPv6 server configuration in database and a configuration will be inserted.
-
-% DHCPSRV_PGSQL_UPDATE_SRV_CONFIG4 Updating the DHCPv4 server configuration with id %1.
-A debug message issued when there already exists a DHCPv4 server configuration in database
-and this configuration is going to be updated.
-
-% DHCPSRV_PGSQL_UPDATE_SRV_CONFIG6 Updating the DHCPv6 server configuration with id %1.
-A debug message issued when there already exists a DHCPv6 server configuration in database
-and this configuration is going to be updated.
-
-% DHCPSRV_PGSQL_REQUEST_UPDATE_SRV_CONFIG4 Received request to update the IPv4 database server configuration
-A debug message issued when a IPv4 server configuration database update request is received.
-If there already exists a configuration in the database then the configuration will be updated.
-Otherwise a new configuration will be inserted.
-
-% DHCPSRV_PGSQL_REQUEST_UPDATE_SRV_CONFIG6 Received request to update the IPv6 database server configuration
-A debug message issued when a IPv6 server configuration database update request is received.
-If there already exists a configuration in the database then the configuration will be updated.
-Otherwise a new configuration will be inserted.
-
-% DHCPSRV_PGSQL_UPDATE_SRV_CONFIG4_TIMESTAMP_CHANGED Cannot update the IPv4 database server configuration (old timestamp is %1, new timestamp is %2)
-A warning message issued when IPv4 database server configuration cannot be updated.
-On a database server configuration update the actual timestamp of the configuration is also provided to the server.
-If in the meanwhile the database timestamp has been changed by somebody else then the update operation fails.
-
-% DHCPSRV_PGSQL_UPDATE_SRV_CONFIG6_TIMESTAMP_CHANGED Cannot update the IPv6 database server configuration (old timestamp is %1, new timestamp is %2)
-A warning message issued when IPv6 database server configuration cannot be updated.
-On a database server configuration update the actual timestamp of the configuration is also provided to the server.
-If in the meanwhile the database timestamp has been changed by somebody else then the update operation fails.
-
-% DHCPSRV_PGSQL_GET_SRV_CONFIG4_TIMESTAMP Obtaining the DHCPv4 server configuration's version from database
-Obtains the DHCPv4 server configuration's version from database.
-
-% DHCPSRV_PGSQL_GET_SRV_CONFIG6_TIMESTAMP Obtaining the DHCPv6 server configuration's version from database
-Obtains the DHCPv6 server configuration's version from database.
-
-% DHCPSRV_PGSQL_GET_SRV_CONFIG4_JSON Obtaining the DHCPv4 server JSON configuration from database
-Obtains the DHCPv4 server JSON configuration from database.
-
-% DHCPSRV_PGSQL_GET_SRV_CONFIG6_JSON Obtaining the DHCPv6 server JSON configuration from database
-Obtains the DHCPv6 server JSON configuration from database.
-
-% DHCPSRV_PGSQL_GET_SRV_CONFIG4_GENERIC Obtaining the DHCPv4 server GENERIC configuration from database
-Obtains the DHCPv4 server GENERIC configuration from database.
-
-% DHCPSRV_PGSQL_GET_SRV_CONFIG6_GENERIC Obtaining the DHCPv6 server GENERIC configuration from database
-Obtains the DHCPv6 server GENERIC configuration from database.
-
-% DHCPSRV_PGSQL_GET_SRV_MASTER_CONFIG4 Obtaining the DHCPv4 server configuration from the master database id %1
-Obtains the DHCPv4 server configuration from the master database.
-
-% DHCPSRV_PGSQL_GET_SRV_MASTER_CONFIG6 Obtaining the DHCPv6 server configuration from the master database id %1
-Obtains the DHCPv6 server configuration from the master database.
-
-% DHCPSRV_PGSQL_GET_SRV_MASTER_CONFIG4_SHARD_DB Obtaining the DHCPv6 server configuration from the master database for '%1' shard database
-Obtains the DHCPv4 server configuration from the master database for the specified shard database.
-
-% DHCPSRV_PGSQL_GET_SRV_MASTER_CONFIG6_SHARD_DB Obtaining the DHCPv6 server configuration from the master database for '%1' shard database
-Obtains the DHCPv6 server configuration from the master database for the specified shard database.
-
-% DHCPSRV_PGSQL_GET_SRV_MASTER_CONFIG4_SHARDS_NAME Obtaining the DHCPv4 shards name from the master database
-Obtains the DHCPv4 shards name from the master database
-
-% DHCPSRV_PGSQL_GET_SRV_MASTER_CONFIG6_SHARDS_NAME Obtaining the DHCPv6 shards name from the master database
-Obtains the DHCPv6 shards name from the master database
-
-% DHCPSRV_PGSQL_CLEAR_SRV_MASTER_CONFIG4 Clearing the DHCPv4 master configuration from database
-Clears the DHCPv4 master configuration from database
-
-% DHCPSRV_PGSQL_CLEAR_SRV_MASTER_CONFIG6 Clearing the DHCPv6 master configuration from database
-Clears the DHCPv6 master configuration from database
-
-% DHCPSRV_PGSQL_INSERT_SRV_MASTER_CONFIG4 Inserting a new DHCPv4 master server configuration with id %1 and shard database %2
-A debug message issued when there is no existing DHCPv4 master server configuration in
-database and a configuration will be inserted.
-
-% DHCPSRV_PGSQL_INSERT_SRV_MASTER_CONFIG6 Inserting a new DHCPv6 master server configuration with id %1 and shard database %2
-A debug message issued when there is no existing DHCPv6 master server configuration in
-database and a configuration will be inserted.
-
-% DHCPSRV_PGSQL_GET_SRV_MASTER_CONFIG4_TIMESTAMP Obtaining the DHCPv4 master server configuration's version from database id %1
-Obtains the DHCPv4 master server configuration's version from database.
-
-% DHCPSRV_PGSQL_GET_SRV_MASTER_CONFIG6_TIMESTAMP Obtaining the DHCPv6 master server configuration's version from database id %1
-Obtains the DHCPv6 master server configuration's version from database.
-
 % DHCPSRV_QUEUE_NCR %1: name change request to %2 DNS entry queued: %3
 A debug message which is logged when the NameChangeRequest to add or remove
 a DNS entries for a particular lease has been queued. The first argument
index 8dd78f8f606c5c6a84fc585da155be4d3498520f..cfeffa07835f15bcaa6a58acaa9c5a44501e636f 100644 (file)
@@ -64,7 +64,6 @@ namespace dhcp {
 /// @brief Pair containing major and minor versions
 typedef std::pair<uint32_t, uint32_t> VersionPair;
 
-
 /// @brief Contains a single row of lease statistical data
 ///
 /// The contents of the row consist of a subnet ID, a lease
index f02f5e45e7313f9a9d2aeb47b0a0c56529fd88b0..8f2267906a44822fc238aeb44d73676b1f8c9581 100644 (file)
@@ -1047,12 +1047,6 @@ Memfile_LeaseMgr::getDescription() const {
     return (std::string("In memory database with leases stored in a CSV file."));
 }
 
-bool Memfile_LeaseMgr::startTransaction() {
-  LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE_DETAIL,
-            DHCPSRV_MEMFILE_BEGIN_TRANSACTION);
-  return true;
-}
-
 void
 Memfile_LeaseMgr::commit() {
     LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE_DETAIL, DHCPSRV_MEMFILE_COMMIT);
index 1a7897d4ffaa851d6a0b3e1373563e8f773e78ce..3d76f94468c3112e6aa9f6093a7065dde769b30f 100644 (file)
@@ -420,12 +420,6 @@ public:
         return (std::make_pair(MAJOR_VERSION, MINOR_VERSION));
     }
 
-    /// @brief Start Transaction
-    ///
-    /// Start transaction for database operations. On databases that don't
-    /// support transactions, this is a no-op.
-    virtual bool startTransaction();
-
     /// @brief Commit Transactions
     ///
     /// Commits all pending database operations.  On databases that don't
index 1af75036778700310d80e720f6b4601b6581934d..ba358ba6ce0c8888afe52e14094fc2c2b3d18d87 100644 (file)
@@ -430,7 +430,7 @@ TEST_F(CqlLeaseMgrTest, getType) {
 /// This test checks that the conversion is correct.
 TEST_F(CqlLeaseMgrTest, checkTimeConversion) {
     const time_t cltt = time(NULL);
-    const cass_int64_t valid_lft = 86400;  // 1 day
+    const uint32_t valid_lft = 86400;  // 1 day
     cass_int64_t cql_expire;
 
     // Convert to the database time.
index 9b385cb1e4b24733ef9c846181fd941eec538722..05dccca6bc28d6560ed33654e9761455636a28db 100644 (file)
@@ -268,12 +268,6 @@ public:
         return (make_pair(uint32_t(0), uint32_t(0)));
     }
 
-    /// @brief Start Transaction
-    ///
-    /// Start transaction for database operations. On databases that don't
-    /// support transactions, this is a no-op.
-    virtual bool startTransaction() { return true; };
-
     /// @brief Commit transactions
     virtual void commit() {
     }