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;
}
*/
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.";
}
* 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;
}
leaf reconnect-wait-time {
type uint32;
- default 0;
units "milliseconds";
+ default 0;
description "Waiting delay between two recovery attempts.";
}
leaf request-timeout {
}
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 {
}
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 {
}
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.
}
leaf ncr-format {
type enumeration {
- enum "JSON";
+ enum "JSON" {
+ description "JSON format";
+ }
}
default "JSON";
description "Packet format to use for DHCP-DDNS.";
}
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.";
}
grouping sanity-checks {
+ description "Sanity checks grouping.";
container sanity-checks {
- description "Sanity checks.";
+ description "Sanity checks container.";
leaf lease-checks {
type enumeration {
enum "none" {
}
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
}
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
}
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
}
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.";
}
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.";
}
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.";
}
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
}
grouping network-interface {
+ description "Interface grouping for a shared network.";
uses interface {
refine interface {
description "Specifies the network interface this shared network is
}
}
+ // 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.";
}
grouping network-interface-id {
+ description "Interface ID grouping for a shared network.";
uses interface-id {
refine interface-id {
description "Shared network interface-id option.";
}
grouping subnet-id {
+ description "Subnet ID grouping.";
leaf id {
type uint32 {
range 1..max;
}
grouping host-identifier {
+ description "Host identifier grouping.";
leaf identifier {
type string;
description "Host identifier.";
}
grouping host-hostname {
+ description "Host DNS name grouping.";
leaf hostname {
type string;
description "Host DNS name.";
}
grouping host-client-classes {
+ description "Host client classes grouping.";
leaf-list client-classes {
type string;
description "Host client classes (if host identifier matches, a
}
grouping host-subnet-id {
+ description "Host subnet ID grouping.";
leaf subnet-id {
type uint32;
mandatory true;
}
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.";
}
grouping network-reservation-mode {
+ description "Reservation mode grouping for a shared network.";
uses reservation-mode {
refine reservation-mode {
description "Shared network host reservation mode.";
}
grouping interfaces-re-detect {
+ description "Interfaces re-detect grouping.";
leaf re-detect {
type boolean;
default false;
}
grouping class-name {
+ description "Client class name grouping.";
leaf name {
type string;
mandatory true;
}
grouping class-test {
+ description "Client class test grouping.";
leaf test {
type string;
description "Defines an expression that evaluates every incoming
}
grouping class-only-if-required {
+ description "Client class only-if-required grouping.";
leaf only-if-required {
type boolean;
default false;
}
grouping option-def-name {
+ description "Option definition name grouping.";
leaf name {
type string;
mandatory true;
}
grouping option-def-type {
+ description "Option definition type grouping.";
leaf type {
type string;
mandatory true;
}
grouping option-def-record-types {
+ description "Option definition record types grouping.";
leaf record-types {
type string;
description "Option definition record types.";
}
grouping option-def-encapsulate {
+ description "Option definition encapsulate grouping.";
leaf encapsulate {
type string;
description "Defines option space this new option encapsulates.
}
grouping option-data-name {
+ description "Option data name grouping.";
leaf name {
type string;
description "Option name.";
}
grouping option-data-data {
+ description "Option data data grouping.";
leaf data {
type string;
description "Option data.";
}
grouping option-data-csv-format {
+ description "Option data csv-format grouping.";
leaf csv-format {
type boolean;
default true;
}
grouping option-data-always-send {
+ description "Option data always-send grouping.";
leaf always-send {
type boolean;
default false;
}
grouping option-def-array {
+ description "Option data array grouping.";
leaf array {
type boolean;
default false;
}
grouping decline-probation-period {
+ description "Decline probation period grouping.";
leaf decline-probation-period {
type uint32;
units "seconds";
}
grouping network-name {
+ description "Shared network name grouping.";
leaf name {
type string;
mandatory true;
}
grouping dhcp4o6-port {
+ description "DHCPv4-over-DHCPv6 port grouping.";
leaf dhcp4o6-port {
type uint16;
description "DHCPv4-over-DHCPv6 interserver port.";
}
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
}
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
}
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
}
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
}
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
}
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
}
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
}
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
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;
}
*/
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.";
}
* Groupings
*/
grouping match-client-id {
+ description "Match client ID grouping.";
leaf match-client-id {
type boolean;
default true;
}
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
}
grouping server-hostname {
+ description "Server hostname grouping.";
leaf server-hostname {
type string;
description "Server hostname (up to 64 bytes).";
}
grouping boot-file-name {
+ description "Boot file name grouping.";
leaf boot-file-name {
type string;
description "Boot file name (up to 128 bytes).";
}
grouping relay {
+ description "Relay grouping.";
leaf-list ip-addresses {
type inet:ipv4-address;
description "IPv4 addresses.";
}
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
this IPv4 subnet.";
list host {
key "identifier-type identifier";
+ description "Host reservation entry.";
leaf identifier-type {
type host-identifier-type;
description "Host identifier type.";
}
grouping client-class {
+ description "Client class grouping.";
uses dhcp:class-name;
uses dhcp:class-test;
uses dhcp:class-only-if-required;
}
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;
}
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;
*/
container config {
+ // config true;
description "Contains DHCPv4 server configuration.";
- config true;
uses dhcp:valid-lifetime;
uses dhcp:renew-timer;
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
leaf-list host-reservation-identifiers {
type host-identifier-type;
- description "Host reservation identifier.";
+ description "Host reservation identifiers.";
}
container client-classes {
list client-class {
key name;
ordered-by user;
+ description "List of client classes.";
uses client-class;
}
}
}
container logging {
+ // config true;
description "Logging";
- config true;
uses logging:configuration;
}
* 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;
}
container lease-stats {
+ description "Lease statistics.";
list subnet {
key subnet-id;
+ description "List of IPv4 subnets.";
leaf subnet-id {
type uint32;
mandatory true;
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;
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;
}
*/
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.";
}
* Groupings
*/
grouping preferred-lifetime {
+ description "Preferred lifetime grouping.";
leaf preferred-lifetime {
type uint32;
units "seconds";
}
grouping relay {
+ description "Relay grouping.";
leaf-list ip-addresses {
type inet:ipv6-address;
description "IPv6 addresses.";
}
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.";
}
}
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;
this IPv6 subnet.";
list host {
key "identifier-type identifier";
+ description "Host reservation entry.";
leaf identifier-type {
type host-identifier-type;
mandatory true;
}
grouping client-class {
+ description "Client class grouping.";
uses dhcp:class-name;
uses dhcp:class-test;
uses dhcp:class-only-if-required;
}
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;
}
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;
*/
container config {
+ // config true;
description "Contains DHCPv6 server configuration.";
- config true;
uses preferred-lifetime;
uses dhcp:valid-lifetime;
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.";
leaf-list host-reservation-identifiers {
type host-identifier-type;
- description "Host reservation identifier.";
+ description "Host reservation identifiers.";
}
container client-classes {
list client-class {
key name;
ordered-by user;
+ description "List of client classes.";
uses client-class;
}
}
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.";
}
}
container logging {
+ // config true;
description "Logging";
- config true;
uses logging:configuration;
}
* 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;
}
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.";
}
container lease-stats {
+ description "Lease statistics.";
list subnet {
key subnet-id;
+ description "List of IPv6 subnets.";
leaf subnet-id {
type uint32;
mandatory true;
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;