2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-03 15:35:17 +00:00

[65-libyang-simplify-update-models] Removed defaults

This commit is contained in:
Francis Dupont
2018-11-19 17:14:02 +01:00
parent a56b32bbc5
commit 5f1eea775b
6 changed files with 17 additions and 65 deletions

View File

@@ -8,9 +8,11 @@ module kea-ctrl-agent {
} }
import kea-types { import kea-types {
prefix kea; prefix kea;
revision-date 2018-09-14;
} }
import kea-logging { import kea-logging {
prefix logging; prefix logging;
revision-date 2018-11-11;
} }
organization "Internet Systems Consortium"; organization "Internet Systems Consortium";
@@ -18,7 +20,7 @@ module kea-ctrl-agent {
description "This model defines a YANG data model that can be description "This model defines a YANG data model that can be
used to configure and manage a Kea control agent."; used to configure and manage a Kea control agent.";
revision 2018-09-14 { revision 2018-11-11 {
description "Initial revision"; description "Initial revision";
reference ""; reference "";
} }
@@ -33,13 +35,11 @@ module kea-ctrl-agent {
leaf http-host { leaf http-host {
type inet:ip-address; type inet:ip-address;
default "127.0.0.1";
description "IP address to which HTTP service will be bound."; description "IP address to which HTTP service will be bound.";
} }
leaf http-port { leaf http-port {
type uint16; type uint16;
default 8000;
description "Port to which HTTP service will be bound."; description "Port to which HTTP service will be bound.";
} }

View File

@@ -8,9 +8,11 @@ module kea-dhcp-ddns {
} }
import kea-types { import kea-types {
prefix kea; prefix kea;
revision-date 2018-09-14;
} }
import kea-logging { import kea-logging {
prefix logging; prefix logging;
revision-date 2018-11-11;
} }
organization "Internet Systems Consortium"; organization "Internet Systems Consortium";
@@ -18,7 +20,7 @@ module kea-dhcp-ddns {
description "This model defines a YANG data model that can be description "This model defines a YANG data model that can be
used to configure and manage a Kea DHCP-DDNS server."; used to configure and manage a Kea DHCP-DDNS server.";
revision 2018-09-14 { revision 2018-11-11 {
description "Initial revision"; description "Initial revision";
reference ""; reference "";
} }
@@ -61,7 +63,6 @@ module kea-dhcp-ddns {
} }
leaf port { leaf port {
type uint16; type uint16;
default 53;
description "DNS server port."; description "DNS server port.";
} }
leaf user-context { leaf user-context {
@@ -88,13 +89,11 @@ module kea-dhcp-ddns {
leaf ip-address { leaf ip-address {
type inet:ip-address; type inet:ip-address;
default "127.0.0.1";
description "IP address on which the server listens for requests."; description "IP address on which the server listens for requests.";
} }
leaf port { leaf port {
type uint16; type uint16;
default 53001;
description "Port on which the server listens for requests."; description "Port on which the server listens for requests.";
} }
@@ -114,7 +113,6 @@ module kea-dhcp-ddns {
description "TCP transport"; description "TCP transport";
} }
} }
default "UDP";
description "Protocol to use when sending requests to the server."; description "Protocol to use when sending requests to the server.";
} }
@@ -124,7 +122,6 @@ module kea-dhcp-ddns {
description "JSON format"; description "JSON format";
} }
} }
default "JSON";
description "Packet format to use when sending requests to the server."; description "Packet format to use when sending requests to the server.";
} }
@@ -156,7 +153,6 @@ module kea-dhcp-ddns {
leaf digest-bits { leaf digest-bits {
type uint16; type uint16;
units "bits"; units "bits";
default 0;
description "Minimum truncated length. 0 means no truncation."; description "Minimum truncated length. 0 means no truncation.";
} }
leaf secret { leaf secret {

View File

@@ -8,13 +8,14 @@ module kea-dhcp-types {
} }
import kea-types { import kea-types {
prefix kea; prefix kea;
revision-date 2018-09-14;
} }
organization "Internet Systems Consortium"; organization "Internet Systems Consortium";
contact "kea-dev@lists.isc.org"; contact "kea-dev@lists.isc.org";
description "This file defines some commonly used Kea DHCP types and description "This file defines some commonly used Kea DHCP types and
groupings."; groupings.";
revision 2018-09-14 { revision 2018-11-11 {
description "Initial revision"; description "Initial revision";
reference ""; reference "";
} }
@@ -37,7 +38,6 @@ module kea-dhcp-types {
description "Allows only global host reservations."; description "Allows only global host reservations.";
} }
} }
default "all";
description "Host reservation mode."; description "Host reservation mode.";
} }
@@ -53,7 +53,6 @@ module kea-dhcp-types {
description "Expired-reclaimed"; description "Expired-reclaimed";
} }
} }
default "default";
description "Defines state of the lease."; description "Defines state of the lease.";
} }
@@ -112,7 +111,6 @@ module kea-dhcp-types {
} }
leaf persist { leaf persist {
type boolean; type boolean;
default true;
description "Write lease to disk file. This parameter applies only to description "Write lease to disk file. This parameter applies only to
memfile backend."; memfile backend.";
} }
@@ -123,12 +121,10 @@ module kea-dhcp-types {
leaf lfc-interval { leaf lfc-interval {
type uint32; type uint32;
units "seconds"; units "seconds";
default 3600;
description "Interval between two lease file cleanups."; description "Interval between two lease file cleanups.";
} }
leaf readonly { leaf readonly {
type boolean; type boolean;
default false;
description "If set to true, the database will be connected in description "If set to true, the database will be connected in
read-only mode. This does not make sense for lease read-only mode. This does not make sense for lease
databases, only for host reservations and possibly databases, only for host reservations and possibly
@@ -151,13 +147,11 @@ module kea-dhcp-types {
} }
leaf max-reconnect-tries { leaf max-reconnect-tries {
type uint32; type uint32;
default 0;
description "Maximum of recovery attempts before exit."; description "Maximum of recovery attempts before exit.";
} }
leaf reconnect-wait-time { leaf reconnect-wait-time {
type uint32; type uint32;
units "milliseconds"; units "milliseconds";
default 0;
description "Waiting delay between two recovery attempts."; description "Waiting delay between two recovery attempts.";
} }
leaf request-timeout { leaf request-timeout {
@@ -168,12 +162,10 @@ module kea-dhcp-types {
leaf tcp-keepalive { leaf tcp-keepalive {
type uint32; type uint32;
units "seconds"; units "seconds";
default 0;
description "TCP keepalive for the database connection."; description "TCP keepalive for the database connection.";
} }
leaf tcp-nodelay { leaf tcp-nodelay {
type boolean; type boolean;
default true;
description "TCP nodelay for the database connection."; description "TCP nodelay for the database connection.";
} }
uses kea:user-context { uses kea:user-context {
@@ -208,35 +200,29 @@ module kea-dhcp-types {
leaf reclaim-timer-wait-time { leaf reclaim-timer-wait-time {
type uint32; type uint32;
units "seconds"; units "seconds";
default 10;
description "Interval between reclamation cycles."; description "Interval between reclamation cycles.";
} }
leaf flush-reclaimed-timer-wait-time { leaf flush-reclaimed-timer-wait-time {
type uint32; type uint32;
units "seconds"; units "seconds";
default 25;
description "Interval between reclaimed leases collection."; description "Interval between reclaimed leases collection.";
} }
leaf hold-reclaimed-time { leaf hold-reclaimed-time {
type uint32; type uint32;
units "seconds"; units "seconds";
default 3600;
description "Hold timer for re-assignment."; description "Hold timer for re-assignment.";
} }
leaf max-reclaim-leases { leaf max-reclaim-leases {
type uint32; type uint32;
default 100;
description "Maximum number of reclaimed leases per cycle."; description "Maximum number of reclaimed leases per cycle.";
} }
leaf max-reclaim-time { leaf max-reclaim-time {
type uint32; type uint32;
units "milliseconds"; units "milliseconds";
default 250;
description "Maximum duration of a reclamation cycle."; description "Maximum duration of a reclamation cycle.";
} }
leaf unwarned-reclaim-cycles { leaf unwarned-reclaim-cycles {
type uint32; type uint32;
default 5;
description "Maximum numbers of uncomplete cycles before warning."; description "Maximum numbers of uncomplete cycles before warning.";
} }
} }
@@ -257,7 +243,6 @@ module kea-dhcp-types {
description "DHCP-DDNS client setup."; description "DHCP-DDNS client setup.";
leaf enable-updates { leaf enable-updates {
type boolean; type boolean;
default false;
description "Enable DHCP-DDNS updates."; description "Enable DHCP-DDNS updates.";
} }
leaf qualifying-suffix { leaf qualifying-suffix {
@@ -266,12 +251,10 @@ module kea-dhcp-types {
} }
leaf server-ip { leaf server-ip {
type inet:ip-address; type inet:ip-address;
default "127.0.0.1";
description "DHCP-DDNS server IP address."; description "DHCP-DDNS server IP address.";
} }
leaf server-port { leaf server-port {
type uint16; type uint16;
default 53001;
description "DHCP-DDNS server port."; description "DHCP-DDNS server port.";
} }
leaf sender-ip { leaf sender-ip {
@@ -284,7 +267,6 @@ module kea-dhcp-types {
} }
leaf max-queue-size { leaf max-queue-size {
type uint32; type uint32;
default 1024;
description "Maximum DHCP-DDNS queue size."; description "Maximum DHCP-DDNS queue size.";
} }
leaf ncr-protocol { leaf ncr-protocol {
@@ -296,7 +278,6 @@ module kea-dhcp-types {
description "TCP transport"; description "TCP transport";
} }
} }
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.";
} }
@@ -306,17 +287,14 @@ module kea-dhcp-types {
description "JSON format"; description "JSON format";
} }
} }
default "JSON";
description "Packet format to use for DHCP-DDNS."; description "Packet format to use for DHCP-DDNS.";
} }
leaf override-no-update { leaf override-no-update {
type boolean; type boolean;
default false;
description "Ignore client request and send update."; description "Ignore client request and send update.";
} }
leaf override-client-update { leaf override-client-update {
type boolean; type boolean;
default false;
description "Ignore client delegation."; description "Ignore client delegation.";
} }
leaf replace-client-name { leaf replace-client-name {
@@ -334,12 +312,10 @@ module kea-dhcp-types {
description "When the client did not send a name."; description "When the client did not send a name.";
} }
} }
default "never";
description "Replace the name provided by the client."; description "Replace the name provided by the client.";
} }
leaf generated-prefix { leaf generated-prefix {
type string; type string;
default "myhost";
description "DHCP-DDNS generated prefix."; description "DHCP-DDNS generated prefix.";
} }
leaf hostname-char-set { leaf hostname-char-set {
@@ -386,7 +362,6 @@ module kea-dhcp-types {
description "When a check fails reject the lease."; description "When a check fails reject the lease.";
} }
} }
default "warn";
description "Lease checks: verify subnet-id consistency on memfile description "Lease checks: verify subnet-id consistency on memfile
loading."; loading.";
} }
@@ -572,7 +547,6 @@ module kea-dhcp-types {
description "Interfaces re-detect grouping."; description "Interfaces re-detect grouping.";
leaf re-detect { leaf re-detect {
type boolean; type boolean;
default false;
description "Re-detect interfaces at each reconfiguration."; description "Re-detect interfaces at each reconfiguration.";
} }
} }
@@ -599,7 +573,6 @@ module kea-dhcp-types {
description "Client class only-if-required grouping."; description "Client class only-if-required grouping.";
leaf only-if-required { leaf only-if-required {
type boolean; type boolean;
default false;
description "Client class only if required flag."; description "Client class only if required flag.";
} }
} }
@@ -660,7 +633,6 @@ module kea-dhcp-types {
description "Option data csv-format grouping."; description "Option data csv-format grouping.";
leaf csv-format { leaf csv-format {
type boolean; type boolean;
default true;
description "If true, the option is specified as comma separated description "If true, the option is specified as comma separated
values. If false, it is expected as a hex string."; values. If false, it is expected as a hex string.";
} }
@@ -670,7 +642,6 @@ module kea-dhcp-types {
description "Option data always-send grouping."; description "Option data always-send grouping.";
leaf always-send { leaf always-send {
type boolean; type boolean;
default false;
description "Defines whether to always send the option, description "Defines whether to always send the option,
regardless if the client requested it or not."; regardless if the client requested it or not.";
} }
@@ -680,7 +651,6 @@ module kea-dhcp-types {
description "Option data array grouping."; description "Option data array grouping.";
leaf array { leaf array {
type boolean; type boolean;
default false;
description "Option definition array flag."; description "Option definition array flag.";
} }
} }
@@ -690,7 +660,6 @@ module kea-dhcp-types {
leaf decline-probation-period { leaf decline-probation-period {
type uint32; type uint32;
units "seconds"; units "seconds";
default 86400;
description "Decline probabation period."; description "Decline probabation period.";
} }
} }

