]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
changes after review
authorRazvan Becheriu <ravan@isc.org>
Tue, 19 Mar 2019 15:50:24 +0000 (17:50 +0200)
committerRazvan Becheriu <ravan@isc.org>
Thu, 21 Mar 2019 15:56:05 +0000 (17:56 +0200)
doc/examples/kea4/all-keys-current.json
doc/examples/kea4/all-keys-stable.json
doc/examples/kea4/backends.json
doc/examples/kea6/all-keys-current.json
doc/examples/kea6/all-keys-stable.json
doc/examples/kea6/backends.json
src/lib/cql/cql_connection.cc
src/share/yang/modules/kea-dhcp-types@2018-11-20.yang

index 9db98c9abb534506ae4a50583797d9bc27398c6c..dbbe31fed1d86d57967869d892206880d0a92f35 100644 (file)
                 // Port on which the database is available.
                 "port": 3306,
 
-                // Type of the database, e.g. "mysql", "pgsql", "cql".
+                // Type of the database, e.g. "mysql", "postgresql", "cql".
                 "type": "mysql",
 
                 // User name to be used to access the database.
                 "user": "kea"
+            },
+            {
+                // Name of the database to connect to.
+                "name": "kea",
+
+                // Host on which the database resides.
+                "host": "localhost",
+
+                // Database password.
+                "password": "kea",
+
+                // Port on which the database is available.
+                "port": 5432,
+
+                // Type of the database, e.g. "mysql", "postgresql", "cql".
+                "type": "postgresql",
+
+                // User name to be used to access the database.
+                "user": "kea"
+            },
+            {
+                // Name of the database to connect to.
+                "keyspace": "kea",
+
+                // Host on which the database resides.
+                "contact-points": "127.0.0.1",
+
+                // Database password.
+                "password": "kea",
+
+                // Port on which the database is available.
+                "port": 9042,
+
+                // Type of the database, e.g. "mysql", "postgresql", "cql".
+                "type": "cql",
+
+                // User name to be used to access the database.
+                "user": "kea",
+
+                // Consistency level for all queries.
+                // Supported values: any, one, two, three, quorum, all,
+                // local-quorum, each-quorum, serial, local-serial, local-one.
+                "consistency": "quorum",
+
+                // Serial consistency level for all queries.
+                // Supported values: any, one, two, three, quorum, all,
+                // local-quorum, each-quorum, serial, local-serial, local-one.
+                "serial-consistency": "serial",
+
+                // Connection reconnect wait time.
+                "reconnect-wait-time": 100,
+
+                // Connection connect timeout.
+                "connect-timeout": 100,
+
+                // Connection request timeout.
+                "request-timeout": 100,
+
+                // Connection tcp keepalive.
+                "tcp-keepalive": 100,
+
+                // Connection tcp nodelay.
+                "tcp-nodelay": true
             }
         ],
 
             // because non stored leases will be lost upon Kea server restart.
             "persist": true,
 
-            // Lease database backend type, i.e. "memfile", "mysql", "pgsql"
-            // or "cql".
+            // Lease database backend type, i.e. "memfile", "mysql",
+            // "postgresql" or "cql".
             "type": "memfile"
         },
 
                     // Name of the database to connect to.
                     "name": "config",
 
-                    // Type of the database, e.g. "mysql", "pgsql", "cql".
+                    // Type of the database, e.g. "mysql", "postgresql", "cql".
                     "type": "mysql"
                 }
             ]
index 4c2da4b82e8cb380bd0900f151a5e9e848a400f7..4728a5fb09ac7e936ed08e994b1b7fb830aaaf50 100644 (file)
                 // Port on which the database is available.
                 "port": 3306,
 
-                // Type of the database, e.g. "mysql", "pgsql", "cql".
+                // Type of the database, e.g. "mysql", "postgresql", "cql".
                 "type": "mysql",
 
                 // User name to be used to access the database.
             // because non stored leases will be lost upon Kea server restart.
             "persist": true,
 
-            // Lease database backend type, i.e. "memfile", "mysql", "pgsql"
-            // or "cql".
+            // Lease database backend type, i.e. "memfile", "mysql",
+            // "postgresql" or "cql".
             "type": "memfile"
         },
 
                     // Name of the database to connect to.
                     "name": "config",
 
-                    // Type of the database, e.g. "mysql", "pgsql", "cql".
+                    // Type of the database, e.g. "mysql", "postgresql", "cql".
                     "type": "mysql"
                 }
             ]
index dc59289441afe87bafbcb73d2a1ebabb67fa2b7c..47994bf25b71af54730a6d3007c4a6e87f83ae06 100644 (file)
@@ -51,7 +51,7 @@
 // password is not necessary to connect and that timeout is 5 seconds.
 // Kea must be compiled with --with-pgsql option to use this backend.
 //  "lease-database": {
-//      "type": "pgsql",
+//      "type": "postgresql",
 //      "name": "keatest",
 //      "host": "localhost",
 //      "port": 5432,
index ae2ce29c3e3a6a4eb7009957ef00be199adf3e96..489807a5a784cd3e7c1cf2cd1aee60f371957098 100644 (file)
                 // Port on which the database is available.
                 "port": 3306,
 
-                // Type of the database, e.g. "mysql", "pgsql", "cql".
+                // Type of the database, e.g. "mysql", "postgresql", "cql".
                 "type": "mysql",
 
                 // User name to be used to access the database.
                 "user": "kea"
