summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancis Dupont <fdupont@isc.org>2018-09-12 23:54:01 +0200
committerFrancis Dupont <fdupont@isc.org>2018-09-12 23:54:01 +0200
commit18baf018da8001d6f1fb7ee3771e6e77d9f5a2e3 (patch)
tree9f58621fcfbb72abe741f3bf4427d9f3b4830222
parent[65-libyang-models] Added presence to container with mandatory elements (diff)
downloadkea-18baf018da8001d6f1fb7ee3771e6e77d9f5a2e3.tar.xz
kea-18baf018da8001d6f1fb7ee3771e6e77d9f5a2e3.zip
[65-libyang-models] Updated from pyang feedback
-rw-r--r--src/lib/yang/models/kea-control-agent.yang23
-rw-r--r--src/lib/yang/models/kea-dhcp-types.yang138
-rw-r--r--src/lib/yang/models/kea-dhcp4.yang55
-rw-r--r--src/lib/yang/models/kea-dhcp6.yang72
-rw-r--r--src/lib/yang/models/kea-dhcpddns.yang26
-rw-r--r--src/lib/yang/models/kea-logging.yang12
-rw-r--r--src/lib/yang/models/kea-types.yang17
7 files changed, 252 insertions, 91 deletions
diff --git a/src/lib/yang/models/kea-control-agent.yang b/src/lib/yang/models/kea-control-agent.yang
index b9c69aa3b0..e10c86adb5 100644
--- a/src/lib/yang/models/kea-control-agent.yang
+++ b/src/lib/yang/models/kea-control-agent.yang
@@ -1,14 +1,11 @@
module kea-control-agent {
yang-version 1.1;
- namespace "urn:ietf:params:xml:ns:yang::kea-control-agent";
+ namespace "urn:ietf:params:xml:ns:yang:kea-control-agent";
prefix "kea-control-agent";
import ietf-inet-types {
prefix inet;
}
- import ietf-yang-types {
- prefix yang;
- }
import kea-types {
prefix kea;
}
@@ -31,8 +28,8 @@ module kea-control-agent {
*/
container config {
+ // config true;
description "Contains control agent configuration.";
- config true;
leaf http-host {
type inet:ip-address;
@@ -47,13 +44,21 @@ module kea-control-agent {
}
container control-sockets {
+ description "Control sockets.";
list socket {
key server-type;
+ description "List of server control socket.";
leaf server-type {
type enumeration {
- enum "dhcp4";
- enum "dhcp6";
- enum "d2";
+ enum "dhcp4" {
+ description "kea-dhcp4 server";
+ }
+ enum "dhcp6" {
+ description "kea-dhcp6 server";
+ }
+ enum "d2" {
+ description "kea-dhcp-ddns server";
+ }
}
mandatory true;
description "Server type.";
@@ -74,8 +79,8 @@ module kea-control-agent {
}
container logging {
+ // config true;
description "Logging";
- config true;
uses logging:configuration;
}
diff --git a/src/lib/yang/models/kea-dhcp-types.yang b/src/lib/yang/models/kea-dhcp-types.yang
index 12ae6e493a..3e236c29dd 100644
--- a/src/lib/yang/models/kea-dhcp-types.yang
+++ b/src/lib/yang/models/kea-dhcp-types.yang
@@ -1,14 +1,11 @@
module kea-dhcp-types {
yang-version 1.1;
- namespace "urn:ietf:params:xml:ns:yang::kea-dhcp-types";
+ namespace "urn:ietf:params:xml:ns:yang:kea-dhcp-types";
prefix "kea-dhcp-types";
import ietf-inet-types {
prefix inet;
}
- import ietf-yang-types {
- prefix yang;
- }
import kea-types {
prefix kea;
}
@@ -27,19 +24,36 @@ module kea-dhcp-types {
*/
typedef host-reservation-mode {
type enumeration {
- enum "disabled";
- enum "out-of-pool";
- enum "all";
+ enum "disabled" {
+ description "Host reservation support is disabled.";
+ }
+ enum "out-of-pool" {
+ description "Allows only out of pool host reservations.";
+ }
+ enum "all" {
+ description "Allows both in pool and out of pool host reservations.";
+ }
+ enum "global" {
+ description "Allows only global host reservations.";
+ }
}
+ default "all";
description "Host reservation mode.";
}
typedef lease-state {
type enumeration {
- enum "default";
- enum "declined";
- enum "expired-reclaimed";
+ enum "default" {
+ description "Active/default";
+ }
+ enum "declined" {
+ description "Declined";
+ }
+ enum "expired-reclaimed" {
+ description "Expired-reclaimed";
+ }
}
+ default "default";
description "Defines state of the lease.";
}
@@ -47,30 +61,34 @@ module kea-dhcp-types {
* Grouping
*/
grouping valid-lifetime {
+ description "Valid lifetime grouping.";
leaf valid-lifetime {
type uint32;
units "seconds";
- description "Valid lifetime.";
+ description "Valid lifetime entry.";
}
}
grouping renew-timer {
+ description "Renew timer grouping.";
leaf renew-timer {
type uint32;
units "seconds";
- description "Renew timer.";
+ description "Renew timer entry.";
}
}
grouping rebind-timer {
+ description "Rebind timer grouping.";
leaf rebind-timer {
type uint32;
units "seconds";
- description "Rebind timer.";
+ description "Rebind timer entry.";
}
}
grouping database {
+ description "Database grouping.";
leaf database-type {
type string;
mandatory true;
@@ -138,8 +156,8 @@ module kea-dhcp-types {
}
leaf reconnect-wait-time {
type uint32;
- default 0;
units "milliseconds";
+ default 0;
description "Waiting delay between two recovery attempts.";
}
leaf request-timeout {
@@ -167,21 +185,24 @@ module kea-dhcp-types {
}
grouping databases {
+ description "Databases grouping.";
container lease-database {
- description "Lease database.";
presence "Have lease database.";
+ description "Lease database.";
uses database;
}
container hosts-databases {
description "Hosts databases.";
list hosts-database {
key database-type;
+ description "List of databases.";
uses database;
}
}
}
grouping expired-leases-processing {
+ description "Expired leases processing grouping.";
container expired-leases-processing {
description "Expired leases processing setup.";
leaf reclaim-timer-wait-time {
@@ -222,14 +243,16 @@ module kea-dhcp-types {
}
grouping control-socket {
+ description "Control socket grouping.";
container control-socket {
- description "Control socket";
presence "Have control socket.";
+ description "Control socket container.";
uses kea:control-socket;
}
}
grouping dhcp-ddns {
+ description "DHCP-DDNS grouping.";
container dhcp-ddns {
description "DHCP-DDNS client setup.";
leaf enable-updates {
@@ -266,8 +289,12 @@ module kea-dhcp-types {
}
leaf ncr-protocol {
type enumeration {
- enum "UDP";
- enum "TCP";
+ enum "UDP" {
+ description "UDP transport";
+ }
+ enum "TCP" {
+ description "TCP transport";
+ }
}
default "UDP";
description "Protocol to use for DHCP-DDNS communication.
@@ -275,7 +302,9 @@ module kea-dhcp-types {
}
leaf ncr-format {
type enumeration {
- enum "JSON";
+ enum "JSON" {
+ description "JSON format";
+ }
}
default "JSON";
description "Packet format to use for DHCP-DDNS.";
@@ -296,10 +325,18 @@ module kea-dhcp-types {
}
leaf replace-client-name {
type enumeration {
- enum "when-present";
- enum "never";
- enum "always";
- enum "when-not-present";
+ enum "when-present" {
+ description "When the client sent a name.";
+ }
+ enum "never" {
+ description "Never replace or generate a name.";
+ }
+ enum "always" {
+ description "Always replace or generate a name.";
+ }
+ enum "when-not-present" {
+ description "When the client did not send a name.";
+ }
}
default "never";
description "Replace the name provided by the client.";
@@ -329,8 +366,9 @@ module kea-dhcp-types {
}
grouping sanity-checks {
+ description "Sanity checks grouping.";
container sanity-checks {
- description "Sanity checks.";
+ description "Sanity checks container.";
leaf lease-checks {
type enumeration {
enum "none" {
@@ -360,12 +398,15 @@ module kea-dhcp-types {
}
grouping client-class {
+ description "Client class grouping.";
leaf client-class {
type string;
+ description "Client class entry.";
}
}
grouping pool-client-class {
+ description "Client class grouping for a pool.";
uses client-class {
refine client-class {
description "Pool client class guard (only clients belonging
@@ -375,6 +416,7 @@ module kea-dhcp-types {
}
grouping subnet-client-class {
+ description "Client class grouping for a subnet.";
uses client-class {
refine client-class {
description "Subnet client class guard (only clients belonging to this
@@ -384,6 +426,7 @@ module kea-dhcp-types {
}
grouping network-client-class {
+ description "Client class grouping for a shared network.";
uses client-class {
refine client-class {
description "Shared network client class guard (only clients
@@ -394,12 +437,15 @@ module kea-dhcp-types {
}
grouping require-client-classes {
+ description "Require client classes grouping.";
leaf-list require-client-classes {
type string;
+ description "List of client classes.";
}
}
grouping pool-require-client-classes {
+ description "Require client classes grouping for a pool.";
uses require-client-classes {
refine require-client-classes {
description "Pool require client classes.";
@@ -408,6 +454,7 @@ module kea-dhcp-types {
}
grouping subnet-require-client-classes {
+ description "Require client classes grouping for a subnet.";
uses require-client-classes {
refine require-client-classes {
description "Subnet require client classes.";
@@ -416,6 +463,7 @@ module kea-dhcp-types {
}
grouping network-require-client-classes {
+ description "Require client classes grouping for a shared network.";
uses require-client-classes {
refine require-client-classes {
description "Shared network require client classes.";
@@ -424,12 +472,15 @@ module kea-dhcp-types {
}
grouping interface {
+ description "Interface grouping.";
leaf interface {
type string;
+ description "Interface entry.";
}
}
grouping subnet-interface {
+ description "Interface grouping for a subnet.";
uses interface {
refine interface {
description "Name of the network interface this subnet is directly
@@ -439,6 +490,7 @@ module kea-dhcp-types {
}
grouping network-interface {
+ description "Interface grouping for a shared network.";
uses interface {
refine interface {
description "Specifies the network interface this shared network is
@@ -447,13 +499,17 @@ module kea-dhcp-types {
}
}
+ // To move to DHCPv6.
grouping interface-id {
+ description "Interface ID grouping.";
leaf interface-id {
type string;
+ description "Interface ID entry.";
}
}
grouping subnet-interface-id {
+ description "Interface ID grouping for a subnet.";
uses interface-id {
refine interface-id {
description "Subnet interface-id option.";
@@ -462,6 +518,7 @@ module kea-dhcp-types {
}
grouping network-interface-id {
+ description "Interface ID grouping for a shared network.";
uses interface-id {
refine interface-id {
description "Shared network interface-id option.";
@@ -470,6 +527,7 @@ module kea-dhcp-types {
}
grouping subnet-id {
+ description "Subnet ID grouping.";
leaf id {
type uint32 {
range 1..max;
@@ -481,6 +539,7 @@ module kea-dhcp-types {
}
grouping host-identifier {
+ description "Host identifier grouping.";
leaf identifier {
type string;
description "Host identifier.";
@@ -488,6 +547,7 @@ module kea-dhcp-types {
}
grouping host-hostname {
+ description "Host DNS name grouping.";
leaf hostname {
type string;
description "Host DNS name.";
@@ -495,6 +555,7 @@ module kea-dhcp-types {
}
grouping host-client-classes {
+ description "Host client classes grouping.";
leaf-list client-classes {
type string;
description "Host client classes (if host identifier matches, a
@@ -504,6 +565,7 @@ module kea-dhcp-types {
}
grouping host-subnet-id {
+ description "Host subnet ID grouping.";
leaf subnet-id {
type uint32;
mandatory true;
@@ -512,12 +574,15 @@ module kea-dhcp-types {
}
grouping reservation-mode {
+ description "Reservation mode grouping.";
leaf reservation-mode {
type host-reservation-mode;
+ description "Reservation mode entry.";
}
}
grouping subnet-reservation-mode {
+ description "Reservation mode grouping for a subnet.";
uses reservation-mode {
refine reservation-mode {
description "Subnet host reservation mode.";
@@ -526,6 +591,7 @@ module kea-dhcp-types {
}
grouping network-reservation-mode {
+ description "Reservation mode grouping for a shared network.";
uses reservation-mode {
refine reservation-mode {
description "Shared network host reservation mode.";
@@ -534,6 +600,7 @@ module kea-dhcp-types {
}
grouping interfaces-re-detect {
+ description "Interfaces re-detect grouping.";
leaf re-detect {
type boolean;
default false;
@@ -542,6 +609,7 @@ module kea-dhcp-types {
}
grouping class-name {
+ description "Client class name grouping.";
leaf name {
type string;
mandatory true;
@@ -550,6 +618,7 @@ module kea-dhcp-types {
}
grouping class-test {
+ description "Client class test grouping.";
leaf test {
type string;
description "Defines an expression that evaluates every incoming
@@ -558,6 +627,7 @@ module kea-dhcp-types {
}
grouping class-only-if-required {
+ description "Client class only-if-required grouping.";
leaf only-if-required {
type boolean;
default false;
@@ -566,6 +636,7 @@ module kea-dhcp-types {
}
grouping option-def-name {
+ description "Option definition name grouping.";
leaf name {
type string;
mandatory true;
@@ -574,6 +645,7 @@ module kea-dhcp-types {
}
grouping option-def-type {
+ description "Option definition type grouping.";
leaf type {
type string;
mandatory true;
@@ -583,6 +655,7 @@ module kea-dhcp-types {
}
grouping option-def-record-types {
+ description "Option definition record types grouping.";
leaf record-types {
type string;
description "Option definition record types.";
@@ -590,6 +663,7 @@ module kea-dhcp-types {
}
grouping option-def-encapsulate {
+ description "Option definition encapsulate grouping.";
leaf encapsulate {
type string;
description "Defines option space this new option encapsulates.
@@ -598,6 +672,7 @@ module kea-dhcp-types {
}
grouping option-data-name {
+ description "Option data name grouping.";
leaf name {
type string;
description "Option name.";
@@ -605,6 +680,7 @@ module kea-dhcp-types {
}
grouping option-data-data {
+ description "Option data data grouping.";
leaf data {
type string;
description "Option data.";
@@ -612,6 +688,7 @@ module kea-dhcp-types {
}
grouping option-data-csv-format {
+ description "Option data csv-format grouping.";
leaf csv-format {
type boolean;
default true;
@@ -621,6 +698,7 @@ module kea-dhcp-types {
}
grouping option-data-always-send {
+ description "Option data always-send grouping.";
leaf always-send {
type boolean;
default false;
@@ -630,6 +708,7 @@ module kea-dhcp-types {
}
grouping option-def-array {
+ description "Option data array grouping.";
leaf array {
type boolean;
default false;
@@ -638,6 +717,7 @@ module kea-dhcp-types {
}
grouping decline-probation-period {
+ description "Decline probation period grouping.";
leaf decline-probation-period {
type uint32;
units "seconds";
@@ -647,6 +727,7 @@ module kea-dhcp-types {
}
grouping network-name {
+ description "Shared network name grouping.";
leaf name {
type string;
mandatory true;
@@ -655,6 +736,7 @@ module kea-dhcp-types {
}
grouping dhcp4o6-port {
+ description "DHCPv4-over-DHCPv6 port grouping.";
leaf dhcp4o6-port {
type uint16;
description "DHCPv4-over-DHCPv6 interserver port.";
@@ -662,6 +744,7 @@ module kea-dhcp-types {
}
grouping pool-user-context {
+ description "User context grouping for a pool.";
uses kea:user-context {
refine user-context {
description "Pool user context. Arbitrary JSON data can be
@@ -671,6 +754,7 @@ module kea-dhcp-types {
}
grouping host-user-context {
+ description "User context grouping for a host reservation.";
uses kea:user-context {
refine user-context {
description "Host user context. Arbitrary JSON data can be
@@ -680,6 +764,7 @@ module kea-dhcp-types {
}
grouping subnet-user-context {
+ description "User context grouping for a subnet.";
uses kea:user-context {
refine user-context {
description "Subnet user context. Arbitrary JSON data can be
@@ -689,6 +774,7 @@ module kea-dhcp-types {
}
grouping network-user-context {
+ description "User context grouping for a shared network.";
uses kea:user-context {
refine user-context {
description "Shared network user context. Arbitrary JSON data can be
@@ -698,6 +784,7 @@ module kea-dhcp-types {
}
grouping interfaces-user-context {
+ description "User context grouping for interfaces.";
uses kea:user-context {
refine user-context {
description "Interfaces user context. Arbitrary JSON data can
@@ -707,6 +794,7 @@ module kea-dhcp-types {
}
grouping class-user-context {
+ description "User context grouping for a client class.";
uses kea:user-context {
refine user-context {
description "Client class user context. Arbitrary JSON data can
@@ -716,6 +804,7 @@ module kea-dhcp-types {
}
grouping option-def-user-context {
+ description "User context grouping for an option definition.";
uses kea:user-context {
refine user-context {
description "Option definition user context. Arbitrary JSON data
@@ -725,6 +814,7 @@ module kea-dhcp-types {
}
grouping option-data-user-context {
+ description "User context grouping for an option data.";
uses kea:user-context {
refine user-context {
description "Option user context. Arbitrary JSON data can be
diff --git a/src/lib/yang/models/kea-dhcp4.yang b/src/lib/yang/models/kea-dhcp4.yang
index 6f62e6362e..0e25302f4c 100644
--- a/src/lib/yang/models/kea-dhcp4.yang
+++ b/src/lib/yang/models/kea-dhcp4.yang
@@ -1,14 +1,11 @@
module kea-dhcp4 {
yang-version 1.1;
- namespace "urn:ietf:params:xml:ns:yang::kea-dhcp4";
+ namespace "urn:ietf:params:xml:ns:yang:kea-dhcp4";
prefix "kea-dhcp4";
import ietf-inet-types {
prefix inet;
}
- import ietf-yang-types {
- prefix yang;
- }
import kea-types {
prefix kea;
}
@@ -34,11 +31,21 @@ module kea-dhcp4 {
*/
typedef host-identifier-type {
type enumeration {
- enum "duid";
- enum "hw-address";
- enum "circuit-id";
- enum "client-id";
- enum "flex-id";
+ enum "duid" {
+ description "DUID";
+ }
+ enum "hw-address" {
+ description "Hardware address";
+ }
+ enum "circuit-id" {
+ description "Circuit-id option";
+ }
+ enum "client-id" {
+ description "Client identifier";
+ }
+ enum "flex-id" {
+ description "Flexible identifier";
+ }
}
description "Host identifier type.";
}
@@ -47,6 +54,7 @@ module kea-dhcp4 {
* Groupings
*/
grouping match-client-id {
+ description "Match client ID grouping.";
leaf match-client-id {
type boolean;
default true;
@@ -56,6 +64,7 @@ module kea-dhcp4 {
}
grouping next-server {
+ description "Next server address grouping.";
leaf next-server {
type inet:ipv4-address;
description "Next server IPv4 address. If set, this value will be set
@@ -64,6 +73,7 @@ module kea-dhcp4 {
}
grouping server-hostname {
+ description "Server hostname grouping.";
leaf server-hostname {
type string;
description "Server hostname (up to 64 bytes).";
@@ -71,6 +81,7 @@ module kea-dhcp4 {
}
grouping boot-file-name {
+ description "Boot file name grouping.";
leaf boot-file-name {
type string;
description "Boot file name (up to 128 bytes).";
@@ -78,6 +89,7 @@ module kea-dhcp4 {
}
grouping relay {
+ description "Relay grouping.";
leaf-list ip-addresses {
type inet:ipv4-address;
description "IPv4 addresses.";
@@ -85,18 +97,21 @@ module kea-dhcp4 {
}
grouping subnet4-list {
- description "Subnet4 list.";
+ description "Subnet4 list grouping.";
list subnet4 {
key id;
ordered-by user;
+ description "List of IPv4 subnets.";
uses dhcp:valid-lifetime;
uses dhcp:renew-timer;
uses dhcp:rebind-timer;
uses option-data-list;
container pools {
+ description "List of pools.";
list pool {
key "start-address end-address";
ordered-by user;
+ description "Pool entry.";
leaf prefix {
type inet:ipv4-prefix;
description "Defines a pool of dynamic IPv4 addresses to be managed
@@ -133,6 +148,7 @@ module kea-dhcp4 {
this IPv4 subnet.";
list host {
key "identifier-type identifier";
+ description "Host reservation entry.";
leaf identifier-type {
type host-identifier-type;
description "Host identifier type.";
@@ -177,6 +193,7 @@ module kea-dhcp4 {
}
grouping client-class {
+ description "Client class grouping.";
uses dhcp:class-name;
uses dhcp:class-test;
uses dhcp:class-only-if-required;
@@ -189,10 +206,12 @@ module kea-dhcp4 {
}
grouping option-def-list {
+ description "Option definition list grouping.";
container option-def-list {
description "List with custom option definitions.";
list option-def {
key "code space";
+ description "Option definition entry.";
leaf code {
type uint8;
mandatory true;
@@ -214,10 +233,12 @@ module kea-dhcp4 {
}
grouping option-data-list {
+ description "Option data list grouping.";
container option-data-list {
description "Option data list.";
list option-data {
key "code space";
+ description "Option data entry.";
leaf code {
type uint8;
mandatory true;
@@ -242,8 +263,8 @@ module kea-dhcp4 {
*/
container config {
+ // config true;
description "Contains DHCPv4 server configuration.";
- config true;
uses dhcp:valid-lifetime;
uses dhcp:renew-timer;
@@ -259,6 +280,7 @@ module kea-dhcp4 {
description "Defines a list of IPv4 shared networks.";
list shared-network {
key name;
+ description "List of IPv4 shared networks.";
uses dhcp:network-name;
container subnet4 {
description "List of IPv4 subnets that belong to this shared
@@ -325,7 +347,7 @@ module kea-dhcp4 {
leaf-list host-reservation-identifiers {
type host-identifier-type;
- description "Host reservation identifier.";
+ description "Host reservation identifiers.";
}
container client-classes {
@@ -333,6 +355,7 @@ module kea-dhcp4 {
list client-class {
key name;
ordered-by user;
+ description "List of client classes.";
uses client-class;
}
}
@@ -367,8 +390,8 @@ module kea-dhcp4 {
}
container logging {
+ // config true;
description "Logging";
- config true;
uses logging:configuration;
}
@@ -377,13 +400,14 @@ module kea-dhcp4 {
* State data
*/
container state {
- description "State of Kea DHCPv4 server.";
config false;
+ description "State of Kea DHCPv4 server.";
container leases {
description "Kea DHCPv4 leases.";
list lease {
key ip-address;
+ description "List of Kea DHCPv4 leases.";
leaf ip-address {
type inet:ipv4-address;
mandatory true;
@@ -442,8 +466,10 @@ module kea-dhcp4 {
}
container lease-stats {
+ description "Lease statistics.";
list subnet {
key subnet-id;
+ description "List of IPv4 subnets.";
leaf subnet-id {
type uint32;
mandatory true;
@@ -471,6 +497,7 @@ module kea-dhcp4 {
description "Kea DHCPv4 hosts.";
list host {
key "subnet-id identifier-type identifier";
+ description "List of Kea DHCPv4 hosts.";
leaf identifier-type {
type host-identifier-type;
mandatory true;
diff --git a/src/lib/yang/models/kea-dhcp6.yang b/src/lib/yang/models/kea-dhcp6.yang
index 55372493f2..20cf85beeb 100644
--- a/src/lib/yang/models/kea-dhcp6.yang
+++ b/src/lib/yang/models/kea-dhcp6.yang
@@ -1,14 +1,11 @@
module kea-dhcp6 {
yang-version 1.1;
- namespace "urn:ietf:params:xml:ns:yang::kea-dhcp6";
+ namespace "urn:ietf:params:xml:ns:yang:kea-dhcp6";
prefix "kea-dhcp6";
import ietf-inet-types {
prefix inet;
}
- import ietf-yang-types {
- prefix yang;
- }
import kea-types {
prefix kea;
}
@@ -35,9 +32,15 @@ module kea-dhcp6 {
*/
typedef host-identifier-type {
type enumeration {
- enum "duid";
- enum "hw-address";
- enum "flex-id";
+ enum "duid" {
+ description "DUID";
+ }
+ enum "hw-address" {
+ description "Hardware address";
+ }
+ enum "flex-id" {
+ description "Flexible identifier";
+ }
}
description "Host identifier type.";
}
@@ -46,6 +49,7 @@ module kea-dhcp6 {
* Groupings
*/
grouping preferred-lifetime {
+ description "Preferred lifetime grouping.";
leaf preferred-lifetime {
type uint32;
units "seconds";
@@ -54,6 +58,7 @@ module kea-dhcp6 {
}
grouping relay {
+ description "Relay grouping.";
leaf-list ip-addresses {
type inet:ipv6-address;
description "IPv6 addresses.";
@@ -61,26 +66,31 @@ module kea-dhcp6 {
}
grouping rapid-commit {
+ description "Rapid commit grouping.";
leaf rapid-commit {
type boolean;
default false;
+ description "Rapid commit entry.";
}
}
grouping subnet6-list {
- description "Subnet6 list.";
+ description "Subnet6 list grouping.";
list subnet6 {
key id;
ordered-by user;
+ description "List of IPv6 subnets.";
uses preferred-lifetime;
uses dhcp:valid-lifetime;
uses dhcp:renew-timer;
uses dhcp:rebind-timer;
uses option-data-list;
container pools {
+ description "List of pools.";
list pool {
key "start-address end-address";
ordered-by user;
+ description "Pool entry.";
leaf prefix {
type inet:ipv6-prefix;
description "Pool prefix.";
@@ -102,9 +112,11 @@ module kea-dhcp6 {
}
}
container pd-pools {
+ description "List of prefix delegation pools.";
list pd-pool {
key prefix;
ordered-by user;
+ description "Prefix delegation pool entry.";
leaf prefix {
type inet:ipv6-prefix;
mandatory true;
@@ -159,6 +171,7 @@ module kea-dhcp6 {
this IPv6 subnet.";
list host {
key "identifier-type identifier";
+ description "Host reservation entry.";
leaf identifier-type {
type host-identifier-type;
mandatory true;
@@ -189,6 +202,7 @@ module kea-dhcp6 {
}
grouping client-class {
+ description "Client class grouping.";
uses dhcp:class-name;
uses dhcp:class-test;
uses dhcp:class-only-if-required;
@@ -197,10 +211,12 @@ module kea-dhcp6 {
}
grouping option-def-list {
+ description "Option definition list grouping.";
container option-def-list {
description "Option definition list.";
list option-def {
key "code space";
+ description "Option definition entry.";
leaf code {
type uint16;
mandatory true;
@@ -222,10 +238,12 @@ module kea-dhcp6 {
}
grouping option-data-list {
+ description "Option data list grouping.";
container option-data-list {
description "Option data list.";
list option-data {
key "code space";
+ description "Option data entry.";
leaf code {
type uint16;
mandatory true;
@@ -250,8 +268,8 @@ module kea-dhcp6 {
*/
container config {
+ // config true;
description "Contains DHCPv6 server configuration.";
- config true;
uses preferred-lifetime;
uses dhcp:valid-lifetime;
@@ -269,6 +287,7 @@ module kea-dhcp6 {
list shared-network {
key name;
uses dhcp:network-name;
+ description "List of IPv4 shared networks.";
container subnet6 {
description "List of IPv6 subnets that belong to this shared
network.";
@@ -322,7 +341,7 @@ module kea-dhcp6 {
leaf-list host-reservation-identifiers {
type host-identifier-type;
- description "Host reservation identifier.";
+ description "Host reservation identifiers.";
}
container client-classes {
@@ -330,6 +349,7 @@ module kea-dhcp6 {
list client-class {
key name;
ordered-by user;
+ description "List of client classes.";
uses client-class;
}
}
@@ -343,9 +363,15 @@ module kea-dhcp6 {
description "Server DUID.";
leaf type {
type enumeration {
- enum "LLT";
- enum "EN";
- enum "LL";
+ enum "LLT" {
+ description "Link-layer address and timestamp.";
+ }
+ enum "EN" {
+ description "Enterprise number.";
+ }
+ enum "LL" {
+ description "Link-layer address.";
+ }
}
description "Server DIOD type.";
}
@@ -389,8 +415,8 @@ module kea-dhcp6 {
}
container logging {
+ // config true;
description "Logging";
- config true;
uses logging:configuration;
}
@@ -399,13 +425,14 @@ module kea-dhcp6 {
* State data
*/
container state {
- description "State of Kea DHCPv6 server.";
config false;
+ description "State of Kea DHCPv6 server.";
container leases {
description "Kea DHCPv6 leases.";
list lease {
key ip-address;
+ description "List of Kea DHCPv6 leases.";
leaf ip-address {
type inet:ipv6-address;
mandatory true;
@@ -440,9 +467,15 @@ module kea-dhcp6 {
}
leaf lease-type {
type enumeration {
- enum "IA_NA";
- enum "IA_TA";
- enum "IA_PD";
+ enum "IA_NA" {
+ description "Identity association for non-temporary addresses.";
+ }
+ enum "IA_TA" {
+ description "Identity association for temporary addresses.";
+ }
+ enum "IA_PD" {
+ description "Identity association for prefix delegation.";
+ }
}
mandatory true;
description "Lease IA type.";
@@ -490,8 +523,10 @@ module kea-dhcp6 {
}
container lease-stats {
+ description "Lease statistics.";
list subnet {
key subnet-id;
+ description "List of IPv6 subnets.";
leaf subnet-id {
type uint32;
mandatory true;
@@ -529,6 +564,7 @@ module kea-dhcp6 {
description "Kea DHCPv6 hosts.";
list host {
key "subnet-id identifier-type identifier";
+ description "List of Kea DHCPv6 hosts.";
leaf identifier-type {
type host-identifier-type;
mandatory true;
diff --git a/src/lib/yang/models/kea-dhcpddns.yang b/src/lib/yang/models/kea-dhcpddns.yang
index 2de9e735c9..42298414d2 100644
--- a/src/lib/yang/models/kea-dhcpddns.yang
+++ b/src/lib/yang/models/kea-dhcpddns.yang
@@ -1,14 +1,11 @@
module kea-dhcpddns {
yang-version 1.1;
- namespace "urn:ietf:params:xml:ns:yang::kea-dhcpddns";
+ namespace "urn:ietf:params:xml:ns:yang:kea-dhcpddns";
prefix "kea-dhcpddns";
import ietf-inet-types {
prefix inet;
}
- import ietf-yang-types {
- prefix yang;
- }
import kea-types {
prefix kea;
}
@@ -38,6 +35,7 @@ module kea-dhcpddns {
description "DDNS domains.";
list ddns-domain {
key name;
+ description "List of DDNS domains.";
leaf name {
type string;
mandatory true;
@@ -51,6 +49,7 @@ module kea-dhcpddns {
description "DNS servers.";
list server {
key ip-address;
+ description "List of DNS servers.";
leaf hostname {
type string;
description "DNS server hostname.";
@@ -84,8 +83,8 @@ module kea-dhcpddns {
*/
container config {
+ // config true;
description "Contains DHCP-DDNS server configuration.";
- config true;
leaf ip-address {
type inet:ip-address;
@@ -108,16 +107,24 @@ module kea-dhcpddns {
leaf ncr-protocol {
type enumeration {
- enum "UDP";
- enum "TCP";
+ enum "UDP" {
+ description "UDP transport";
+ }
+ enum "TCP" {
+ description "TCP transport";
+ }
}
+ default "UDP";
description "Protocol to use when sending requests to the server.";
}
leaf ncr-format {
type enumeration {
- enum "JSON";
+ enum "JSON" {
+ description "JSON format";
+ }
}
+ default "JSON";
description "Packet format to use when sending requests to the server.";
}
@@ -135,6 +142,7 @@ module kea-dhcpddns {
description "Keys to use with TSIG.";
list key {
key name;
+ description "List of TSIG keys.";
leaf name {
type string;
mandatory true;
@@ -169,8 +177,8 @@ module kea-dhcpddns {
}
container logging {
+ // config true;
description "Logging";
- config true;
uses logging:configuration;
}
diff --git a/src/lib/yang/models/kea-logging.yang b/src/lib/yang/models/kea-logging.yang
index 4973e95c38..a2412c7a18 100644
--- a/src/lib/yang/models/kea-logging.yang
+++ b/src/lib/yang/models/kea-logging.yang
@@ -1,14 +1,8 @@
module kea-logging {
yang-version 1.1;
- namespace "urn:ietf:params:xml:ns:yang::kea-logging";
+ namespace "urn:ietf:params:xml:ns:yang:kea-logging";
prefix "kea-logging";
- import ietf-inet-types {
- prefix inet;
- }
- import ietf-yang-types {
- prefix yang;
- }
import kea-types {
prefix kea;
}
@@ -34,15 +28,17 @@ module kea-logging {
description "Loggers.";
list logger {
key name;
+ description "List of loggers.";
leaf name {
type string;
- description "Name of the logger.";
mandatory true;
+ description "Name of the logger.";
}
container output-options {
description "Output options.";
list option {
key output;
+ description "List of output options.";
leaf output {
type string;
description "Type of output. Special values are stdout (standard
diff --git a/src/lib/yang/models/kea-types.yang b/src/lib/yang/models/kea-types.yang
index 7639600393..d89690762c 100644
--- a/src/lib/yang/models/kea-types.yang
+++ b/src/lib/yang/models/kea-types.yang
@@ -1,15 +1,8 @@
module kea-types {
yang-version 1.1;
- namespace "urn:ietf:params:xml:ns:yang::kea-types";
+ namespace "urn:ietf:params:xml:ns:yang:kea-types";
prefix "kea-types";
- import ietf-inet-types {
- prefix inet;
- }
- import ietf-yang-types {
- prefix yang;
- }
-
organization "Internet Systems Consortium";
contact "kea-dev@lists.isc.org";
description "This file defines some commonly used Kea types and groupings.";
@@ -31,8 +24,10 @@ module kea-types {
* Grouping
*/
grouping user-context {
+ description "User context grouping.";
leaf user-context {
type user-context;
+ description "User context entry.";
}
}
@@ -45,7 +40,9 @@ module kea-types {
}
leaf socket-type {
type enumeration {
- enum "unix";
+ enum "unix" {
+ description "Unix socket type.";
+ }
}
mandatory true;
description "Socket type.";
@@ -57,10 +54,12 @@ module kea-types {
}
grouping hooks-libraries {
+ description "Hooks libraries grouping.";
container hooks-libraries {
description "Hook libraries.";
list hook-library {
key library;
+ description "List of hook library.";
leaf library {
type string;
mandatory true;