]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[65-libyang-models-update] Updated models and doc, tentative models distrib
authorFrancis Dupont <fdupont@isc.org>
Fri, 14 Sep 2018 09:31:59 +0000 (11:31 +0200)
committerFrancis Dupont <fdupont@isc.org>
Fri, 14 Sep 2018 09:31:59 +0000 (11:31 +0200)
doc/guide/netconf.xml
src/lib/yang/Makefile.am
src/lib/yang/models/kea-ctrl-agent.yang
src/lib/yang/models/kea-dhcp-ddns.yang
src/lib/yang/models/kea-dhcp-types.yang
src/lib/yang/models/kea-dhcp4-server.yang
src/lib/yang/models/kea-dhcp6-server.yang
src/lib/yang/models/kea-logging.yang
src/lib/yang/models/kea-types.yang

index 06f436da26ea21ff394031f8d167f8868a28197c..2357ea088b3efc7776d6ef48e81de87f04c053da 100644 (file)
@@ -121,8 +121,8 @@ src/lib/libyang/models. To install Kea models, do the following:
 
 <screen>
 cd src/lib/yang/models
-sudo sysrepoctl -i -g kea-dhcpv4-server.yang -s /home/thomson/devel/sysrepo-0.7.4/build/repository/yang/ -s ./
-sudo sysrepoctl -i -g ietf-dhcpv6-server.yang -s /home/thomson/devel/sysrepo-0.7.4/build/repository/yang/ -s ./
+sudo sysrepoctl -i -g kea-dhcp4-server.yang -s /home/thomson/devel/sysrepo-0.7.4/build/repository/yang/ -s ./
+sudo sysrepoctl -i -g ietf-dhcp6-server.yang -s /home/thomson/devel/sysrepo-0.7.4/build/repository/yang/ -s ./
 </screen>
 
 Note the first -s parameter specifies the location of your YANG schema
@@ -132,25 +132,25 @@ configured during sysrepo compilation.
 
 The installation should look similar to the following:
 <screen>
-$ sudo sysrepoctl -i -g ietf-dhcpv4-server.yang -s /home/thomson/devel/sysrepo-0.7.4/build/repository/yang/ -s ./
-Installing a new module from file 'ietf-dhcpv4-server.yang'...
-Installing the YANG file to '/home/thomson/devel/sysrepo-0.7.4/build/repository/yang/ietf-dhcpv4-server@2018-07-14.yang'...
-Resolving dependency: 'ietf-dhcpv4-server' imports 'ietf-dhcpv4-options'...
-Installing the YANG file to '/home/thomson/devel/sysrepo-0.7.4/build/repository/yang/ietf-dhcpv4-options@2018-07-14.yang'...
-Resolving dependency: 'ietf-dhcpv4-options' imports 'ietf-dhcpv4-types'...
-Installing the YANG file to '/home/thomson/devel/sysrepo-0.7.4/build/repository/yang/ietf-dhcpv4-types@2018-07-14.yang'...
-Resolving dependency: 'ietf-dhcpv4-server' imports 'ietf-dhcpv4-types'...
-Installing the YANG file to '/home/thomson/devel/sysrepo-0.7.4/build/repository/yang/ietf-dhcpv4-types@2018-07-14.yang'...
-Resolving dependency: 'ietf-dhcpv4-server' imports 'ietf-interfaces'...
+$ sudo sysrepoctl -i -g ietf-dhcp6-server.yang -s /home/thomson/devel/sysrepo-0.7.4/build/repository/yang/ -s ./
+Installing a new module from file 'ietf-dhcp6-server.yang'...
+Installing the YANG file to '/home/thomson/devel/sysrepo-0.7.4/build/repository/yang/ietf-dhcp6-server@2018-07-14.yang'...
+Resolving dependency: 'ietf-dhcp6-server' imports 'ietf-dhcp6-options'...
+Installing the YANG file to '/home/thomson/devel/sysrepo-0.7.4/build/repository/yang/ietf-dhcp6-options@2018-07-14.yang'...
+Resolving dependency: 'ietf-dhcp6-options' imports 'ietf-dhcp6-types'...
+Installing the YANG file to '/home/thomson/devel/sysrepo-0.7.4/build/repository/yang/ietf-dhcp6-types@2018-07-14.yang'...
+Resolving dependency: 'ietf-dhcp6-server' imports 'ietf-dhcp6-types'...
+Installing the YANG file to '/home/thomson/devel/sysrepo-0.7.4/build/repository/yang/ietf-dhcp6-types@2018-07-14.yang'...
+Resolving dependency: 'ietf-dhcp6-server' imports 'ietf-interfaces'...
 Schema of the module ietf-interfaces is already installed, skipping...