+            },
+            {
+                // Name of the database to connect to.
+                "name": "kea",
+
+                // Host on which the database resides.
+                "host": "localhost",
+
+                // Database password.
+                "password": "kea",
+
+                // Port on which the database is available.
+                "port": 5432,
+
+                // Type of the database, e.g. "mysql", "postgresql", "cql".
+                "type": "postgresql",
+
+                // User name to be used to access the database.
+                "user": "kea"
+            },
+            {
+                // Name of the database to connect to.
+                "keyspace": "kea",
+
+                // Host on which the database resides.
+                "contact-points": "127.0.0.1",
+
+                // Database password.
+                "password": "kea",
+
+                // Port on which the database is available.
+                "port": 9042,
+
+                // Type of the database, e.g. "mysql", "postgresql", "cql".
+                "type": "cql",
+
+                // User name to be used to access the database.
+                "user": "kea",
+
+                // Consistency level for all queries.
+                // Supported values: any, one, two, three, quorum, all,
+                // local-quorum, each-quorum, serial, local-serial, local-one.
+                "consistency": "quorum",
+
+                // Serial consistency level for all queries.
+                // Supported values: any, one, two, three, quorum, all,
+                // local-quorum, each-quorum, serial, local-serial, local-one.
+                "serial-consistency": "serial",
+
+                // Connection reconnect wait time.
+                "reconnect-wait-time": 100,
+
+                // Connection connect timeout.
+                "connect-timeout": 100,
+
+                // Connection request timeout.
+                "request-timeout": 100,
+
+                // Connection tcp keepalive.
+                "tcp-keepalive": 100,
+
+                // Connection tcp nodelay.
+                "tcp-nodelay": true
             }
         ],
 
             // because non stored leases will be lost upon Kea server restart.
             "persist": true,
 
-            // Lease database backend type, i.e. "memfile", "mysql", "pgsql"
-            // or "cql".
+            // Lease database backend type, i.e. "memfile", "mysql",
+            // "postgresql" or "cql".
             "type": "memfile"
         },
 
                     // Name of the database to connect to.
                     "name": "config",
 
-                    // Type of the database, e.g. "mysql", "pgsql", "cql".
+                    // Type of the database, e.g. "mysql", "postgresql", "cql".
                     "type": "mysql"
                 }
             ]
index 8f54bbdf325006daa49876482eb110e1d7d656c3..09737b5a892eedcec51733399ba49bc8d880a26f 100644 (file)
                 // Port on which the database is available.
                 "port": 3306,
 
-                // Type of the database, e.g. "mysql", "pgsql", "cql".
+                // Type of the database, e.g. "mysql", "postgresql", "cql".
                 "type": "mysql",
 
                 // User name to be used to access the database.
             // because non stored leases will be lost upon Kea server restart.
             "persist": true,
 
-            // Lease database backend type, i.e. "memfile", "mysql", "pgsql"
-            // or "cql".
+            // Lease database backend type, i.e. "memfile", "mysql",
+            // "postgresql" or "cql".
             "type": "memfile"
         },
 
                     // Name of the database to connect to.
                     "name": "config",
 
-                    // Type of the database, e.g. "mysql", "pgsql", "cql".
+                    // Type of the database, e.g. "mysql", "postgresql", "cql".
                     "type": "mysql"
                 }
             ]
index 7a3c087aacf913c6941edfc2cd6713a04df3ea71..87009690d7bbd08527f7b684ff10c3f9bdffd041 100644 (file)
@@ -51,7 +51,7 @@
 // password is not necessary to connect and that timeout is 5 seconds.
 // Kea must be compiled with --with-pgsql option to use this backend.
 //  "lease-database": {
-//      "type": "pgsql",
+//      "type": "postgresql",
 //      "name": "keatest",
 //      "host": "localhost",
 //      "port": 5432,
index dcf8551d207b058ba524fd0d87b0e2ccb39227ac..ae3ea48767ee71dea5656745567f834b53b6fe1f 100644 (file)
@@ -150,7 +150,7 @@ CqlConnection::openDatabase() {
         sconsistency = getParameter("consistency");
         consistency = sconsistency.c_str();
     } catch (...) {
-        // No user. Fine, we'll use NULL.
+        // No consistency. Fine, we'll use "quorum".
     }
 
     const char* serial_consistency = NULL;
@@ -159,7 +159,7 @@ CqlConnection::openDatabase() {
         sserial_consistency = getParameter("serial-consistency");
         serial_consistency = sserial_consistency.c_str();
     } catch (...) {
-        // No user. Fine, we'll use NULL.
+        // No serial consistency. Fine, we'll use "serial".
     }
 
     const char* reconnect_wait_time = NULL;
index cfcf7696dd1c48f4efbd63af58fcabac8983f7c8..2bfc96f8e8e3d13f16c749e4cc35bf2ae7244de8 100644 (file)
@@ -145,15 +145,6 @@ module kea-dhcp-types {
       description "Cassandra database keyspace (this is Cassandra's equivalent
                    of a database name).";
     }
-    leaf consistency {
-      type string;
-      description "Consistency level.";
-    }
-    leaf serial-consistency {
-      type string;
-      description "Serial consistency level which manages lightweight
-                   transaction isolation.";
-    }
     leaf max-reconnect-tries {
       type uint32;
       description "Maximum of recovery attempts before exit.";