From 110740fd854c00ad9f53e84d11435e6d0ad13603 Mon Sep 17 00:00:00 2001
From: Andrei Pavel <andrei@isc.org>
Date: Wed, 21 Jul 2021 23:45:04 +0300
Subject: [#1944] add store-extended-info to Kea YANG module

---
 src/share/yang/modules/Makefile.am                 |   6 +-
 .../modules/hashes/kea-ctrl-agent@2019-08-12.hash  |   2 +-
 .../modules/hashes/kea-dhcp-ddns@2019-08-12.hash   |   2 +-
 .../modules/hashes/kea-dhcp-types@2019-08-12.hash  |   2 +-
 .../hashes/kea-dhcp4-server@2019-08-12.hash        |   1 -
 .../hashes/kea-dhcp4-server@2021-07-28.hash        |   1 +
 .../hashes/kea-dhcp6-server@2019-08-12.hash        |   1 -
 .../hashes/kea-dhcp6-server@2021-07-28.hash        |   1 +
 .../yang/modules/hashes/kea-types@2019-08-12.hash  |   1 -
 .../yang/modules/hashes/kea-types@2021-07-28.hash  |   1 +
 .../yang/modules/kea-ctrl-agent@2019-08-12.yang    |   2 +-
 .../yang/modules/kea-dhcp-ddns@2019-08-12.yang     |   2 +-
 .../yang/modules/kea-dhcp-types@2019-08-12.yang    |   2 +-
 .../yang/modules/kea-dhcp4-server@2019-08-12.yang  | 519 -----------------
 .../yang/modules/kea-dhcp4-server@2021-07-28.yang  | 522 +++++++++++++++++
 .../yang/modules/kea-dhcp6-server@2019-08-12.yang  | 622 --------------------
 .../yang/modules/kea-dhcp6-server@2021-07-28.yang  | 625 +++++++++++++++++++++
 src/share/yang/modules/kea-types@2019-08-12.yang   | 160 ------
 src/share/yang/modules/kea-types@2021-07-28.yang   | 167 ++++++
 19 files changed, 1326 insertions(+), 1313 deletions(-)
 delete mode 100644 src/share/yang/modules/hashes/kea-dhcp4-server@2019-08-12.hash
 create mode 100644 src/share/yang/modules/hashes/kea-dhcp4-server@2021-07-28.hash
 delete mode 100644 src/share/yang/modules/hashes/kea-dhcp6-server@2019-08-12.hash
 create mode 100644 src/share/yang/modules/hashes/kea-dhcp6-server@2021-07-28.hash
 delete mode 100644 src/share/yang/modules/hashes/kea-types@2019-08-12.hash
 create mode 100644 src/share/yang/modules/hashes/kea-types@2021-07-28.hash
 delete mode 100644 src/share/yang/modules/kea-dhcp4-server@2019-08-12.yang
 create mode 100644 src/share/yang/modules/kea-dhcp4-server@2021-07-28.yang
 delete mode 100644 src/share/yang/modules/kea-dhcp6-server@2019-08-12.yang
 create mode 100644 src/share/yang/modules/kea-dhcp6-server@2021-07-28.yang
 delete mode 100644 src/share/yang/modules/kea-types@2019-08-12.yang
 create mode 100644 src/share/yang/modules/kea-types@2021-07-28.yang

(limited to 'src/share')

diff --git a/src/share/yang/modules/Makefile.am b/src/share/yang/modules/Makefile.am
index a0a0bcfc9c..18ca84edc5 100644
--- a/src/share/yang/modules/Makefile.am
+++ b/src/share/yang/modules/Makefile.am
@@ -14,9 +14,9 @@ yangmodules_list += ietf-yang-types@2013-07-15.yang
 yangmodules_list += kea-ctrl-agent@2019-08-12.yang
 yangmodules_list += kea-dhcp-ddns@2019-08-12.yang
 yangmodules_list += kea-dhcp-types@2019-08-12.yang
-yangmodules_list += kea-dhcp4-server@2019-08-12.yang
-yangmodules_list += kea-dhcp6-server@2019-08-12.yang
-yangmodules_list += kea-types@2019-08-12.yang
+yangmodules_list += kea-dhcp4-server@2021-07-28.yang
+yangmodules_list += kea-dhcp6-server@2021-07-28.yang
+yangmodules_list += kea-types@2021-07-28.yang
 yangmodules_list += keatest-module@2018-11-20.yang
 
 EXTRA_DIST = hashes ${yangmodules_list}
diff --git a/src/share/yang/modules/hashes/kea-ctrl-agent@2019-08-12.hash b/src/share/yang/modules/hashes/kea-ctrl-agent@2019-08-12.hash
index bf142b8bb3..ebe2ab0738 100644
--- a/src/share/yang/modules/hashes/kea-ctrl-agent@2019-08-12.hash
+++ b/src/share/yang/modules/hashes/kea-ctrl-agent@2019-08-12.hash
@@ -1 +1 @@
-5d11568b445edc65a4783f53fe5e8571af9a79b759272d4a3e4bfba994f71087
+0eec8b9fda520d7d4160fb52a12f8e5488942de2acd49b70b9f3df12e018867d
diff --git a/src/share/yang/modules/hashes/kea-dhcp-ddns@2019-08-12.hash b/src/share/yang/modules/hashes/kea-dhcp-ddns@2019-08-12.hash
index 537b73cbf0..6de9c4ecd7 100644
--- a/src/share/yang/modules/hashes/kea-dhcp-ddns@2019-08-12.hash
+++ b/src/share/yang/modules/hashes/kea-dhcp-ddns@2019-08-12.hash
@@ -1 +1 @@
-230145eb977108912d0015b8fb0d77bd4f53df0f4dfc317329ea5892569a7ba8
+96585e06eb96d3938cd63a98003cf6b35393b83700863e204fb56232c7b48c71
diff --git a/src/share/yang/modules/hashes/kea-dhcp-types@2019-08-12.hash b/src/share/yang/modules/hashes/kea-dhcp-types@2019-08-12.hash
index fdea156205..054f103253 100644
--- a/src/share/yang/modules/hashes/kea-dhcp-types@2019-08-12.hash
+++ b/src/share/yang/modules/hashes/kea-dhcp-types@2019-08-12.hash
@@ -1 +1 @@
-96c6a37dc93701ddd5a41ab0196fdbefeafba8c2d2a0503a05f34dcfd9accc3a
+c3e17f01be9d00b33561ed7b1a8fb73ce95a7d3bdf4da36c340662410bfffb74
diff --git a/src/share/yang/modules/hashes/kea-dhcp4-server@2019-08-12.hash b/src/share/yang/modules/hashes/kea-dhcp4-server@2019-08-12.hash
deleted file mode 100644
index 3a5f1318f1..0000000000
--- a/src/share/yang/modules/hashes/kea-dhcp4-server@2019-08-12.hash
+++ /dev/null
@@ -1 +0,0 @@
-23762bc4dbd25cbd49b8c5e9c27c0eb4a627327b26d1a339ed0022d9708dc8c8
diff --git a/src/share/yang/modules/hashes/kea-dhcp4-server@2021-07-28.hash b/src/share/yang/modules/hashes/kea-dhcp4-server@2021-07-28.hash
new file mode 100644
index 0000000000..975884883f
--- /dev/null
+++ b/src/share/yang/modules/hashes/kea-dhcp4-server@2021-07-28.hash
@@ -0,0 +1 @@
+a3842405494ed469a91661cc32fe300326e55c4a1f3adde6b264ab1f54dbfe4b
diff --git a/src/share/yang/modules/hashes/kea-dhcp6-server@2019-08-12.hash b/src/share/yang/modules/hashes/kea-dhcp6-server@2019-08-12.hash
deleted file mode 100644
index 6e3ca75aa2..0000000000
--- a/src/share/yang/modules/hashes/kea-dhcp6-server@2019-08-12.hash
+++ /dev/null
@@ -1 +0,0 @@
-cae7d4516cb6485c76ebce01dcfdb846f4b7470d932615df7e1f2eae8fa9d4f7
diff --git a/src/share/yang/modules/hashes/kea-dhcp6-server@2021-07-28.hash b/src/share/yang/modules/hashes/kea-dhcp6-server@2021-07-28.hash
new file mode 100644
index 0000000000..6b3dbd6a55
--- /dev/null
+++ b/src/share/yang/modules/hashes/kea-dhcp6-server@2021-07-28.hash
@@ -0,0 +1 @@
+fa6065bce7e34f39a1cb1571a69795b37ec12d98aaa5cffa6e66aa7cbb2ad1e5
diff --git a/src/share/yang/modules/hashes/kea-types@2019-08-12.hash b/src/share/yang/modules/hashes/kea-types@2019-08-12.hash
deleted file mode 100644
index 546d6701d7..0000000000
--- a/src/share/yang/modules/hashes/kea-types@2019-08-12.hash
+++ /dev/null
@@ -1 +0,0 @@
-a2c7883852f3649b8d1df213f19a0d007d1652a8bc1b7262d98095905e1ae1e9
diff --git a/src/share/yang/modules/hashes/kea-types@2021-07-28.hash b/src/share/yang/modules/hashes/kea-types@2021-07-28.hash
new file mode 100644
index 0000000000..4cc1970211
--- /dev/null
+++ b/src/share/yang/modules/hashes/kea-types@2021-07-28.hash
@@ -0,0 +1 @@
+7fe443fddcc4831a6f28c2dadcbcfb786e7af72a0383db32630fc00bfca108dd
diff --git a/src/share/yang/modules/kea-ctrl-agent@2019-08-12.yang b/src/share/yang/modules/kea-ctrl-agent@2019-08-12.yang
index ff25896d07..65fb48ef90 100644
--- a/src/share/yang/modules/kea-ctrl-agent@2019-08-12.yang
+++ b/src/share/yang/modules/kea-ctrl-agent@2019-08-12.yang
@@ -8,7 +8,7 @@ module kea-ctrl-agent {
   }
   import kea-types {
     prefix kea;
-    revision-date 2019-08-12;
+    revision-date 2021-07-28;
   }
 
   organization "Internet Systems Consortium";
diff --git a/src/share/yang/modules/kea-dhcp-ddns@2019-08-12.yang b/src/share/yang/modules/kea-dhcp-ddns@2019-08-12.yang
index fdffc1560f..1069b77f13 100644
--- a/src/share/yang/modules/kea-dhcp-ddns@2019-08-12.yang
+++ b/src/share/yang/modules/kea-dhcp-ddns@2019-08-12.yang
@@ -8,7 +8,7 @@ module kea-dhcp-ddns {
   }
   import kea-types {
     prefix kea;
-    revision-date 2019-08-12;
+    revision-date 2021-07-28;
   }
 
   organization "Internet Systems Consortium";
diff --git a/src/share/yang/modules/kea-dhcp-types@2019-08-12.yang b/src/share/yang/modules/kea-dhcp-types@2019-08-12.yang
index 9b86ced2a8..e4ad152f40 100644
--- a/src/share/yang/modules/kea-dhcp-types@2019-08-12.yang
+++ b/src/share/yang/modules/kea-dhcp-types@2019-08-12.yang
@@ -8,7 +8,7 @@ module kea-dhcp-types {
   }
   import kea-types {
     prefix kea;
-    revision-date 2019-08-12;
+    revision-date 2021-07-28;
   }
 
   organization "Internet Systems Consortium";
diff --git a/src/share/yang/modules/kea-dhcp4-server@2019-08-12.yang b/src/share/yang/modules/kea-dhcp4-server@2019-08-12.yang
deleted file mode 100644
index c3a2a7cbfa..0000000000
--- a/src/share/yang/modules/kea-dhcp4-server@2019-08-12.yang
+++ /dev/null
@@ -1,519 +0,0 @@
-module kea-dhcp4-server {
-  yang-version 1.1;
-  namespace "urn:ietf:params:xml:ns:yang:kea-dhcp4-server";
-  prefix "kea-dhcp4-server";
-
-  import ietf-inet-types {
-    prefix inet;
-  }
-  import kea-types {
-    prefix kea;
-    revision-date 2019-08-12;
-  }
-  import kea-dhcp-types {
-    prefix dhcp;
-    revision-date 2019-08-12;
-  }
-
-  organization "Internet Systems Consortium";
-  contact "kea-dev@lists.isc.org";
-  description "This model defines a YANG data model that can be
-               used to configure and manage a Kea DHCPv4 server.";
-
-  revision 2019-08-12 {
-    description "Initial revision";
-    reference "";
-  }
-
-  /*
-  * Typedefs
-  */
-  typedef host-identifier-type {
-    type enumeration {
-      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;
-      description "Use client-id for lease lookups. If set to false, client-id
-                   will be ignored.";
-    }
-  }
-
-  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
-                   in siaddr field.";
-    }
-  }
-
-  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 authoritative {
-    description "Authoritative grouping.";
-    leaf authoritative {
-      type boolean;
-      description "NAK requests for unknown clients. If set to false
-                   ignore them.";
-      }
-  }
-
-  grouping relay {
-    description "Relay grouping.";
-    leaf-list ip-addresses {
-      type inet:ipv4-address;
-      description "IPv4 addresses.";
-    }
-  }
-
-  grouping host {
-    description "Host grouping.";
-    leaf identifier-type {
-      type host-identifier-type;
-      mandatory true;
-      description "Host identifier type.";
-    }
-    uses dhcp:host-identifier;
-    leaf ip-address {
-      type inet:ipv4-address;
-      description "Host reserved IPv4 address.";
-    }
-    uses dhcp:host-hostname;
-    uses dhcp:host-client-classes;
-    uses option-data-list;
-    uses next-server;
-    uses server-hostname;
-    uses boot-file-name;
-    uses dhcp:host-user-context;
-  }
-
-  grouping reservations {
-    description "Host reservations grouping.";
-    list host {
-      key "identifier-type identifier";
-      description "Host reservation list.";
-      uses host;
-    }
-  }
-
-  grouping subnet4-list {
-    description "Subnet4 list grouping.";
-    list subnet4 {
-      key id;
-      ordered-by user;
-      description "List of IPv4 subnets.";
-      uses dhcp:valid-lifetime;
-      uses dhcp:min-valid-lifetime;
-      uses dhcp:max-valid-lifetime;
-      uses dhcp:renew-timer;
-      uses dhcp:rebind-timer;
-      uses dhcp:calculate-tee-times;
-      uses dhcp:t1-percent;
-      uses dhcp:t2-percent;
-      uses option-data-list;
-      list pool {
-        key "start-address end-address";
-        ordered-by user;
-        description "Pool list.";
-        leaf prefix {
-          type inet:ipv4-prefix;
-          description "Defines a pool of dynamic IPv4 addresses to be managed
-                       by the server.";
-        }
-        leaf start-address {
-          type inet:ipv4-address;
-          mandatory true;
-          description "First IPv4 address in a pool.";
-        }
-        leaf end-address {
-          type inet:ipv4-address;
-          mandatory true;
-          description "Last IPv4 address in a pool.";
-        }
-        uses option-data-list;
-        uses dhcp:pool-client-class;
-        uses dhcp:pool-require-client-classes;
-        uses dhcp:pool-user-context;
-      }
-      leaf subnet {
-        type inet:ipv4-prefix;
-        mandatory true;
-        description "IPv4 subnet prefix.";
-      }
-      uses dhcp:subnet-interface;
-      uses dhcp:subnet-id;
-      uses dhcp:subnet-client-class;
-      uses dhcp:subnet-require-client-classes;
-      uses reservations {
-        refine host {
-          description "Subnet host reservations list.";
-        }
-      }
-      uses dhcp:reservation-mode;
-      container relay {
-        description "Optional information about relay agent.";
-        uses relay;
-      }
-      uses match-client-id;
-      uses next-server;
-      uses server-hostname;
-      uses boot-file-name;
-      leaf subnet-4o6-interface {
-        type string;
-        description "Subnet DHCPv4-over-DHCPv6 interface.";
-      }
-      leaf subnet-4o6-interface-id {
-        type string;
-        description "Subnet DHCPv4-over-DHCPv6 interface-id option.";
-      }
-      leaf subnet-4o6-subnet {
-        type inet:ipv6-prefix;
-        description "Subnet DHCPv4-over-DHCPv6 IPv6 prefix.";
-      }
-      uses authoritative;
-      uses dhcp:subnet-user-context;
-    }
-  }
-
-  grouping client-classes {
-    description "Client class grouping.";
-    list client-class {
-      key name;
-      ordered-by user;
-      description "List of client classes.";
-      uses dhcp:class-name;
-      uses dhcp:class-test;
-      uses dhcp:class-only-if-required;
-      uses option-def-list;
-      uses option-data-list;
-      uses next-server;
-      uses server-hostname;
-      uses boot-file-name;
-      uses dhcp:class-user-context;
-    }
-  }
-
-  grouping option-def-list {
-    description "Option definition list grouping.";
-    list option-def {
-      key "code space";
-      description "Option definition entry.";
-      leaf code {
-        type uint8;
-        mandatory true;
-        description "Option code to be used by the new option definition.";
-      }
-      leaf space {
-        type string;
-        mandatory true;
-        description "Option space for the new option (typically dhcp4).";
-      }
-      uses dhcp:option-def-name;
-      uses dhcp:option-def-type;
-      uses dhcp:option-def-record-types;
-      uses dhcp:option-def-encapsulate;
-      uses dhcp:option-def-array;
-      uses dhcp:option-def-user-context;
-     }
-  }
-
-  grouping option-data-list {
-    description "Option data list grouping.";
-    list option-data {
-      key "code space";
-      description "Option data entry.";
-      leaf code {
-        type uint8;
-        mandatory true;
-        description "Option code.";
-      }
-      leaf space {
-        type string;
-        mandatory true;
-        description "Option space.";
-      }
-      uses dhcp:option-data-name;
-      uses dhcp:option-data-data;
-      uses dhcp:option-data-csv-format;
-      uses dhcp:option-data-always-send;
-      uses dhcp:option-data-user-context;
-    }
-  }
-
-  /*
-  * Data Nodes
-  */
-
-  container config {
-    // config true;
-    description "Contains DHCPv4 server configuration.";
-
-    uses dhcp:valid-lifetime;
-    uses dhcp:min-valid-lifetime;
-    uses dhcp:max-valid-lifetime;
-    uses dhcp:renew-timer;
-    uses dhcp:rebind-timer;
-    uses dhcp:calculate-tee-times;
-    uses dhcp:t1-percent;
-    uses dhcp:t2-percent;
-    uses dhcp:decline-probation-period;
-    uses subnet4-list;
-
-    list shared-network {
-      key name;
-      description "List of IPv4 shared networks.";
-      uses dhcp:network-name;
-      uses subnet4-list;
-      uses dhcp:network-interface;
-      uses dhcp:renew-timer;
-      uses dhcp:rebind-timer;
-      uses option-data-list;
-      uses match-client-id;
-      uses next-server;
-      uses server-hostname;
-      uses boot-file-name;
-      container relay {
-        description "Optional information about relay agent.";
-        uses relay;
-      }
-      uses authoritative;
-      uses dhcp:reservation-mode;
-      uses dhcp:network-client-class;
-      uses dhcp:network-require-client-classes;
-      uses dhcp:valid-lifetime;
-      uses dhcp:min-valid-lifetime;
-      uses dhcp:max-valid-lifetime;
-      uses dhcp:calculate-tee-times;
-      uses dhcp:t1-percent;
-      uses dhcp:t2-percent;
-      uses dhcp:network-user-context;
-    }
-
-    container interfaces-config {
-      description "Network interfaces configuration.";
-      leaf-list interfaces {
-        type string;
-        description "Name of the interface (e.g. eth0) or name/address
-                     (e.g. eth0/192.168.1.1) or * (use all interfaces).";
-      }
-      leaf dhcp-socket-type {
-        type enumeration {
-          enum "raw" {
-            description "DHCP service uses RAW sockets.";
-          }
-          enum "udp" {
-            description "DHCP service uses UDP sockets.";
-          }
-        }
-        description "Type of sockets to use.";
-      }
-      leaf outbound-interface {
-        type enumeration {
-          enum "same-as-inbound" {
-            description "Send the response on the interface where the query
-                         was received.";
-          }
-          enum "use-routing" {
-            description "Use kernel routing.";
-          }
-        }
-        description "Control the interface used to send a response.";
-      }
-      uses dhcp:interfaces-re-detect;
-      uses dhcp:interfaces-user-context;
-    }
-
-    uses dhcp:databases;
-
-    leaf-list host-reservation-identifiers {
-      type host-identifier-type;
-      description "Host reservation identifiers.";
-    }
-
-    uses client-classes;
-    uses option-def-list;
-    uses option-data-list;
-    uses kea:hooks-libraries;
-    uses dhcp:expired-leases-processing;
-    uses dhcp:dhcp4o6-port;
-    uses kea:control-socket;
-    uses dhcp:hostname-char-set;
-    uses dhcp:hostname-char-replacement;
-    uses dhcp:dhcp-ddns;
-
-    leaf echo-client-id {
-      type boolean;
-      description "Send client-id back when the client sent it. This
-                   is conformant with RFC6842, but some older, buggy
-                   clients have problems with it.";
-    }
-
-    uses match-client-id;
-    uses next-server;
-    uses server-hostname;
-    uses boot-file-name;
-    uses authoritative;
-    uses kea:user-context {
-      refine user-context {
-        description "DHCPv4 server user context. Arbitrary JSON data can
-                     be stored here.";
-      }
-    }
-    uses dhcp:sanity-checks;
-    uses dhcp:reservation-mode;
-    uses reservations {
-      refine host {
-        description "Global host reservations list.";
-      }
-    }
-    uses dhcp:config-control;
-    uses dhcp:server-tag;
-    uses dhcp:dhcp-queue-control;
-    uses kea:loggers;
-  }
-
-  /*
-  * State data
-  */
-  container state {
-    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;
-          description "Lease IP address.";
-        }
-        leaf hw-address {
-          type binary;
-          mandatory true;
-          description "Lease hardware address.";
-        }
-        leaf client-id {
-          type binary;
-          description "Lease client-id.";
-        }
-        uses dhcp:valid-lifetime {
-          refine valid-lifetime {
-            mandatory true;
-          }
-        }
-        leaf cltt {
-          type uint32;
-          units "seconds";
-          mandatory true;
-          description "Lease client last transmission time.";
-        }
-        leaf subnet-id {
-          type uint32;
-          mandatory true;
-          description "Lease subnet ID.";
-        }
-        leaf fqdn-fwd {
-          type boolean;
-          description "Lease FQDN forward flag.";
-        }
-        leaf fqdn-rev {
-          type boolean;
-          description "Lease FQDN reverse lag.";
-        }
-        leaf hostname {
-          type string;
-          description "Lease hostname.";
-        }
-        leaf state {
-          type dhcp:lease-state;
-          description "Lease state.";
-        }
-        leaf user-context {
-          type kea:user-context;
-          description "Lease user context.";
-        }
-      }
-    }
-
-    container lease-stats {
-      description "Lease statistics.";
-      list subnet {
-        key subnet-id;
-        description "List of IPv4 subnets.";
-        leaf subnet-id {
-          type uint32;
-          mandatory true;
-          description "Subnet ID.";
-        }
-        leaf total-addresses {
-          type uint32;
-          mandatory true;
-          description "Total addresses counter.";
-        }
-        leaf assigned-addresses {
-          type uint32;
-          mandatory true;
-          description "Assigned addresses counter.";
-        }
-        leaf declined-addresses {
-          type uint32;
-          mandatory true;
-          description "Declined addresses counter.";
-        }
-      }
-    }
-
-    container hosts {
-      description "Kea DHCPv4 hosts.";
-      list host {
-        key "subnet-id identifier-type identifier";
-        description "List of Kea DHCPv4 hosts.";
-        uses host;
-        uses dhcp:host-subnet-id;
-        leaf auth-key {
-          type string;
-          description "Host authentication key (unused in DHCPv4).";
-        }
-      }
-    }
-  }
-}
diff --git a/src/share/yang/modules/kea-dhcp4-server@2021-07-28.yang b/src/share/yang/modules/kea-dhcp4-server@2021-07-28.yang
new file mode 100644
index 0000000000..6a564adc4c
--- /dev/null
+++ b/src/share/yang/modules/kea-dhcp4-server@2021-07-28.yang
@@ -0,0 +1,522 @@
+module kea-dhcp4-server {
+  yang-version 1.1;
+  namespace "urn:ietf:params:xml:ns:yang:kea-dhcp4-server";
+  prefix "kea-dhcp4-server";
+
+  import ietf-inet-types {
+    prefix inet;
+  }
+  import kea-types {
+    prefix kea;
+    revision-date 2021-07-28;
+  }
+  import kea-dhcp-types {
+    prefix dhcp;
+    revision-date 2019-08-12;
+  }
+
+  organization "Internet Systems Consortium";
+  contact "kea-dev@lists.isc.org";
+  description "This model defines a YANG data model that can be
+               used to configure and manage a Kea DHCPv4 server.";
+
+  revision 2021-07-28 {
+    description "Initial revision + added store-extended-info";
+    reference "";
+  }
+
+  /*
+  * Typedefs
+  */
+  typedef host-identifier-type {
+    type enumeration {
+      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;
+      description "Use client-id for lease lookups. If set to false, client-id
+                   will be ignored.";
+    }
+  }
+
+  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
+                   in siaddr field.";
+    }
+  }
+
+  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 authoritative {
+    description "Authoritative grouping.";
+    leaf authoritative {
+      type boolean;
+      description "NAK requests for unknown clients. If set to false
+                   ignore them.";
+      }
+  }
+
+  grouping relay {
+    description "Relay grouping.";
+    leaf-list ip-addresses {
+      type inet:ipv4-address;
+      description "IPv4 addresses.";
+    }
+  }
+
+  grouping host {
+    description "Host grouping.";
+    leaf identifier-type {
+      type host-identifier-type;
+      mandatory true;
+      description "Host identifier type.";
+    }
+    uses dhcp:host-identifier;
+    leaf ip-address {
+      type inet:ipv4-address;
+      description "Host reserved IPv4 address.";
+    }
+    uses dhcp:host-hostname;
+    uses dhcp:host-client-classes;
+    uses option-data-list;
+    uses next-server;
+    uses server-hostname;
+    uses boot-file-name;
+    uses dhcp:host-user-context;
+  }
+
+  grouping reservations {
+    description "Host reservations grouping.";
+    list host {
+      key "identifier-type identifier";
+      description "Host reservation list.";
+      uses host;
+    }
+  }
+
+  grouping subnet4-list {
+    description "Subnet4 list grouping.";
+    list subnet4 {
+      key id;
+      ordered-by user;
+      description "List of IPv4 subnets.";
+      uses dhcp:valid-lifetime;
+      uses dhcp:min-valid-lifetime;
+      uses dhcp:max-valid-lifetime;
+      uses dhcp:renew-timer;
+      uses dhcp:rebind-timer;
+      uses dhcp:calculate-tee-times;
+      uses dhcp:t1-percent;
+      uses dhcp:t2-percent;
+      uses option-data-list;
+      list pool {
+        key "start-address end-address";
+        ordered-by user;
+        description "Pool list.";
+        leaf prefix {
+          type inet:ipv4-prefix;
+          description "Defines a pool of dynamic IPv4 addresses to be managed
+                       by the server.";
+        }
+        leaf start-address {
+          type inet:ipv4-address;
+          mandatory true;
+          description "First IPv4 address in a pool.";
+        }
+        leaf end-address {
+          type inet:ipv4-address;
+          mandatory true;
+          description "Last IPv4 address in a pool.";
+        }
+        uses option-data-list;
+        uses dhcp:pool-client-class;
+        uses dhcp:pool-require-client-classes;
+        uses dhcp:pool-user-context;
+      }
+      leaf subnet {
+        type inet:ipv4-prefix;
+        mandatory true;
+        description "IPv4 subnet prefix.";
+      }
+      uses dhcp:subnet-interface;
+      uses dhcp:subnet-id;
+      uses dhcp:subnet-client-class;
+      uses dhcp:subnet-require-client-classes;
+      uses reservations {
+        refine host {
+          description "Subnet host reservations list.";
+        }
+      }
+      uses dhcp:reservation-mode;
+      container relay {
+        description "Optional information about relay agent.";
+        uses relay;
+      }
+      uses match-client-id;
+      uses next-server;
+      uses server-hostname;
+      uses boot-file-name;
+      leaf subnet-4o6-interface {
+        type string;
+        description "Subnet DHCPv4-over-DHCPv6 interface.";
+      }
+      leaf subnet-4o6-interface-id {
+        type string;
+        description "Subnet DHCPv4-over-DHCPv6 interface-id option.";
+      }
+      leaf subnet-4o6-subnet {
+        type inet:ipv6-prefix;
+        description "Subnet DHCPv4-over-DHCPv6 IPv6 prefix.";
+      }
+      uses authoritative;
+      uses dhcp:subnet-user-context;
+      uses kea:store-extended-info;
+    }
+  }
+
+  grouping client-classes {
+    description "Client class grouping.";
+    list client-class {
+      key name;
+      ordered-by user;
+      description "List of client classes.";
+      uses dhcp:class-name;
+      uses dhcp:class-test;
+      uses dhcp:class-only-if-required;
+      uses option-def-list;
+      uses option-data-list;
+      uses next-server;
+      uses server-hostname;
+      uses boot-file-name;
+      uses dhcp:class-user-context;
+    }
+  }
+
+  grouping option-def-list {
+    description "Option definition list grouping.";
+    list option-def {
+      key "code space";
+      description "Option definition entry.";
+      leaf code {
+        type uint8;
+        mandatory true;
+        description "Option code to be used by the new option definition.";
+      }
+      leaf space {
+        type string;
+        mandatory true;
+        description "Option space for the new option (typically dhcp4).";
+      }
+      uses dhcp:option-def-name;
+      uses dhcp:option-def-type;
+      uses dhcp:option-def-record-types;
+      uses dhcp:option-def-encapsulate;
+      uses dhcp:option-def-array;
+      uses dhcp:option-def-user-context;
+     }
+  }
+
+  grouping option-data-list {
+    description "Option data list grouping.";
+    list option-data {
+      key "code space";
+      description "Option data entry.";
+      leaf code {
+        type uint8;
+        mandatory true;
+        description "Option code.";
+      }
+      leaf space {
+        type string;
+        mandatory true;
+        description "Option space.";
+      }
+      uses dhcp:option-data-name;
+      uses dhcp:option-data-data;
+      uses dhcp:option-data-csv-format;
+      uses dhcp:option-data-always-send;
+      uses dhcp:option-data-user-context;
+    }
+  }
+
+  /*
+  * Data Nodes
+  */
+
+  container config {
+    // config true;
+    description "Contains DHCPv4 server configuration.";
+
+    uses dhcp:valid-lifetime;
+    uses dhcp:min-valid-lifetime;
+    uses dhcp:max-valid-lifetime;
+    uses dhcp:renew-timer;
+    uses dhcp:rebind-timer;
+    uses dhcp:calculate-tee-times;
+    uses dhcp:t1-percent;
+    uses dhcp:t2-percent;
+    uses dhcp:decline-probation-period;
+    uses subnet4-list;
+
+    list shared-network {
+      key name;
+      description "List of IPv4 shared networks.";
+      uses dhcp:network-name;
+      uses subnet4-list;
+      uses dhcp:network-interface;
+      uses dhcp:renew-timer;
+      uses dhcp:rebind-timer;
+      uses option-data-list;
+      uses match-client-id;
+      uses next-server;
+      uses server-hostname;
+      uses boot-file-name;
+      container relay {
+        description "Optional information about relay agent.";
+        uses relay;
+      }
+      uses authoritative;
+      uses dhcp:reservation-mode;
+      uses dhcp:network-client-class;
+      uses dhcp:network-require-client-classes;
+      uses dhcp:valid-lifetime;
+      uses dhcp:min-valid-lifetime;
+      uses dhcp:max-valid-lifetime;
+      uses dhcp:calculate-tee-times;
+      uses dhcp:t1-percent;
+      uses dhcp:t2-percent;
+      uses dhcp:network-user-context;
+    }
+
+    container interfaces-config {
+      description "Network interfaces configuration.";
+      leaf-list interfaces {
+        type string;
+        description "Name of the interface (e.g. eth0) or name/address
+                     (e.g. eth0/192.168.1.1) or * (use all interfaces).";
+      }
+      leaf dhcp-socket-type {
+        type enumeration {
+          enum "raw" {
+            description "DHCP service uses RAW sockets.";
+          }
+          enum "udp" {
+            description "DHCP service uses UDP sockets.";
+          }
+        }
+        description "Type of sockets to use.";
+      }
+      leaf outbound-interface {
+        type enumeration {
+          enum "same-as-inbound" {
+            description "Send the response on the interface where the query
+                         was received.";
+          }
+          enum "use-routing" {
+            description "Use kernel routing.";
+          }
+        }
+        description "Control the interface used to send a response.";
+      }
+      uses dhcp:interfaces-re-detect;
+      uses dhcp:interfaces-user-context;
+    }
+
+    uses dhcp:databases;
+
+    leaf-list host-reservation-identifiers {
+      type host-identifier-type;
+      description "Host reservation identifiers.";
+    }
+
+    uses client-classes;
+    uses option-def-list;
+    uses option-data-list;
+    uses kea:hooks-libraries;
+    uses dhcp:expired-leases-processing;
+    uses dhcp:dhcp4o6-port;
+    uses kea:control-socket;
+    uses dhcp:hostname-char-set;
+    uses dhcp:hostname-char-replacement;
+    uses dhcp:dhcp-ddns;
+
+    leaf echo-client-id {
+      type boolean;
+      description "Send client-id back when the client sent it. This
+                   is conformant with RFC6842, but some older, buggy
+                   clients have problems with it.";
+    }
+
+    uses match-client-id;
+    uses next-server;
+    uses server-hostname;
+    uses boot-file-name;
+    uses authoritative;
+    uses kea:user-context {
+      refine user-context {
+        description "DHCPv4 server user context. Arbitrary JSON data can
+                     be stored here.";
+      }
+    }
+    uses dhcp:sanity-checks;
+    uses dhcp:reservation-mode;
+    uses reservations {
+      refine host {
+        description "Global host reservations list.";
+      }
+    }
+    uses dhcp:config-control;
+    uses dhcp:server-tag;
+    uses dhcp:dhcp-queue-control;
+    uses kea:loggers;
+  }
+
+  /*
+  * State data
+  */
+  container state {
+    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;
+          description "Lease IP address.";
+        }
+        leaf hw-address {
+          type binary;
+          mandatory true;
+          description "Lease hardware address.";
+        }
+        leaf client-id {
+          type binary;
+          description "Lease client-id.";
+        }
+        uses dhcp:valid-lifetime {
+          refine valid-lifetime {
+            mandatory true;
+          }
+        }
+        leaf cltt {
+          type uint32;
+          units "seconds";
+          mandatory true;
+          description "Lease client last transmission time.";
+        }
+        leaf subnet-id {
+          type uint32;
+          mandatory true;
+          description "Lease subnet ID.";
+        }
+        leaf fqdn-fwd {
+          type boolean;
+          description "Lease FQDN forward flag.";
+        }
+        leaf fqdn-rev {
+          type boolean;
+          description "Lease FQDN reverse lag.";
+        }
+        leaf hostname {
+          type string;
+          description "Lease hostname.";
+        }
+        leaf state {
+          type dhcp:lease-state;
+          description "Lease state.";
+        }
+        leaf user-context {
+          type kea:user-context;
+          description "Lease user context.";
+        }
+      }
+    }
+
+    container lease-stats {
+      description "Lease statistics.";
+      list subnet {
+        key subnet-id;
+        description "List of IPv4 subnets.";
+        leaf subnet-id {
+          type uint32;
+          mandatory true;
+          description "Subnet ID.";
+        }
+        leaf total-addresses {
+          type uint32;
+          mandatory true;
+          description "Total addresses counter.";
+        }
+        leaf assigned-addresses {
+          type uint32;
+          mandatory true;
+          description "Assigned addresses counter.";
+        }
+        leaf declined-addresses {
+          type uint32;
+          mandatory true;
+          description "Declined addresses counter.";
+        }
+      }
+    }
+
+    container hosts {
+      description "Kea DHCPv4 hosts.";
+      list host {
+        key "subnet-id identifier-type identifier";
+        description "List of Kea DHCPv4 hosts.";
+        uses host;
+        uses dhcp:host-subnet-id;
+        leaf auth-key {
+          type string;
+          description "Host authentication key (unused in DHCPv4).";
+        }
+      }
+    }
+
+    uses kea:store-extended-info;
+  }
+}
diff --git a/src/share/yang/modules/kea-dhcp6-server@2019-08-12.yang b/src/share/yang/modules/kea-dhcp6-server@2019-08-12.yang
deleted file mode 100644
index ac6ef6792e..0000000000
--- a/src/share/yang/modules/kea-dhcp6-server@2019-08-12.yang
+++ /dev/null
@@ -1,622 +0,0 @@
-module kea-dhcp6-server {
-  yang-version 1.1;
-  namespace "urn:ietf:params:xml:ns:yang:kea-dhcp6-server";
-  prefix "kea-dhcp6-server";
-
-  import ietf-inet-types {
-    prefix inet;
-  }
-  import kea-types {
-    prefix kea;
-    revision-date 2019-08-12;
-  }
-  import kea-dhcp-types {
-    prefix dhcp;
-    revision-date 2019-08-12;
-  }
-
-  organization "Internet Systems Consortium";
-  contact "kea-dev@lists.isc.org";
-  description "This model defines a YANG data model that can be
-               used to configure and manage a Kea DHCPv6 server.";
-
-  revision 2019-08-12 {
-    description "Initial revision";
-    reference "";
-  }
-
-  /*
-  * Typedefs
-  */
-  typedef host-identifier-type {
-    type enumeration {
-      enum "duid" {
-        description "DUID";
-      }
-      enum "hw-address" {
-        description "Hardware address";
-      }
-      enum "flex-id" {
-        description "Flexible identifier";
-      }
-    }
-    description "Host identifier type.";
-  }
-
-  /*
-  * Groupings
-  */
-  grouping data-directory {
-    description "Data directory grouping.";
-    leaf data-directory {
-      type string;
-      description "Server data directory.";
-    }
-  }
-
-  grouping preferred-lifetime {
-    description "Preferred lifetime grouping.";
-    leaf preferred-lifetime {
-      type uint32;
-      units "seconds";
-      description "Preferred lifetime.";
-    }
-  }
-
-  grouping min-preferred-lifetime {
-    description "Minimum preferred lifetime grouping.";
-    leaf min-preferred-lifetime {
-      type uint32;
-      units "seconds";
-      description "Minimum preferred lifetime.";
-    }
-  }
-
-  grouping max-preferred-lifetime {
-    description "Maximum preferred lifetime grouping.";
-    leaf max-preferred-lifetime {
-      type uint32;
-      units "seconds";
-      description "Maximum preferred lifetime.";
-    }
-  }
-
-  grouping interface-id {
-    description "Interface ID grouping.";
-    leaf interface-id {
-      type string;
-      description "Interface ID entry.";
-    }
-  }
-
-  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;
-      description "Rapid commit entry.";
-    }
-  }
-
-  grouping host {
-    description "Host grouping.";
-    leaf identifier-type {
-      type host-identifier-type;
-      mandatory true;
-      description "Host identifier type.";
-    }
-    uses dhcp:host-identifier;
-    leaf-list ip-addresses {
-      type inet:ipv6-address;
-      description "Host reserved IP addresses.";
-    }
-    leaf-list prefixes {
-      type inet:ipv6-prefix;
-      description "Host reserved IP prefixes.";
-    }
-    uses dhcp:host-hostname;
-    uses dhcp:host-client-classes;
-    uses option-data-list;
-    uses dhcp:host-user-context;
-  }
-
-  grouping reservations {
-    description "Host reservations grouping.";
-    list host {
-      key "identifier-type identifier";
-      description "Host reservation list.";
-      uses host;
-    }
-  }
-
-  grouping subnet6-list {
-    description "Subnet6 list grouping.";
-    list subnet6 {
-      key id;
-      ordered-by user;
-      description "List of IPv6 subnets.";
-      uses preferred-lifetime;
-      uses min-preferred-lifetime;
-      uses max-preferred-lifetime;
-      uses dhcp:valid-lifetime;
-      uses dhcp:min-valid-lifetime;
-      uses dhcp:max-valid-lifetime;
-      uses dhcp:renew-timer;
-      uses dhcp:rebind-timer;
-      uses dhcp:calculate-tee-times;
-      uses dhcp:t1-percent;
-      uses dhcp:t2-percent;
-      uses option-data-list;
-      list pool {
-        key "start-address end-address";
-        ordered-by user;
-        description "Pool list.";
-        leaf prefix {
-          type inet:ipv6-prefix;
-          description "Pool prefix.";
-        }
-        leaf start-address {
-          type inet:ipv6-address;
-          mandatory true;
-          description "First IPv6 address in a pool.";
-        }
-        leaf end-address {
-          type inet:ipv6-address;
-          mandatory true;
-          description "Last IPv6 address in a pool.";
-        }
-        uses option-data-list;
-        uses dhcp:pool-client-class;
-        uses dhcp:pool-require-client-classes;
-        uses dhcp:pool-user-context;
-      }
-      list pd-pool {
-        key prefix;
-        ordered-by user;
-        description "Prefix delegation pool list.";
-        leaf prefix {
-          type inet:ipv6-prefix;
-          mandatory true;
-          description "IPv6 pool prefix.";
-        }
-        leaf delegated-len {
-          type uint8;
-          description "Prefix pool delegated length.";
-        }
-        uses option-data-list;
-        uses dhcp:client-class {
-          refine client-class {
-            description "Prefix pool client class guard. (only
-                         clients belonging to this class will be
-                         allowed in this pool).";
-          }
-        }
-        uses dhcp:require-client-classes {
-          refine require-client-classes {
-            description "Prefix pool require client classes.";
-          }
-        }
-        leaf excluded-prefix {
-          type inet:ipv6-prefix;
-          description "Prefix pool excluded prefix.";
-        }
-        uses kea:user-context {
-          refine user-context {
-            description "Prefix pool user context. Arbitrary JSON data
-                         can be stored here.";
-          }
-        }
-      }
-      leaf subnet {
-        type inet:ipv6-prefix;
-        mandatory true;
-        description "IPv6 subnet prefix.";
-      }
-      uses dhcp:subnet-interface;
-      uses interface-id {
-        refine interface-id {
-          description "Subnet interface-id option.";
-        }
-      }
-      uses dhcp:subnet-id;
-      uses rapid-commit {
-        refine rapid-commit {
-          description "Subnet rapid commit flag.";
-        }
-      }
-      uses dhcp:subnet-client-class;
-      uses dhcp:require-client-classes;
-      uses reservations {
-        refine host {
-          description "Subnet host reservations list.";
-        }
-      }
-      uses dhcp:reservation-mode;
-      container relay {
-        description "Optional information about relay agent.";
-        uses relay;
-      }
-      uses dhcp:subnet-user-context;
-    }
-  }
-
-  grouping client-classes {
-    description "Client classes grouping.";
-    list client-class {
-      key name;
-      ordered-by user;
-      description "List of client classes.";
-      uses dhcp:class-name;
-      uses dhcp:class-test;
-      uses dhcp:class-only-if-required;
-      uses option-data-list;
-      uses dhcp:class-user-context;
-    }
-  }
-
-  grouping option-def-list {
-    description "Option definition list grouping.";
-    list option-def {
-      key "code space";
-      description "Option definition entry.";
-      leaf code {
-        type uint16;
-        mandatory true;
-        description "Option code to be used by the new option definition.";
-      }
-      leaf space {
-        type string;
-        mandatory true;
-        description "Option space for the new option (typically dhcp6).";
-      }
-      uses dhcp:option-def-name;
-      uses dhcp:option-def-type;
-      uses dhcp:option-def-record-types;
-      uses dhcp:option-def-encapsulate;
-      uses dhcp:option-def-array;
-      uses dhcp:option-def-user-context;
-    }
-  }
-
-  grouping option-data-list {
-    description "Option data list grouping.";
-    list option-data {
-      key "code space";
-      description "Option data entry.";
-      leaf code {
-        type uint16;
-        mandatory true;
-        description "Option code.";
-      }
-      leaf space {
-        type string;
-        mandatory true;
-        description "Option space.";
-      }
-      uses dhcp:option-data-name;
-      uses dhcp:option-data-data;
-      uses dhcp:option-data-csv-format;
-      uses dhcp:option-data-always-send;
-      uses dhcp:option-data-user-context;
-    }
-  }
-
-  /*
-  * Data Nodes
-  */
-
-  container config {
-    // config true;
-    description "Contains DHCPv6 server configuration.";
-
-    uses data-directory;
-    uses preferred-lifetime;
-    uses min-preferred-lifetime;
-    uses max-preferred-lifetime;
-    uses dhcp:valid-lifetime;
-    uses dhcp:min-valid-lifetime;
-    uses dhcp:max-valid-lifetime;
-    uses dhcp:renew-timer;
-    uses dhcp:rebind-timer;
-    uses dhcp:calculate-tee-times;
-    uses dhcp:t1-percent;
-    uses dhcp:t2-percent;
-    uses dhcp:decline-probation-period;
-    uses subnet6-list;
-
-    list shared-network {
-      key name;
-      uses dhcp:network-name;
-      description "List of IPv4 shared networks.";
-      uses subnet6-list;
-      uses dhcp:network-interface;
-      uses interface-id {
-        refine interface-id {
-          description "Shared network interface-id option.";
-        }
-      }
-      uses dhcp:renew-timer;
-      uses dhcp:rebind-timer;
-      uses option-data-list;
-      container relay {
-        description "Optional information about relay agent.";
-        uses relay;
-      }
-      uses dhcp:reservation-mode;
-      uses dhcp:network-client-class;
-      uses dhcp:require-client-classes;
-      uses preferred-lifetime;
-      uses min-preferred-lifetime;
-      uses max-preferred-lifetime;
-      uses rapid-commit {
-        refine rapid-commit {
-          description "Shared network rapid commit flag.";
-        }
-      }
-      uses dhcp:valid-lifetime;
-      uses dhcp:min-valid-lifetime;
-      uses dhcp:max-valid-lifetime;
-      uses dhcp:calculate-tee-times;
-      uses dhcp:t1-percent;
-      uses dhcp:t2-percent;
-      uses dhcp:network-user-context;
-    }
-
-    container interfaces-config {
-      description "Network interfaces configuration.";
-      leaf-list interfaces {
-        type string;
-        description "Name of the interface (e.g. eth0) or name/address
-                     (e.g. eth0/2001:db8::1) or * (use all interfaces).";
-      }
-      uses dhcp:interfaces-re-detect;
-      uses dhcp:interfaces-user-context;
-    }
-
-    uses dhcp:databases;
-
-    leaf-list relay-supplied-options {
-      type string;
-      description "Relay supplied options.";
-    }
-
-    leaf-list mac-sources {
-      type string;
-      description "MAC address sources.";
-    }
-
-    leaf-list host-reservation-identifiers {
-      type host-identifier-type;
-      description "Host reservation identifiers.";
-    }
-
-    uses client-classes;
-    uses option-def-list;
-    uses option-data-list;
-    uses kea:hooks-libraries;
-    uses dhcp:expired-leases-processing;
-
-    container server-id {
-      presence "Have server ID.";
-      description "Server DUID.";
-      leaf type {
-        type enumeration {
-          enum "LLT" {
-            description "Link-layer address and timestamp.";
-          }
-          enum "EN" {
-            description "Enterprise number.";
-          }
-          enum "LL" {
-            description "Link-layer address.";
-          }
-        }
-        description "Server DIOD type.";
-      }
-      leaf identifier {
-        type string;
-        description "Server DUID identifier.";
-      }
-      leaf time {
-        type uint32;
-        description "Server DUID time.";
-      }
-      leaf htype {
-        type uint16;
-        description "Server DUID hardware type.";
-      }
-      leaf enterprise-id {
-        type uint32;
-        description "Server DUID enterprise ID.";
-      }
-      leaf persist {
-        type boolean;
-        description "Server DUID persist flag.";
-      }
-      leaf user-context {
-        type kea:user-context;
-        description "Server DUID user context.";
-      }
-    }
-
-    uses dhcp:dhcp4o6-port;
-    uses kea:control-socket;
-    uses dhcp:hostname-char-set;
-    uses dhcp:hostname-char-replacement;
-    uses dhcp:dhcp-ddns;
-    uses kea:user-context {
-      refine user-context {
-        description "DHCPv6 server user context. Arbitrary JSON data can
-                     be stored here.";
-      }
-    }
-    uses dhcp:sanity-checks;
-    uses dhcp:reservation-mode;
-    uses reservations {
-      refine host {
-        description "Global host reservations list.";
-      }
-    }
-    uses dhcp:config-control;
-    uses dhcp:server-tag;
-    uses dhcp:dhcp-queue-control;
-    uses kea:loggers;
-  }
-
-  /*
-  * State data
-  */
-  container state {
-    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;
-          description "Lease IP address.";
-        }
-        leaf duid {
-          type binary;
-          mandatory true;
-          description "Lease DUID.";
-        }
-        uses dhcp:valid-lifetime {
-          refine valid-lifetime {
-            mandatory true;
-          }
-        }
-        leaf cltt {
-          type uint32;
-          units "seconds";
-          mandatory true;
-          description "Lease client last transmission time.";
-        }
-        leaf subnet-id {
-          type uint32;
-          mandatory true;
-          description "Lease subnet ID.";
-        }
-        leaf preferred-lifetime {
-          type uint32;
-          units "seconds";
-          mandatory true;
-          description "Lease preferred lifetime.";
-        }
-        leaf lease-type {
-          type enumeration {
-            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.";
-        }
-        leaf iaid {
-          type uint32;
-          mandatory true;
-          description "Lease IA ID.";
-        }
-        leaf prefix-length {
-          type uint8 {
-            range 0..128;
-          }
-          description "Lease prefix length.";
-        }
-        leaf fqdn-fwd {
-          type boolean;
-          description "Lease FQDN forward flag.";
-        }
-        leaf fqdn-rev {
-          type boolean;
-          description "Lease FQDN reverse lag.";
-        }
-        leaf hostname {
-          type string;
-          description "Lease hostname.";
-        }
-        leaf state {
-          type dhcp:lease-state;
-          description "Lease state.";
-        }
-        leaf user-context {
-          type kea:user-context;
-          description "Lease user context.";
-        }
-        leaf hw-address {
-          type string;
-          description "Lease hardware address.";
-        }
-      }
-    }
-
-    container lease-stats {
-      description "Lease statistics.";
-      list subnet {
-        key subnet-id;
-        description "List of IPv6 subnets.";
-        leaf subnet-id {
-          type uint32;
-          mandatory true;
-          description "Subnet ID.";
-        }
-        leaf total-nas {
-          type uint32;
-          mandatory true;
-          description "Total non-temporary addresses counter.";
-        }
-        leaf assigned-nas {
-          type uint32;
-          mandatory true;
-          description "Assigned non-temporary counter.";
-        }
-        leaf declined-nas {
-          type uint32;
-          mandatory true;
-          description "Declined non-temporary addresses counter.";
-        }
-        leaf total-pds {
-          type uint32;
-          mandatory true;
-          description "Total delegated prefixes counter.";
-        }
-        leaf assigned-pds {
-          type uint32;
-          mandatory true;
-          description "Assigned delegated prefixe counter.";
-        }
-      }
-    }
-
-    container hosts {
-      description "Kea DHCPv6 hosts.";
-      list host {
-        key "subnet-id identifier-type identifier";
-        description "List of Kea DHCPv6 hosts.";
-        uses host;
-        uses dhcp:host-subnet-id;
-        leaf auth-key {
-          type string;
-          description "Host authentication key.";
-        }
-      }
-    }
-  }
-}
diff --git a/src/share/yang/modules/kea-dhcp6-server@2021-07-28.yang b/src/share/yang/modules/kea-dhcp6-server@2021-07-28.yang
new file mode 100644
index 0000000000..ca017ea1d5
--- /dev/null
+++ b/src/share/yang/modules/kea-dhcp6-server@2021-07-28.yang
@@ -0,0 +1,625 @@
+module kea-dhcp6-server {
+  yang-version 1.1;
+  namespace "urn:ietf:params:xml:ns:yang:kea-dhcp6-server";
+  prefix "kea-dhcp6-server";
+
+  import ietf-inet-types {
+    prefix inet;
+  }
+  import kea-types {
+    prefix kea;
+    revision-date 2021-07-28;
+  }
+  import kea-dhcp-types {
+    prefix dhcp;
+    revision-date 2019-08-12;
+  }
+
+  organization "Internet Systems Consortium";
+  contact "kea-dev@lists.isc.org";
+  description "This model defines a YANG data model that can be
+               used to configure and manage a Kea DHCPv6 server.";
+
+  revision 2021-07-28 {
+    description "Initial revision + added store-extended-info";
+    reference "";
+  }
+
+  /*
+  * Typedefs
+  */
+  typedef host-identifier-type {
+    type enumeration {
+      enum "duid" {
+        description "DUID";
+      }
+      enum "hw-address" {
+        description "Hardware address";
+      }
+      enum "flex-id" {
+        description "Flexible identifier";
+      }
+    }
+    description "Host identifier type.";
+  }
+
+  /*
+  * Groupings
+  */
+  grouping data-directory {
+    description "Data directory grouping.";
+    leaf data-directory {
+      type string;
+      description "Server data directory.";
+    }
+  }
+
+  grouping preferred-lifetime {
+    description "Preferred lifetime grouping.";
+    leaf preferred-lifetime {
+      type uint32;
+      units "seconds";
+      description "Preferred lifetime.";
+    }
+  }
+
+  grouping min-preferred-lifetime {
+    description "Minimum preferred lifetime grouping.";
+    leaf min-preferred-lifetime {
+      type uint32;
+      units "seconds";
+      description "Minimum preferred lifetime.";
+    }
+  }
+
+  grouping max-preferred-lifetime {
+    description "Maximum preferred lifetime grouping.";
+    leaf max-preferred-lifetime {
+      type uint32;
+      units "seconds";
+      description "Maximum preferred lifetime.";
+    }
+  }
+
+  grouping interface-id {
+    description "Interface ID grouping.";
+    leaf interface-id {
+      type string;
+      description "Interface ID entry.";
+    }
+  }
+
+  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;
+      description "Rapid commit entry.";
+    }
+  }
+
+  grouping host {
+    description "Host grouping.";
+    leaf identifier-type {
+      type host-identifier-type;
+      mandatory true;
+      description "Host identifier type.";
+    }
+    uses dhcp:host-identifier;
+    leaf-list ip-addresses {
+      type inet:ipv6-address;
+      description "Host reserved IP addresses.";
+    }
+    leaf-list prefixes {
+      type inet:ipv6-prefix;
+      description "Host reserved IP prefixes.";
+    }
+    uses dhcp:host-hostname;
+    uses dhcp:host-client-classes;
+    uses option-data-list;
+    uses dhcp:host-user-context;
+  }
+
+  grouping reservations {
+    description "Host reservations grouping.";
+    list host {
+      key "identifier-type identifier";
+      description "Host reservation list.";
+      uses host;
+    }
+  }
+
+  grouping subnet6-list {
+    description "Subnet6 list grouping.";
+    list subnet6 {
+      key id;
+      ordered-by user;
+      description "List of IPv6 subnets.";
+      uses preferred-lifetime;
+      uses min-preferred-lifetime;
+      uses max-preferred-lifetime;
+      uses dhcp:valid-lifetime;
+      uses dhcp:min-valid-lifetime;
+      uses dhcp:max-valid-lifetime;
+      uses dhcp:renew-timer;
+      uses dhcp:rebind-timer;
+      uses dhcp:calculate-tee-times;
+      uses dhcp:t1-percent;
+      uses dhcp:t2-percent;
+      uses option-data-list;
+      list pool {
+        key "start-address end-address";
+        ordered-by user;
+        description "Pool list.";
+        leaf prefix {
+          type inet:ipv6-prefix;
+          description "Pool prefix.";
+        }
+        leaf start-address {
+          type inet:ipv6-address;
+          mandatory true;
+          description "First IPv6 address in a pool.";
+        }
+        leaf end-address {
+          type inet:ipv6-address;
+          mandatory true;
+          description "Last IPv6 address in a pool.";
+        }
+        uses option-data-list;
+        uses dhcp:pool-client-class;
+        uses dhcp:pool-require-client-classes;
+        uses dhcp:pool-user-context;
+      }
+      list pd-pool {
+        key prefix;
+        ordered-by user;
+        description "Prefix delegation pool list.";
+        leaf prefix {
+          type inet:ipv6-prefix;
+          mandatory true;
+          description "IPv6 pool prefix.";
+        }
+        leaf delegated-len {
+          type uint8;
+          description "Prefix pool delegated length.";
+        }
+        uses option-data-list;
+        uses dhcp:client-class {
+          refine client-class {
+            description "Prefix pool client class guard. (only
+                         clients belonging to this class will be
+                         allowed in this pool).";
+          }
+        }
+        uses dhcp:require-client-classes {
+          refine require-client-classes {
+            description "Prefix pool require client classes.";
+          }
+        }
+        leaf excluded-prefix {
+          type inet:ipv6-prefix;
+          description "Prefix pool excluded prefix.";
+        }
+        uses kea:user-context {
+          refine user-context {
+            description "Prefix pool user context. Arbitrary JSON data
+                         can be stored here.";
+          }
+        }
+      }
+      leaf subnet {
+        type inet:ipv6-prefix;
+        mandatory true;
+        description "IPv6 subnet prefix.";
+      }
+      uses dhcp:subnet-interface;
+      uses interface-id {
+        refine interface-id {
+          description "Subnet interface-id option.";
+        }
+      }
+      uses dhcp:subnet-id;
+      uses rapid-commit {
+        refine rapid-commit {
+          description "Subnet rapid commit flag.";
+        }
+      }
+      uses dhcp:subnet-client-class;
+      uses dhcp:require-client-classes;
+      uses reservations {
+        refine host {
+          description "Subnet host reservations list.";
+        }
+      }
+      uses dhcp:reservation-mode;
+      container relay {
+        description "Optional information about relay agent.";
+        uses relay;
+      }
+      uses dhcp:subnet-user-context;
+      uses kea:store-extended-info;
+    }
+  }
+
+  grouping client-classes {
+    description "Client classes grouping.";
+    list client-class {
+      key name;
+      ordered-by user;
+      description "List of client classes.";
+      uses dhcp:class-name;
+      uses dhcp:class-test;
+      uses dhcp:class-only-if-required;
+      uses option-data-list;
+      uses dhcp:class-user-context;
+    }
+  }
+
+  grouping option-def-list {
+    description "Option definition list grouping.";
+    list option-def {
+      key "code space";
+      description "Option definition entry.";
+      leaf code {
+        type uint16;
+        mandatory true;
+        description "Option code to be used by the new option definition.";
+      }
+      leaf space {
+        type string;
+        mandatory true;
+        description "Option space for the new option (typically dhcp6).";
+      }
+      uses dhcp:option-def-name;
+      uses dhcp:option-def-type;
+      uses dhcp:option-def-record-types;
+      uses dhcp:option-def-encapsulate;
+      uses dhcp:option-def-array;
+      uses dhcp:option-def-user-context;
+    }
+  }
+
+  grouping option-data-list {
+    description "Option data list grouping.";
+    list option-data {
+      key "code space";
+      description "Option data entry.";
+      leaf code {
+        type uint16;
+        mandatory true;
+        description "Option code.";
+      }
+      leaf space {
+        type string;
+        mandatory true;
+        description "Option space.";
+      }
+      uses dhcp:option-data-name;
+      uses dhcp:option-data-data;
+      uses dhcp:option-data-csv-format;
+      uses dhcp:option-data-always-send;
+      uses dhcp:option-data-user-context;
+    }
+  }
+
+  /*
+  * Data Nodes
+  */
+
+  container config {
+    // config true;
+    description "Contains DHCPv6 server configuration.";
+
+    uses data-directory;
+    uses preferred-lifetime;
+    uses min-preferred-lifetime;
+    uses max-preferred-lifetime;
+    uses dhcp:valid-lifetime;
+    uses dhcp:min-valid-lifetime;
+    uses dhcp:max-valid-lifetime;
+    uses dhcp:renew-timer;
+    uses dhcp:rebind-timer;
+    uses dhcp:calculate-tee-times;
+    uses dhcp:t1-percent;
+    uses dhcp:t2-percent;
+    uses dhcp:decline-probation-period;
+    uses subnet6-list;
+
+    list shared-network {
+      key name;
+      uses dhcp:network-name;
+      description "List of IPv4 shared networks.";
+      uses subnet6-list;
+      uses dhcp:network-interface;
+      uses interface-id {
+        refine interface-id {
+          description "Shared network interface-id option.";
+        }
+      }
+      uses dhcp:renew-timer;
+      uses dhcp:rebind-timer;
+      uses option-data-list;
+      container relay {
+        description "Optional information about relay agent.";
+        uses relay;
+      }
+      uses dhcp:reservation-mode;
+      uses dhcp:network-client-class;
+      uses dhcp:require-client-classes;
+      uses preferred-lifetime;
+      uses min-preferred-lifetime;
+      uses max-preferred-lifetime;
+      uses rapid-commit {
+        refine rapid-commit {
+          description "Shared network rapid commit flag.";
+        }
+      }
+      uses dhcp:valid-lifetime;
+      uses dhcp:min-valid-lifetime;
+      uses dhcp:max-valid-lifetime;
+      uses dhcp:calculate-tee-times;
+      uses dhcp:t1-percent;
+      uses dhcp:t2-percent;
+      uses dhcp:network-user-context;
+    }
+
+    container interfaces-config {
+      description "Network interfaces configuration.";
+      leaf-list interfaces {
+        type string;
+        description "Name of the interface (e.g. eth0) or name/address
+                     (e.g. eth0/2001:db8::1) or * (use all interfaces).";
+      }
+      uses dhcp:interfaces-re-detect;
+      uses dhcp:interfaces-user-context;
+    }
+
+    uses dhcp:databases;
+
+    leaf-list relay-supplied-options {
+      type string;
+      description "Relay supplied options.";
+    }
+
+    leaf-list mac-sources {
+      type string;
+      description "MAC address sources.";
+    }
+
+    leaf-list host-reservation-identifiers {
+      type host-identifier-type;
+      description "Host reservation identifiers.";
+    }
+
+    uses client-classes;
+    uses option-def-list;
+    uses option-data-list;
+    uses kea:hooks-libraries;
+    uses dhcp:expired-leases-processing;
+
+    container server-id {
+      presence "Have server ID.";
+      description "Server DUID.";
+      leaf type {
+        type enumeration {
+          enum "LLT" {
+            description "Link-layer address and timestamp.";
+          }
+          enum "EN" {
+            description "Enterprise number.";
+          }
+          enum "LL" {
+            description "Link-layer address.";
+          }
+        }
+        description "Server DIOD type.";
+      }
+      leaf identifier {
+        type string;
+        description "Server DUID identifier.";
+      }
+      leaf time {
+        type uint32;
+        description "Server DUID time.";
+      }
+      leaf htype {
+        type uint16;
+        description "Server DUID hardware type.";
+      }
+      leaf enterprise-id {
+        type uint32;
+        description "Server DUID enterprise ID.";
+      }
+      leaf persist {
+        type boolean;
+        description "Server DUID persist flag.";
+      }
+      leaf user-context {
+        type kea:user-context;
+        description "Server DUID user context.";
+      }
+    }
+
+    uses dhcp:dhcp4o6-port;
+    uses kea:control-socket;
+    uses dhcp:hostname-char-set;
+    uses dhcp:hostname-char-replacement;
+    uses dhcp:dhcp-ddns;
+    uses kea:user-context {
+      refine user-context {
+        description "DHCPv6 server user context. Arbitrary JSON data can
+                     be stored here.";
+      }
+    }
+    uses dhcp:sanity-checks;
+    uses dhcp:reservation-mode;
+    uses reservations {
+      refine host {
+        description "Global host reservations list.";
+      }
+    }
+    uses dhcp:config-control;
+    uses dhcp:server-tag;
+    uses dhcp:dhcp-queue-control;
+    uses kea:loggers;
+  }
+
+  /*
+  * State data
+  */
+  container state {
+    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;
+          description "Lease IP address.";
+        }
+        leaf duid {
+          type binary;
+          mandatory true;
+          description "Lease DUID.";
+        }
+        uses dhcp:valid-lifetime {
+          refine valid-lifetime {
+            mandatory true;
+          }
+        }
+        leaf cltt {
+          type uint32;
+          units "seconds";
+          mandatory true;
+          description "Lease client last transmission time.";
+        }
+        leaf subnet-id {
+          type uint32;
+          mandatory true;
+          description "Lease subnet ID.";
+        }
+        leaf preferred-lifetime {
+          type uint32;
+          units "seconds";
+          mandatory true;
+          description "Lease preferred lifetime.";
+        }
+        leaf lease-type {
+          type enumeration {
+            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.";
+        }
+        leaf iaid {
+          type uint32;
+          mandatory true;
+          description "Lease IA ID.";
+        }
+        leaf prefix-length {
+          type uint8 {
+            range 0..128;
+          }
+          description "Lease prefix length.";
+        }
+        leaf fqdn-fwd {
+          type boolean;
+          description "Lease FQDN forward flag.";
+        }
+        leaf fqdn-rev {
+          type boolean;
+          description "Lease FQDN reverse lag.";
+        }
+        leaf hostname {
+          type string;
+          description "Lease hostname.";
+        }
+        leaf state {
+          type dhcp:lease-state;
+          description "Lease state.";
+        }
+        leaf user-context {
+          type kea:user-context;
+          description "Lease user context.";
+        }
+        leaf hw-address {
+          type string;
+          description "Lease hardware address.";
+        }
+      }
+    }
+
+    container lease-stats {
+      description "Lease statistics.";
+      list subnet {
+        key subnet-id;
+        description "List of IPv6 subnets.";
+        leaf subnet-id {
+          type uint32;
+          mandatory true;
+          description "Subnet ID.";
+        }
+        leaf total-nas {
+          type uint32;
+          mandatory true;
+          description "Total non-temporary addresses counter.";
+        }
+        leaf assigned-nas {
+          type uint32;
+          mandatory true;
+          description "Assigned non-temporary counter.";
+        }
+        leaf declined-nas {
+          type uint32;
+          mandatory true;
+          description "Declined non-temporary addresses counter.";
+        }
+        leaf total-pds {
+          type uint32;
+          mandatory true;
+          description "Total delegated prefixes counter.";
+        }
+        leaf assigned-pds {
+          type uint32;
+          mandatory true;
+          description "Assigned delegated prefixe counter.";
+        }
+      }
+    }
+
+    container hosts {
+      description "Kea DHCPv6 hosts.";
+      list host {
+        key "subnet-id identifier-type identifier";
+        description "List of Kea DHCPv6 hosts.";
+        uses host;
+        uses dhcp:host-subnet-id;
+        leaf auth-key {
+          type string;
+          description "Host authentication key.";
+        }
+      }
+    }
+
+    uses kea:store-extended-info;
+  }
+}
diff --git a/src/share/yang/modules/kea-types@2019-08-12.yang b/src/share/yang/modules/kea-types@2019-08-12.yang
deleted file mode 100644
index a1a46dcfba..0000000000
--- a/src/share/yang/modules/kea-types@2019-08-12.yang
+++ /dev/null
@@ -1,160 +0,0 @@
-module kea-types {
-  yang-version 1.1;
-  namespace "urn:ietf:params:xml:ns:yang:kea-types";
-  prefix "kea-types";
-
-  organization "Internet Systems Consortium";
-  contact "kea-dev@lists.isc.org";
-  description "This file defines some commonly used Kea types and groupings.";
-
-  revision 2019-08-12 {
-    description "Initial revision";
-    reference "";
-  }
-
-  /*
-  * Typedef
-  */
-  typedef user-context {
-    type string;
-    description "User context (JSON map).";
-  }
-
-  /*
-  * Grouping
-  */
-  grouping user-context {
-    description "User context grouping.";
-    leaf user-context {
-      type user-context;
-      description "User context entry.";
-    }
-  }
-
-  grouping control-socket-info {
-    description "Control socket parameters.";
-    leaf socket-name {
-      type string;
-      mandatory true;
-      description "Path to the UNIX socket.";
-    }
-    leaf socket-type {
-      type enumeration {
-        enum "unix" {
-          description "Unix socket type.";
-        }
-      }
-      mandatory true;
-      description "Socket type.";
-    }
-    leaf user-context {
-      type user-context;
-      description "Control socket user context.";
-    }
-  }
-
-  grouping control-socket {
-    description "Control socket grouping.";
-    container control-socket {
-      presence "Have control socket.";
-      description "Control socket container.";
-      uses control-socket-info;
-    }
-  }
-
-  grouping hooks-libraries {
-    description "Hooks libraries grouping.";
-    list hook-library {
-      key library;
-      description "List of hook library.";
-      leaf library {
-        type string;
-        mandatory true;
-        description "Path to the DSO.";
-      }
-      leaf parameters {
-        type string;
-        description "Parameters (JSON value).";
-      }
-    }
-  }
-
-  grouping loggers {
-    description "Loggers.";
-    list logger {
-      key name;
-      description "List of loggers.";
-      leaf name {
-        type string;
-        mandatory true;
-        description "Name of the logger.";
-      }
-      list output-option {
-        key output;
-        description "List of output options.";
-        leaf output {
-          type string;
-          description "Type of output. Special values are stdout (standard
-            output), stderr (standard error), syslog (syslog using default
-            name), syslog:name (syslog using specified name). Any other
-            value is interpreted as a filename.";
-        }
-        leaf flush {
-          type boolean;
-          description "When true flush buffers after each message.";
-        }
-        leaf maxsize {
-          type uint32;
-          description "Maximum size of output file before rotation.
-            Values below 204800 including 0 disable rotation.";
-        }
-        leaf maxver {
-          type uint32 {
-            range 1..max;
-          }
-          description "Maximum version to keep a rotated output file.";
-        }
-        leaf pattern {
-          type string;
-          description "Custom log layout.";
-        }
-      }
-      leaf debuglevel {
-        type uint8 {
-          range 0..99;
-        }
-        description "What level of debug messages should be printed.";
-      }
-      leaf severity {
-        type enumeration {
-          enum "FATAL" {
-            description "Condition is so serious that the server cannot
-              continue executing";
-          }
-          enum "ERROR" {
-            description "Error condition. The server will continue
-              executing, but the results may not be as expected.";
-          }
-          enum "WARN" {
-            description "Out of the ordinary condition. However, the server
-              will continue executing normally.";
-          }
-          enum "INFO" {
-            description "Information message marking some event.";
-          }
-          enum "DEBUG" {
-            description "For debugging purposes.";
-          }
-          enum "NONE" {
-            description "All messages are inhibited.";
-          }
-        }
-        description "Category of messages logged.";
-      }
-      leaf user-context {
-        type user-context;
-        description "Logger user context.";
-      }
-    }
-  }
-}
diff --git a/src/share/yang/modules/kea-types@2021-07-28.yang b/src/share/yang/modules/kea-types@2021-07-28.yang
new file mode 100644
index 0000000000..4fdefae0b9
--- /dev/null
+++ b/src/share/yang/modules/kea-types@2021-07-28.yang
@@ -0,0 +1,167 @@
+module kea-types {
+  yang-version 1.1;
+  namespace "urn:ietf:params:xml:ns:yang:kea-types";
+  prefix "kea-types";
+
+  organization "Internet Systems Consortium";
+  contact "kea-dev@lists.isc.org";
+  description "This file defines some commonly used Kea types and groupings.";
+
+  revision 2021-07-28 {
+    description "Initial revision + added store-extended-info";
+    reference "";
+  }
+
+  /*
+  * Typedef
+  */
+  typedef user-context {
+    type string;
+    description "User context (JSON map).";
+  }
+
+  /*
+  * Grouping
+  */
+  grouping user-context {
+    description "User context grouping.";
+    leaf user-context {
+      type user-context;
+      description "User context entry.";
+    }
+  }
+
+  grouping control-socket-info {
+    description "Control socket parameters.";
+    leaf socket-name {
+      type string;
+      mandatory true;
+      description "Path to the UNIX socket.";
+    }
+    leaf socket-type {
+      type enumeration {
+        enum "unix" {
+          description "Unix socket type.";
+        }
+      }
+      mandatory true;
+      description "Socket type.";
+    }
+    leaf user-context {
+      type user-context;
+      description "Control socket user context.";
+    }
+  }
+
+  grouping control-socket {
+    description "Control socket grouping.";
+    container control-socket {
+      presence "Have control socket.";
+      description "Control socket container.";
+      uses control-socket-info;
+    }
+  }
+
+  grouping hooks-libraries {
+    description "Hooks libraries grouping.";
+    list hook-library {
+      key library;
+      description "List of hook library.";
+      leaf library {
+        type string;
+        mandatory true;
+        description "Path to the DSO.";
+      }
+      leaf parameters {
+        type string;
+        description "Parameters (JSON value).";
+      }
+    }
+  }
+
+  grouping loggers {
+    description "Loggers.";
+    list logger {
+      key name;
+      description "List of loggers.";
+      leaf name {
+        type string;
+        mandatory true;
+        description "Name of the logger.";
+      }
+      list output-option {
+        key output;
+        description "List of output options.";
+        leaf output {
+          type string;
+          description "Type of output. Special values are stdout (standard
+            output), stderr (standard error), syslog (syslog using default
+            name), syslog:name (syslog using specified name). Any other
+            value is interpreted as a filename.";
+        }
+        leaf flush {
+          type boolean;
+          description "When true flush buffers after each message.";
+        }
+        leaf maxsize {
+          type uint32;
+          description "Maximum size of output file before rotation.
+            Values below 204800 including 0 disable rotation.";
+        }
+        leaf maxver {
+          type uint32 {
+            range 1..max;
+          }
+          description "Maximum version to keep a rotated output file.";
+        }
+        leaf pattern {
+          type string;
+          description "Custom log layout.";
+        }
+      }
+      leaf debuglevel {
+        type uint8 {
+          range 0..99;
+        }
+        description "What level of debug messages should be printed.";
+      }
+      leaf severity {
+        type enumeration {
+          enum "FATAL" {
+            description "Condition is so serious that the server cannot
+              continue executing";
+          }
+          enum "ERROR" {
+            description "Error condition. The server will continue
+              executing, but the results may not be as expected.";
+          }
+          enum "WARN" {
+            description "Out of the ordinary condition. However, the server
+              will continue executing normally.";
+          }
+          enum "INFO" {
+            description "Information message marking some event.";
+          }
+          enum "DEBUG" {
+            description "For debugging purposes.";
+          }
+          enum "NONE" {
+            description "All messages are inhibited.";
+          }
+        }
+        description "Category of messages logged.";
+      }
+      leaf user-context {
+        type user-context;
+        description "Logger user context.";
+      }
+    }
+  }
+
+  grouping store-extended-info {
+    leaf store-extended-info {
+      description "whether Kea should store additional client query data e.g. RAI in packets";
+      type boolean;
+    }
+  }
+}
-- 
cgit v1.2.3