From: Razvan Becheriu Date: Tue, 19 Mar 2019 15:50:24 +0000 (+0200) Subject: changes after review X-Git-Tag: Kea-1.6.0-beta~341 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cafb08a0ec2832a9d0425d0a25f0154ae72b146a;p=thirdparty%2Fkea.git changes after review --- diff --git a/doc/examples/kea4/all-keys-current.json b/doc/examples/kea4/all-keys-current.json index 9db98c9abb..dbbe31fed1 100644 --- a/doc/examples/kea4/all-keys-current.json +++ b/doc/examples/kea4/all-keys-current.json @@ -257,11 +257,74 @@ // 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 } ], @@ -332,8 +395,8 @@ // 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" }, @@ -677,7 +740,7 @@ // 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" } ] diff --git a/doc/examples/kea4/all-keys-stable.json b/doc/examples/kea4/all-keys-stable.json index 4c2da4b82e..4728a5fb09 100644 --- a/doc/examples/kea4/all-keys-stable.json +++ b/doc/examples/kea4/all-keys-stable.json @@ -257,7 +257,7 @@ // 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. @@ -332,8 +332,8 @@ // 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" }, @@ -674,7 +674,7 @@ // 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" } ] diff --git a/doc/examples/kea4/backends.json b/doc/examples/kea4/backends.json index dc59289441..47994bf25b 100644 --- a/doc/examples/kea4/backends.json +++ b/doc/examples/kea4/backends.json @@ -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, diff --git a/doc/examples/kea6/all-keys-current.json b/doc/examples/kea6/all-keys-current.json index ae2ce29c3e..489807a5a7 100644 --- a/doc/examples/kea6/all-keys-current.json +++ b/doc/examples/kea6/all-keys-current.json @@ -213,11 +213,74 @@ // 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 } ], @@ -271,8 +334,8 @@ // 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" }, @@ -633,7 +696,7 @@ // 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" } ] diff --git a/doc/examples/kea6/all-keys-stable.json b/doc/examples/kea6/all-keys-stable.json index 8f54bbdf32..09737b5a89 100644 --- a/doc/examples/kea6/all-keys-stable.json +++ b/doc/examples/kea6/all-keys-stable.json @@ -213,7 +213,7 @@ // 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. @@ -271,8 +271,8 @@ // 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" }, @@ -630,7 +630,7 @@ // 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" } ] diff --git a/doc/examples/kea6/backends.json b/doc/examples/kea6/backends.json index 7a3c087aac..87009690d7 100644 --- a/doc/examples/kea6/backends.json +++ b/doc/examples/kea6/backends.json @@ -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, diff --git a/src/lib/cql/cql_connection.cc b/src/lib/cql/cql_connection.cc index dcf8551d20..ae3ea48767 100644 --- a/src/lib/cql/cql_connection.cc +++ b/src/lib/cql/cql_connection.cc @@ -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; diff --git a/src/share/yang/modules/kea-dhcp-types@2018-11-20.yang b/src/share/yang/modules/kea-dhcp-types@2018-11-20.yang index cfcf7696dd..2bfc96f8e8 100644 --- a/src/share/yang/modules/kea-dhcp-types@2018-11-20.yang +++ b/src/share/yang/modules/kea-dhcp-types@2018-11-20.yang @@ -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.";