2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 22:15:23 +00:00

[!17, #65] Changes after review of kea-dhcp6 (also some kea-dhcp4 tweaks)

This commit is contained in:
Tomek Mrugalski
2018-09-10 16:21:49 +02:00
parent 6217825bce
commit d4e5e340d9
2 changed files with 75 additions and 51 deletions

View File

@@ -183,7 +183,7 @@ module kea-dhcp4 {
range 1..max; range 1..max;
} }
mandatory true; mandatory true;
description "Subnet ID (a unique identifier used to locate or reference description "Subnet ID, a unique identifier used to locate or reference
a subnet."; a subnet.";
} }
leaf client-class { leaf client-class {
@@ -211,7 +211,7 @@ module kea-dhcp4 {
leaf-list client-classes { leaf-list client-classes {
type string; type string;
description "Host client classes (if host identifier matches, a client's description "Host client classes (if host identifier matches, a client's
packet will be added to the classes liste here)."; packet will be added to the classes liste here.)";
} }
leaf ip-address { leaf ip-address {
type inet:ipv4-address; type inet:ipv4-address;
@@ -309,7 +309,8 @@ module kea-dhcp4 {
} }
leaf connect-timeout { leaf connect-timeout {
type uint32; type uint32;
description "Database connection timeout, expressed in milliseconds."; units "milliseconds";
description "Database connection timeout.";
} }
leaf contact-points { leaf contact-points {
type string; type string;
@@ -329,12 +330,13 @@ module kea-dhcp4 {
leaf reconnect-wait-time { leaf reconnect-wait-time {
type uint32; type uint32;
default 0; default 0;
description "Waiting delay between two recovery attempts, expressed in units "milliseconds";
milliseconds."; description "Waiting delay between two recovery attempts.";
} }
leaf request-timeout { leaf request-timeout {
type uint32; type uint32;
description "Timeout waiting for a response, expressed in milliseconds."; units "milliseconds";
description "Timeout waiting for a response.";
} }
leaf tcp-keepalive { leaf tcp-keepalive {
type uint32; type uint32;
@@ -387,7 +389,7 @@ module kea-dhcp4 {
leaf name { leaf name {
type string; type string;
mandatory true; mandatory true;
description "Name of the new option definition."; description "Name of the new option being defined.";
} }
leaf code { leaf code {
type uint8; type uint8;
@@ -397,7 +399,7 @@ module kea-dhcp4 {
leaf type { leaf type {
type string; type string;
mandatory true; mandatory true;
description "Type of the new option definition."; description "Type of the new option being defined (such as string or uint8).";
} }
leaf record-types { leaf record-types {
type string; type string;
@@ -406,12 +408,12 @@ module kea-dhcp4 {
leaf space { leaf space {
type string; type string;
mandatory true; mandatory true;
description "Option definition space (typically dhcp4)."; description "Option space for the new option (typically dhcp4).";
} }
leaf encapsulate { leaf encapsulate {
type string; type string;
description "Defines option space this new option encapsulates. description "Defines option space this new option encapsulates.
Usually is empty."; Usually empty.";
} }
leaf array { leaf array {
type boolean; type boolean;
@@ -452,12 +454,14 @@ module kea-dhcp4 {
leaf csv-format { leaf csv-format {
type boolean; type boolean;
default true; default true;
description "Option CSV format flag."; description "If true, the option is specified as comma separated values.
If false, it is expected as a hex string.";
} }
leaf always-send { leaf always-send {
type boolean; type boolean;
default false; default false;
description "Option always send flag."; description "Defines whether to always send the option, regardless if the
client requested it or not.";
} }
leaf user-context { leaf user-context {
type kea:user-context; type kea:user-context;
@@ -702,7 +706,7 @@ module kea-dhcp4 {
enum "TCP"; enum "TCP";
} }
default "UDP"; default "UDP";
description "Protocol to use for DHCP-DDNS communication description "Protocol to use for DHCP-DDNS communication.
Currently only UDP is supported."; Currently only UDP is supported.";
} }
leaf ncr-format { leaf ncr-format {

View File

@@ -40,6 +40,7 @@ module kea-dhcp6 {
enum "disabled"; enum "disabled";
enum "out-of-pool"; enum "out-of-pool";
enum "all"; enum "all";
enum "global";
} }
description "Host reservation mode."; description "Host reservation mode.";
} }
@@ -50,7 +51,7 @@ module kea-dhcp6 {
enum "declined"; enum "declined";
enum "expired-reclaimed"; enum "expired-reclaimed";
} }
description "Lease state."; description "Defines state of the lease.";
} }
/* /*
@@ -91,7 +92,7 @@ module kea-dhcp6 {
grouping relay { grouping relay {
leaf-list ip-addresses { leaf-list ip-addresses {
type inet:ipv6-address; type inet:ipv6-address;
description "IP addresses."; description "IPv6 addresses.";
} }
} }
@@ -115,17 +116,18 @@ module kea-dhcp6 {
leaf start-address { leaf start-address {
type inet:ipv6-address; type inet:ipv6-address;
mandatory true; mandatory true;
description "Pool start address."; description "First IPv6 address in a pool.";
} }
leaf end-address { leaf end-address {
type inet:ipv6-address; type inet:ipv6-address;
mandatory true; mandatory true;
description "Pool end address."; description "Last IPv6 address in a pool.";
} }
uses option-data-list; uses option-data-list;
leaf client-class { leaf client-class {
type string; type string;
description "Pool client class guard."; description "Pool client class guard. (only clients belonging to this
class will be allowed in this pool).";
} }
leaf-list require-client-classes { leaf-list require-client-classes {
type string; type string;
@@ -133,7 +135,7 @@ module kea-dhcp6 {
} }
leaf user-context { leaf user-context {
type kea:user-context; type kea:user-context;
description "Pool user context."; description "Pool user context. Arbitrary JSON data can be stored here.";
} }
} }
} }
@@ -143,7 +145,7 @@ module kea-dhcp6 {
leaf prefix { leaf prefix {
type inet:ipv6-prefix; type inet:ipv6-prefix;
mandatory true; mandatory true;
description "Prefix pool prefix."; description "IPv6 pool prefix.";
} }
leaf delegated-len { leaf delegated-len {
type uint8; type uint8;
@@ -152,7 +154,8 @@ module kea-dhcp6 {
uses option-data-list; uses option-data-list;
leaf client-class { leaf client-class {
type string; type string;
description "Prefix pool client class guard."; description "Prefix pool client class guard. (only clients belonging to this
class will be allowed in this pool).";
} }
leaf-list require-client-classes { leaf-list require-client-classes {
type string; type string;
@@ -164,18 +167,19 @@ module kea-dhcp6 {
} }
leaf user-context { leaf user-context {
type kea:user-context; type kea:user-context;
description "Prefix pool user context."; description "Prefix pool user context. Arbitrary JSON data can be stored here.";
} }
} }
} }
leaf subnet { leaf subnet {
type inet:ipv6-prefix; type inet:ipv6-prefix;
mandatory true; mandatory true;
description "Subnet prefix."; description "IPv6 subnet prefix.";
} }
leaf interface { leaf interface {
type string; type string;
description "Subnet interface."; description "Name of the network interface this subnet is directly
accessible with (optional).";
} }
leaf interface-id { leaf interface-id {
type string; type string;
@@ -186,7 +190,8 @@ module kea-dhcp6 {
range 1..max; range 1..max;
} }
mandatory true; mandatory true;
description "Subnet ID."; description "Subnet ID, a unique identifier used to locate or reference
a subnet.";
} }
leaf rapid-commit { leaf rapid-commit {
type boolean; type boolean;
@@ -195,14 +200,15 @@ module kea-dhcp6 {
} }
leaf client-class { leaf client-class {
type string; type string;
description "Subnet client class guard."; description "Subnet client class guard (only clients belonging to this
clas will be allowed in this subnet).";
} }
leaf-list require-client-classes { leaf-list require-client-classes {
type string; type string;
description "Subnet require client classes."; description "Subnet require client classes.";
} }
container reservations { container reservations {
description "Subnet host reservations."; description "A container with host reservations specific to this IPv6 subnet.";
list host { list host {
key "identifier-type identifier"; key "identifier-type identifier";
leaf identifier-type { leaf identifier-type {
@@ -215,7 +221,8 @@ module kea-dhcp6 {
} }
leaf-list client-classes { leaf-list client-classes {
type string; type string;
description "Host client classes."; description "Host client classes. (if host identifier matches, a client's
packet will be added to the classes liste here.)";
} }
leaf-list ip-addresses { leaf-list ip-addresses {
type inet:ipv6-address; type inet:ipv6-address;
@@ -241,7 +248,7 @@ module kea-dhcp6 {
description "Subnet host reservation mode."; description "Subnet host reservation mode.";
} }
container relay { container relay {
description "Relay."; description "Optional information about relay agent.";
uses relay; uses relay;
} }
leaf user-context { leaf user-context {
@@ -276,7 +283,8 @@ module kea-dhcp6 {
leaf persist { leaf persist {
type boolean; type boolean;
default true; default true;
description "Write lease to disk file."; description "Write lease to disk file. This parameter applies only to
memfile backend.";
} }
leaf port { leaf port {
type uint16; type uint16;
@@ -291,10 +299,13 @@ module kea-dhcp6 {
leaf readonly { leaf readonly {
type boolean; type boolean;
default false; default false;
description "Read-only database."; description "If set to true, the database will be connected in read-only
mode. This does not make sense for lease databases, only for
host reservations and possibly for upcoming config backend.";
} }
leaf connect-timeout { leaf connect-timeout {
type uint32; type uint32;
units "milliseconds";
description "Database connection timeout."; description "Database connection timeout.";
} }
leaf contact-points { leaf contact-points {
@@ -313,10 +324,12 @@ module kea-dhcp6 {
leaf reconnect-wait-time { leaf reconnect-wait-time {
type uint32; type uint32;
default 0; default 0;
units "milliseconds";
description "Waiting delay between two recovery attempts."; description "Waiting delay between two recovery attempts.";
} }
leaf request-timeout { leaf request-timeout {
type uint32; type uint32;
units "milliseconds";
description "Timeout waiting for a response."; description "Timeout waiting for a response.";
} }
leaf tcp-keepalive { leaf tcp-keepalive {
@@ -344,7 +357,7 @@ module kea-dhcp6 {
} }
leaf test { leaf test {
type string; type string;
description "Client class test expression."; description "Defines an expression that evaluates every incoming packet.";
} }
leaf only-if-required { leaf only-if-required {
type boolean; type boolean;
@@ -366,17 +379,17 @@ module kea-dhcp6 {
leaf name { leaf name {
type string; type string;
mandatory true; mandatory true;
description "Option definition name."; description "Name of the new option being defined.";
} }
leaf code { leaf code {
type uint16; type uint16;
mandatory true; mandatory true;
description "Option definition code."; description "Option code to be used by the new option definition.";
} }
leaf type { leaf type {
type string; type string;
mandatory true; mandatory true;
description "Option definition type."; description "Type of the new option being defined (such as string or uint8).";
} }
leaf record-types { leaf record-types {
type string; type string;
@@ -385,11 +398,12 @@ module kea-dhcp6 {
leaf space { leaf space {
type string; type string;
mandatory true; mandatory true;
description "Option definition space."; description "Option space for the new option (typically dhcp6).";
} }
leaf encapsulate { leaf encapsulate {
type string; type string;
description "Option definition encapsulate."; description "Defines option space this new option encapsulates.
Usually empty.";
} }
leaf array { leaf array {
type boolean; type boolean;
@@ -430,16 +444,18 @@ module kea-dhcp6 {
leaf csv-format { leaf csv-format {
type boolean; type boolean;
default true; default true;
description "Option CSV format flag."; description "If true, the option is specified as comma separated values.
If false, it is expected as a hex string.";
} }
leaf always-send { leaf always-send {
type boolean; type boolean;
default false; default false;
description "Option always send flag."; description "Defines whether to always send the option, regardless if the
client requested it or not.";
} }
leaf user-context { leaf user-context {
type kea:user-context; type kea:user-context;
description "Option user context."; description "Option user context. Arbitrary JSON data can be stored here.";
} }
} }
} }
@@ -466,7 +482,7 @@ module kea-dhcp6 {
} }
container shared-networks { container shared-networks {
description "Shared networks."; description "Defines a list of IPv6 shared networks.";
list shared-network { list shared-network {
key name; key name;
leaf name { leaf name {
@@ -475,7 +491,7 @@ module kea-dhcp6 {
description "Shared network name."; description "Shared network name.";
} }
container subnet6 { container subnet6 {
description "Shared network subnet6 list."; description "List of IPv6 subnets that belong to this shared network.";
uses subnet6-list; uses subnet6-list;
} }
leaf interface { leaf interface {
@@ -490,7 +506,7 @@ module kea-dhcp6 {
uses rebind-timer; uses rebind-timer;
uses option-data-list; uses option-data-list;
container relay { container relay {
description "Relay."; description "Optional information about relay agent.";
uses relay; uses relay;
} }
leaf reservation-mode { leaf reservation-mode {
@@ -499,7 +515,8 @@ module kea-dhcp6 {
} }
leaf client-class { leaf client-class {
type string; type string;
description "Shared network client class guard."; description "Shared network client class guard (only clients belonging
to this class will be allowed in this shared network).";
} }
leaf-list require-client-classes { leaf-list require-client-classes {
type string; type string;
@@ -520,10 +537,11 @@ module kea-dhcp6 {
} }
container interfaces-config { container interfaces-config {
description "Interfaces configuration."; description "Network interfaces configuration.";
leaf-list interfaces { leaf-list interfaces {
type string; type string;
description "Interface name or name/address or *."; description "Name of the interface (e.g. eth0) or name/address
(e.g. eth0/2001:db8::1) or * (use all interfaces).";
} }
leaf re-detect { leaf re-detect {
type boolean; type boolean;
@@ -704,7 +722,8 @@ module kea-dhcp6 {
enum "TCP"; enum "TCP";
} }
default "UDP"; default "UDP";
description "Protocol to use for DHCP-DDNS."; description "Protocol to use for DHCP-DDNS communication.
Currently only UDP is supported.";
} }
leaf ncr-format { leaf ncr-format {
type enumeration { type enumeration {
@@ -744,21 +763,22 @@ module kea-dhcp6 {
} }
leaf hostname-char-set { leaf hostname-char-set {
type string; type string;
description "Invalid character set in hostnames."; description "A regex defining invalid characters. If detected, those
will be replaced by hostname-char-replacement.";
} }
leaf hostname-char-replacement { leaf hostname-char-replacement {
type string; type string;
description "Replacement for invalid charaters."; description "Replacement for invalid charaters. See hostname-char-set.";
} }
leaf user-context { leaf user-context {
type kea:user-context; type kea:user-context;
description "DHCP-DDNS user context."; description "DHCP-DDNS user context. Arbitrary JSON data can be stored here.";
} }
} }
leaf user-context { leaf user-context {
type kea:user-context; type kea:user-context;
description "DHCPv6 server user context."; description "DHCPv6 server user context. Arbitrary JSON data can be stored here.";
} }
container sanity-checks { container sanity-checks {