View File

@@ -12,11 +12,11 @@ module kea-dhcp4-server {
} }
import kea-dhcp-types { import kea-dhcp-types {
prefix dhcp; prefix dhcp;
revision-date 2018-09-14; revision-date 2018-11-11;
} }
import kea-logging { import kea-logging {
prefix logging; prefix logging;
revision-date 2018-09-14; revision-date 2018-11-11;
} }
organization "Internet Systems Consortium"; organization "Internet Systems Consortium";
@@ -24,7 +24,7 @@ module kea-dhcp4-server {
description "This model defines a YANG data model that can be description "This model defines a YANG data model that can be
used to configure and manage a Kea DHCPv4 server."; used to configure and manage a Kea DHCPv4 server.";
revision 2018-11-11 { revision 2018-11-12 {
description "Initial revision"; description "Initial revision";
reference ""; reference "";
} }
@@ -60,7 +60,6 @@ module kea-dhcp4-server {
description "Match client ID grouping."; description "Match client ID grouping.";
leaf match-client-id { leaf match-client-id {
type boolean; type boolean;
default true;
description "Use client-id for lease lookups. If set to false, client-id description "Use client-id for lease lookups. If set to false, client-id
will be ignored."; will be ignored.";
} }
@@ -350,7 +349,6 @@ module kea-dhcp4-server {
description "DHCP service uses UDP sockets."; description "DHCP service uses UDP sockets.";
} }
} }
default "raw";
description "Type of sockets to use."; description "Type of sockets to use.";
} }
leaf outbound-interface { leaf outbound-interface {
@@ -363,7 +361,6 @@ module kea-dhcp4-server {
description "Use kernel routing."; description "Use kernel routing.";
} }
} }
default "same-as-inbound";
description "Control the interface used to send a response."; description "Control the interface used to send a response.";
} }
uses dhcp:interfaces-re-detect; uses dhcp:interfaces-re-detect;
@@ -397,7 +394,6 @@ module kea-dhcp4-server {
leaf echo-client-id { leaf echo-client-id {
type boolean; type boolean;
default true;
description "Send client-id back when the client sent it. This description "Send client-id back when the client sent it. This
is conformant with RFC6842, but some older, buggy is conformant with RFC6842, but some older, buggy
clients have problems with it."; clients have problems with it.";
@@ -473,22 +469,18 @@ module kea-dhcp4-server {
} }
leaf fqdn-fwd { leaf fqdn-fwd {
type boolean; type boolean;
default false;
description "Lease FQDN forward flag."; description "Lease FQDN forward flag.";
} }
leaf fqdn-rev { leaf fqdn-rev {
type boolean; type boolean;
default false;
description "Lease FQDN reverse lag."; description "Lease FQDN reverse lag.";
} }
leaf hostname { leaf hostname {
type string; type string;
default "";
description "Lease hostname."; description "Lease hostname.";
} }
leaf state { leaf state {
type dhcp:lease-state; type dhcp:lease-state;
default "default";
description "Lease state."; description "Lease state.";
} }
leaf user-context { leaf user-context {

View File

@@ -8,12 +8,15 @@ module kea-dhcp6-server {
} }
import kea-types { import kea-types {
prefix kea; prefix kea;
revision-date 2018-09-14;
} }
import kea-dhcp-types { import kea-dhcp-types {
prefix dhcp; prefix dhcp;
revision-date 2018-11-11;
} }
import kea-logging { import kea-logging {
prefix logging; prefix logging;
revision-date 2018-11-11;
} }
@@ -22,7 +25,7 @@ module kea-dhcp6-server {
description "This model defines a YANG data model that can be description "This model defines a YANG data model that can be
used to configure and manage a Kea DHCPv6 server."; used to configure and manage a Kea DHCPv6 server.";
revision 2018-09-14 { revision 2018-11-12 {
description "Initial revision"; description "Initial revision";
reference ""; reference "";
} }
@@ -77,7 +80,6 @@ module kea-dhcp6-server {
description "Rapid commit grouping."; description "Rapid commit grouping.";
leaf rapid-commit { leaf rapid-commit {
type boolean; type boolean;
default false;
description "Rapid commit entry."; description "Rapid commit entry.";
} }
} }
@@ -423,7 +425,6 @@ module kea-dhcp6-server {
} }
leaf persist { leaf persist {
type boolean; type boolean;
default true;
description "Server DUID persist flag."; description "Server DUID persist flag.";
} }
leaf user-context { leaf user-context {
@@ -528,22 +529,18 @@ module kea-dhcp6-server {
} }
leaf fqdn-fwd { leaf fqdn-fwd {
type boolean; type boolean;
default false;
description "Lease FQDN forward flag."; description "Lease FQDN forward flag.";
} }
leaf fqdn-rev { leaf fqdn-rev {
type boolean; type boolean;
default false;
description "Lease FQDN reverse lag."; description "Lease FQDN reverse lag.";
} }
leaf hostname { leaf hostname {
type string; type string;
default "";
description "Lease hostname."; description "Lease hostname.";
} }
leaf state { leaf state {
type dhcp:lease-state; type dhcp:lease-state;
default "default";
description "Lease state."; description "Lease state.";
} }
leaf user-context { leaf user-context {

View File

@@ -5,6 +5,7 @@ module kea-logging {
import kea-types { import kea-types {
prefix kea; prefix kea;
revision-date 2018-09-14;
} }
organization "Internet Systems Consortium"; organization "Internet Systems Consortium";
@@ -12,7 +13,7 @@ module kea-logging {
description "This model defines a YANG data model that can be description "This model defines a YANG data model that can be
used to configure and manage logging of a Kea server."; used to configure and manage logging of a Kea server.";
revision 2018-09-14 { revision 2018-11-11 {
description "Initial revision"; description "Initial revision";
reference ""; reference "";
} }
@@ -48,12 +49,10 @@ module kea-logging {
} }
leaf flush { leaf flush {
type boolean; type boolean;
default true;
description "When true flush buffers after each message."; description "When true flush buffers after each message.";
} }
leaf maxsize { leaf maxsize {
type uint32; type uint32;
default 10240000;
description "Maximum size of output file before rotation. description "Maximum size of output file before rotation.
Values below 204800 including 0 disable rotation."; Values below 204800 including 0 disable rotation.";
} }
@@ -61,7 +60,6 @@ module kea-logging {
type uint32 { type uint32 {
range 1..max; range 1..max;
} }
default 1;
description "Maximum version to keep a rotated output file."; description "Maximum version to keep a rotated output file.";
} }
} }