<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
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.
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 | | | |
-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 = adaptor.cc adaptor.h
libkea_yang_la_SOURCES += sysrepo_error.h
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 "";
}
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 "";
}
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 "";
}
}
}
- // 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 {
stored here.";
}
}
- }
+ }
grouping host-user-context {
description "User context grouping for a host reservation.";
stored here.";
}
}
- }
+ }
grouping network-user-context {
description "User context grouping for a shared network.";
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 "";
}
}
}
+ 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 {
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;
}
}
uses dhcp:sanity-checks;
+ uses reservations {
+ refine reservations {
+ description "Global host reservations.";
+ }
+ }
}
container logging {
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).";
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 "";
}
}
}
+ 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 {
}
}
+ 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 {
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 {
}
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;
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;
}
}
uses dhcp:sanity-checks;
+ uses reservations {
+ refine reservations {
+ description "Global host reservations.";
+ }
+ }
}
container logging {
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.";
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 "";
}
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 "";
}