-Installing data files for module 'ietf-dhcpv4-server'...
-Resolving dependency: 'ietf-dhcpv4-server' imports 'ietf-dhcpv4-options'...
-Skipping installation of data files for module 'ietf-dhcpv4-options'...
-Resolving dependency: 'ietf-dhcpv4-options' imports 'ietf-dhcpv4-types'...
-Skipping installation of data files for module 'ietf-dhcpv4-types'...
-Resolving dependency: 'ietf-dhcpv4-server' imports 'ietf-dhcpv4-types'...
-Skipping installation of data files for module 'ietf-dhcpv4-types'...
-Resolving dependency: 'ietf-dhcpv4-server' imports 'ietf-interfaces'...
+Installing data files for module 'ietf-dhcp6-server'...
+Resolving dependency: 'ietf-dhcp6-server' imports 'ietf-dhcp6-options'...
+Skipping installation of data files for module 'ietf-dhcp6-options'...
+Resolving dependency: 'ietf-dhcp6-options' imports 'ietf-dhcp6-types'...
+Skipping installation of data files for module 'ietf-dhcp6-types'...
+Resolving dependency: 'ietf-dhcp6-server' imports 'ietf-dhcp6-types'...
+Skipping installation of data files for module 'ietf-dhcp6-types'...
+Resolving dependency: 'ietf-dhcp6-server' imports 'ietf-interfaces'...
 Installing data files for module 'ietf-interfaces'...
 Notifying sysrepo about the change...
 Install operation completed successfully.
@@ -175,9 +175,7 @@ turing-machine             | 2013-12-27 | Installed   | root:root           | 66
 iana-if-type               | 2014-05-08 | Installed   |                     |             |                               |
 ietf-interfaces            | 2014-05-08 | Installed   | root:root           | 666         |                               |
 ietf-ip                    | 2014-06-16 | Installed   |                     |             |                               |
-kea-dhcpv4-server          | 2018-07-14 | Installed   | root:root           | 666         |                               |
-ietf-dhcpv4-options        | 2018-07-14 | Imported    |                     |             |                               |
-ietf-dhcpv4-types          | 2018-07-14 | Imported    |                     |             |                               |
+kea-dhcp4-server           | 2018-07-14 | Installed   | root:root           | 666         |                               |
 ietf-dhcpv6-server         | 2018-03-04 | Installed   | root:root           | 666         |                               |
 ietf-dhcpv6-options        | 2018-03-04 | Imported    |                     |             |                               |
 ietf-dhcpv6-types          | 2018-01-30 | Imported    |                     |             |                               |
index 01b3a633afbfb8df9ff014a2abcdd6323c8c2823..a242da7a1540cdf6d38a0ab2240da0ff7730b492 100644 (file)
@@ -1,9 +1,22 @@
-SUBDIRS = . tests
+SUBDIRS = .  tests
 
 AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
 AM_CPPFLAGS += $(BOOST_INCLUDES) $(SYSREPO_CPPFLAGS)
 AM_CXXFLAGS = $(KEA_CXXFLAGS)
 
+nobase_dist_pkgdata_DATA  = models/ietf-dhcpv6-client.yang
+nobase_dist_pkgdata_DATA += models/ietf-dhcpv6-options.yang
+nobase_dist_pkgdata_DATA += models/ietf-dhcpv6-relay.yang
+nobase_dist_pkgdata_DATA += models/etf-dhcpv6-server.yang
+nobase_dist_pkgdata_DATA += models/ietf-dhcpv6-types.yang
+nobase_dist_pkgdata_DATA += models/kea-ctrl-agent.yang
+nobase_dist_pkgdata_DATA += models/kea-dhcp-ddns.yang
+nobase_dist_pkgdata_DATA += models/kea-dhcp-types.yang
+nobase_dist_pkgdata_DATA += models/kea-dhcp4-server.yang
+nobase_dist_pkgdata_DATA += models/kea-dhcp6-server.yang
+nobase_dist_pkgdata_DATA += models/kea-logging.yang
+nobase_dist_pkgdata_DATA += models/kea-types.yang
+
 lib_LTLIBRARIES = libkea-yang.la
 libkea_yang_la_SOURCES = sysrepo_error.h
 libkea_yang_la_SOURCES += translator.cc translator.h
