2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 14:05:33 +00:00

changes after review

This commit is contained in:
Razvan Becheriu
2019-03-19 17:50:24 +02:00
parent 90787d36d3
commit cafb08a0ec
8 changed files with 146 additions and 29 deletions

View File

@@ -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"
}
]

View File

@@ -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"
}
]

View 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,

View File

@@ -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"
}
]

View File

@@ -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"
}
]

View 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,

View 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;

View 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.";