index eb56f266009cf0714b28a8ef2e3efc275111ff68..9d94224925d454b56699e40e2ce07740283947c6 100644 (file)
@@ -18,7 +18,7 @@ module kea-ctrl-agent {
   description "This model defines a YANG data model that can be
                used to configure and manage a Kea control agent.";
 
-  revision 2018-08-20 {
+  revision 2018-09-14 {
     description "Initial revision";
     reference "";
   }
index af4d14624e7f434dcdc61afe4ec70f2230779dc9..56f4e54734175043118595f34683faf6de873997 100644 (file)
@@ -18,7 +18,7 @@ module kea-dhcp-ddns {
   description "This model defines a YANG data model that can be
     used to configure and manage a Kea DHCP-DDNS server.";
 
-  revision 2018-08-20 {
+  revision 2018-09-14 {
     description "Initial revision";
     reference "";
   }
index 3e236c29dd595bb693f96f979023b438b2f81c92..43e8baf8f83aaf5ac5c394571df7636a4eae3011 100644 (file)
@@ -14,7 +14,7 @@ module kea-dhcp-types {
   contact "kea-dev@lists.isc.org";
   description "This file defines some commonly used Kea DHCP types and
                groupings.";
-  revision 2018-08-20 {
+  revision 2018-09-14 {
     description "Initial revision";
     reference "";
   }
@@ -499,33 +499,6 @@ module kea-dhcp-types {
     }
   }
 
-  // To move to DHCPv6.
-  grouping interface-id {
-    description "Interface ID grouping.";
-    leaf interface-id {
-      type string;
-      description "Interface ID entry.";
-    }
-  }
-
-  grouping subnet-interface-id {
-    description "Interface ID grouping for a subnet.";
-    uses interface-id {
-      refine interface-id {
-        description "Subnet interface-id option.";
-      }
-    }
-  }
-
-  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 {
@@ -751,7 +724,7 @@ module kea-dhcp-types {
                      stored here.";
       }
     }
-  }   
+  }
 
   grouping host-user-context {
     description "User context grouping for a host reservation.";
@@ -771,7 +744,7 @@ module kea-dhcp-types {
                      stored here.";
       }
     }
-  }   
+  }
 
   grouping network-user-context {
     description "User context grouping for a shared network.";
index 2b9683f141cde20e11eea8d707035c53ae96f769..bbd5422c16044f28ea1dd44991a104a50ac22c66 100644 (file)
@@ -21,7 +21,7 @@ module kea-dhcp4-server {
   description "This model defines a YANG data model that can be
                used to configure and manage a Kea DHCPv4 server.";
 
-  revision 2018-08-20 {
+  revision 2018-09-14 {
     description "Initial revision";
     reference "";
   }
@@ -96,6 +96,39 @@ module kea-dhcp4-server {
     }
   }
 
+  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.";
+    container reservations {
+      description "Host reservations container.";
+      list host {
+        key "identifier-type identifier";
+        description "Host reservation entry.";
+        uses host;
+      }
+    }
+  }
+
   grouping subnet4-list {
     description "Subnet4 list grouping.";
     list subnet4 {
@@ -139,32 +172,12 @@ module kea-dhcp4-server {
         description "IPv4 subnet prefix.";
       }
       uses dhcp:subnet-interface;
-      uses dhcp:subnet-interface-id;
       uses dhcp:subnet-id;
       uses dhcp:subnet-client-class;
       uses dhcp:subnet-require-client-classes;
-      container reservations {
-        description "A container with host reservations specific to
-                     this IPv4 subnet.";
-        list host {
-          key "identifier-type identifier";
-          description "Host reservation entry.";
-          leaf identifier-type {
-            type host-identifier-type;
-            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;
+      uses reservations {
+        refine reservations {
+          description "Subnet host reservations.";
         }
       }
       uses dhcp:subnet-reservation-mode;
@@ -387,6 +400,11 @@ module kea-dhcp4-server {
       }
     }
     uses dhcp:sanity-checks;
+    uses reservations {
+      refine reservations {
+        description "Global host reservations.";
+      }
+    }
   }
 
   container logging {
@@ -498,24 +516,8 @@ module kea-dhcp4-server {
       list host {
         key "subnet-id identifier-type identifier";
         description "List of Kea DHCPv4 hosts.";
-        leaf identifier-type {
-          type host-identifier-type;
-          mandatory true;
-          description "Host identifier type.";
-        }
-        uses dhcp:host-identifier;
+        uses host;
         uses dhcp:host-subnet-id;
-        leaf ip-address {
-          type inet:ipv4-address;
-          description "Host reserved IP 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;
         leaf auth-key {
           type string;
           description "Host authentication key (unused in DHCPv4).";
index 519a404c7d4fd002f4d3c26682f164597e228b3b..c358654a65e2c6d005bf66c8a2f6948f70bd1e19 100644 (file)
@@ -22,7 +22,7 @@ module kea-dhcp6-server {
   description "This model defines a YANG data model that can be
                used to configure and manage a Kea DHCPv6 server.";
 
-  revision 2018-08-20 {
+  revision 2018-09-14 {
     description "Initial revision";
     reference "";
   }
@@ -57,6 +57,14 @@ module kea-dhcp6-server {
     }
   }
 
+  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 {
@@ -74,6 +82,40 @@ module kea-dhcp6-server {
     }
   }
 
+  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.";
+    container reservations {
+      description "Host reservations container.";
+      list host {
+        key "identifier-type identifier";
+        description "Host reservation entry.";
+        uses host;
+      }
+    }
+  }
+
   grouping subnet6-list {
     description "Subnet6 list grouping.";
     list subnet6 {
@@ -157,7 +199,11 @@ module kea-dhcp6-server {
         description "IPv6 subnet prefix.";
       }
       uses dhcp:subnet-interface;
-      uses dhcp:subnet-interface-id;
+      uses interface-id {
+        refine interface-id {
+          description "Subnet interface-id option.";
+        }
+      }
       uses dhcp:subnet-id;
       uses rapid-commit {
         refine rapid-commit {
@@ -166,30 +212,9 @@ module kea-dhcp6-server {
       }
       uses dhcp:subnet-client-class;
       uses dhcp:require-client-classes;
-      container reservations {
-        description "A container with host reservations specific to
-                     this IPv6 subnet.";
-        list host {
-          key "identifier-type identifier";
-          description "Host reservation entry.";
-          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;
+      uses reservations {
+        refine reservations {
+          description "Subnet host reservations.";
         }
       }
       uses dhcp:subnet-reservation-mode;
@@ -294,7 +319,11 @@ module kea-dhcp6-server {
           uses subnet6-list;
         }
         uses dhcp:network-interface;
-        uses dhcp:network-interface-id;
+        uses interface-id {
+          refine interface-id {
+            description "Shared network interface-id option.";
+          }
+        }
         uses dhcp:renew-timer;
         uses dhcp:rebind-timer;
         uses option-data-list;
@@ -412,6 +441,11 @@ module kea-dhcp6-server {
       }
     }
     uses dhcp:sanity-checks;
+    uses reservations {
+      refine reservations {
+        description "Global host reservations.";
+      }
+    }
   }
 
   container logging {
@@ -565,25 +599,8 @@ module kea-dhcp6-server {
       list host {
         key "subnet-id identifier-type identifier";
         description "List of Kea DHCPv6 hosts.";
-        leaf identifier-type {
-          type host-identifier-type;
-          mandatory true;
-          description "Host identifier type.";
-        }
-        uses dhcp:host-identifier;
+        uses host;
         uses dhcp:host-subnet-id;
-        leaf-list ip-addresses {
-          type inet:ipv6-address;
-          description "Host reserved IP addresses.";
-        }
-        leaf-list prefixes {
-          type inet:ipv6-prefix;
-          description "Host reserved prefixes.";
-        }
-        uses dhcp:host-hostname;
-        uses dhcp:host-client-classes;
-        uses option-data-list;
-        uses dhcp:host-user-context;
         leaf auth-key {
           type string;
           description "Host authentication key.";
index a2412c7a18d357b6046a16962e1058260f661fde..31ad29f9db430c8e4e0b7d5f51a579359fc08e28 100644 (file)
@@ -12,7 +12,7 @@ module kea-logging {
   description "This model defines a YANG data model that can be
     used to configure and manage logging of a Kea server.";
 
-  revision 2018-08-20 {
+  revision 2018-09-14 {
     description "Initial revision";
     reference "";
   }
index d89690762ca3d46815e78cbb3c487877b78bc9e8..bfbdac738f49223adf0e048f73e5ac4e47ddaeab 100644 (file)
@@ -7,7 +7,7 @@ module kea-types {
   contact "kea-dev@lists.isc.org";
   description "This file defines some commonly used Kea types and groupings.";
 
-  revision 2018-08-20 {
+  revision 2018-09-14 {
     description "Initial revision";
     reference "";
   }