diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 11:36:04 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 11:36:04 +0000 |
commit | 040eee1aa49b49df4698d83a05af57c220127fd1 (patch) | |
tree | f635435954e6ccde5eee9893889e24f30ca68346 /src/share/yang/modules | |
parent | Initial commit. (diff) | |
download | isc-kea-040eee1aa49b49df4698d83a05af57c220127fd1.tar.xz isc-kea-040eee1aa49b49df4698d83a05af57c220127fd1.zip |
Adding upstream version 2.2.0.upstream/2.2.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/share/yang/modules')
37 files changed, 10549 insertions, 0 deletions
diff --git a/src/share/yang/modules/Makefile.am b/src/share/yang/modules/Makefile.am new file mode 100644 index 0000000..9a2f88d --- /dev/null +++ b/src/share/yang/modules/Makefile.am @@ -0,0 +1,26 @@ +SUBDIRS = utils + +yangmodulesdir = ${datarootdir}/${PACKAGE_NAME}/yang/modules + +yangmodules_list = +yangmodules_list += ietf-dhcpv6-client@2018-09-04.yang +yangmodules_list += ietf-interfaces@2018-02-20.yang +yangmodules_list += ietf-dhcpv6-options@2018-09-04.yang +yangmodules_list += ietf-dhcpv6-relay@2018-09-04.yang +yangmodules_list += ietf-dhcpv6-server@2018-09-04.yang +yangmodules_list += ietf-dhcpv6-types@2018-09-04.yang +yangmodules_list += ietf-inet-types@2013-07-15.yang +yangmodules_list += ietf-yang-types@2013-07-15.yang +yangmodules_list += kea-ctrl-agent@2019-08-12.yang +yangmodules_list += kea-dhcp-ddns@2022-07-27.yang +yangmodules_list += kea-dhcp-types@2022-07-27.yang +yangmodules_list += kea-dhcp4-server@2022-07-27.yang +yangmodules_list += kea-dhcp6-server@2022-07-27.yang +yangmodules_list += kea-types@2019-08-12.yang +yangmodules_list += keatest-module@2018-11-20.yang + +EXTRA_DIST = hashes ${yangmodules_list} + +if HAVE_SYSREPO +yangmodules_DATA = ${yangmodules_list} +endif diff --git a/src/share/yang/modules/Makefile.in b/src/share/yang/modules/Makefile.in new file mode 100644 index 0000000..e0bf603 --- /dev/null +++ b/src/share/yang/modules/Makefile.in @@ -0,0 +1,774 @@ +# Makefile.in generated by automake 1.16.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2018 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/share/yang/modules +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4macros/ax_boost_for_kea.m4 \ + $(top_srcdir)/m4macros/ax_cpp11.m4 \ + $(top_srcdir)/m4macros/ax_crypto.m4 \ + $(top_srcdir)/m4macros/ax_find_library.m4 \ + $(top_srcdir)/m4macros/ax_gssapi.m4 \ + $(top_srcdir)/m4macros/ax_gtest.m4 \ + $(top_srcdir)/m4macros/ax_isc_rpath.m4 \ + $(top_srcdir)/m4macros/ax_sysrepo.m4 \ + $(top_srcdir)/m4macros/libtool.m4 \ + $(top_srcdir)/m4macros/ltoptions.m4 \ + $(top_srcdir)/m4macros/ltsugar.m4 \ + $(top_srcdir)/m4macros/ltversion.m4 \ + $(top_srcdir)/m4macros/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(yangmodulesdir)" +DATA = $(yangmodules_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir distdir-am +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ASCIIDOC = @ASCIIDOC@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BOOST_INCLUDES = @BOOST_INCLUDES@ +BOOST_LIBS = @BOOST_LIBS@ +BOTAN_TOOL = @BOTAN_TOOL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONTRIB_DIR = @CONTRIB_DIR@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CRYPTO_CFLAGS = @CRYPTO_CFLAGS@ +CRYPTO_INCLUDES = @CRYPTO_INCLUDES@ +CRYPTO_LDFLAGS = @CRYPTO_LDFLAGS@ +CRYPTO_LIBS = @CRYPTO_LIBS@ +CRYPTO_PACKAGE = @CRYPTO_PACKAGE@ +CRYPTO_RPATH = @CRYPTO_RPATH@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DISTCHECK_BOOST_CONFIGURE_FLAG = @DISTCHECK_BOOST_CONFIGURE_FLAG@ +DISTCHECK_CONTRIB_CONFIGURE_FLAG = @DISTCHECK_CONTRIB_CONFIGURE_FLAG@ +DISTCHECK_CRYPTO_CONFIGURE_FLAG = @DISTCHECK_CRYPTO_CONFIGURE_FLAG@ +DISTCHECK_GTEST_CONFIGURE_FLAG = @DISTCHECK_GTEST_CONFIGURE_FLAG@ +DISTCHECK_KEA_SHELL_CONFIGURE_FLAG = @DISTCHECK_KEA_SHELL_CONFIGURE_FLAG@ +DISTCHECK_LOG4CPLUS_CONFIGURE_FLAG = @DISTCHECK_LOG4CPLUS_CONFIGURE_FLAG@ +DISTCHECK_PERFDHCP_CONFIGURE_FLAG = @DISTCHECK_PERFDHCP_CONFIGURE_FLAG@ +DISTCHECK_PREMIUM_CONFIGURE_FLAG = @DISTCHECK_PREMIUM_CONFIGURE_FLAG@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GENHTML = @GENHTML@ +GREP = @GREP@ +GSSAPI_CFLAGS = @GSSAPI_CFLAGS@ +GSSAPI_LIBS = @GSSAPI_LIBS@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_INCLUDES = @GTEST_INCLUDES@ +GTEST_LDADD = @GTEST_LDADD@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ +GTEST_SOURCE = @GTEST_SOURCE@ +HAVE_SYSREPO = @HAVE_SYSREPO@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KEA_CXXFLAGS = @KEA_CXXFLAGS@ +KEA_SRCID = @KEA_SRCID@ +KRB5_CONFIG = @KRB5_CONFIG@ +LCOV = @LCOV@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOG4CPLUS_INCLUDES = @LOG4CPLUS_INCLUDES@ +LOG4CPLUS_LIBS = @LOG4CPLUS_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MYSQL_CPPFLAGS = @MYSQL_CPPFLAGS@ +MYSQL_LIBS = @MYSQL_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_TYPE = @PACKAGE_VERSION_TYPE@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PDFLATEX = @PDFLATEX@ +PERL = @PERL@ +PGSQL_CPPFLAGS = @PGSQL_CPPFLAGS@ +PGSQL_LIBS = @PGSQL_LIBS@ +PKGPYTHONDIR = @PKGPYTHONDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PLANTUML = @PLANTUML@ +PREMIUM_DIR = @PREMIUM_DIR@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SED = @SED@ +SEP = @SEP@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SPHINXBUILD = @SPHINXBUILD@ +SRPD_PLUGINS_PATH = @SRPD_PLUGINS_PATH@ +SR_REPO_PATH = @SR_REPO_PATH@ +STRIP = @STRIP@ +SYSREPOCPP_VERSION = @SYSREPOCPP_VERSION@ +SYSREPO_CPPFLAGS = @SYSREPO_CPPFLAGS@ +SYSREPO_INCLUDEDIR = @SYSREPO_INCLUDEDIR@ +SYSREPO_LIBS = @SYSREPO_LIBS@ +SYSREPO_VERSION = @SYSREPO_VERSION@ +USE_LCOV = @USE_LCOV@ +VALGRIND = @VALGRIND@ +VERSION = @VERSION@ +WARNING_GCC_44_STRICT_ALIASING_CFLAG = @WARNING_GCC_44_STRICT_ALIASING_CFLAG@ +YACC = @YACC@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = utils +yangmodulesdir = ${datarootdir}/${PACKAGE_NAME}/yang/modules +yangmodules_list = ietf-dhcpv6-client@2018-09-04.yang \ + ietf-interfaces@2018-02-20.yang \ + ietf-dhcpv6-options@2018-09-04.yang \ + ietf-dhcpv6-relay@2018-09-04.yang \ + ietf-dhcpv6-server@2018-09-04.yang \ + ietf-dhcpv6-types@2018-09-04.yang \ + ietf-inet-types@2013-07-15.yang \ + ietf-yang-types@2013-07-15.yang kea-ctrl-agent@2019-08-12.yang \ + kea-dhcp-ddns@2022-07-27.yang kea-dhcp-types@2022-07-27.yang \ + kea-dhcp4-server@2022-07-27.yang \ + kea-dhcp6-server@2022-07-27.yang kea-types@2019-08-12.yang \ + keatest-module@2018-11-20.yang +EXTRA_DIST = hashes ${yangmodules_list} +@HAVE_SYSREPO_TRUE@yangmodules_DATA = ${yangmodules_list} +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/share/yang/modules/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/share/yang/modules/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-yangmodulesDATA: $(yangmodules_DATA) + @$(NORMAL_INSTALL) + @list='$(yangmodules_DATA)'; test -n "$(yangmodulesdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(yangmodulesdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(yangmodulesdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(yangmodulesdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(yangmodulesdir)" || exit $$?; \ + done + +uninstall-yangmodulesDATA: + @$(NORMAL_UNINSTALL) + @list='$(yangmodules_DATA)'; test -n "$(yangmodulesdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(yangmodulesdir)'; $(am__uninstall_files_from_dir) + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(DATA) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(yangmodulesdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-yangmodulesDATA + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-yangmodulesDATA + +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip install-yangmodulesDATA installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-yangmodulesDATA + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/src/share/yang/modules/hashes/ietf-dhcpv6-client@2018-09-04.hash b/src/share/yang/modules/hashes/ietf-dhcpv6-client@2018-09-04.hash new file mode 100644 index 0000000..ee2a059 --- /dev/null +++ b/src/share/yang/modules/hashes/ietf-dhcpv6-client@2018-09-04.hash @@ -0,0 +1 @@ +461ea3c5d65a212413437d52bd328a31591f7cf0b890aec920af7b793deaf749 diff --git a/src/share/yang/modules/hashes/ietf-dhcpv6-options@2018-09-04.hash b/src/share/yang/modules/hashes/ietf-dhcpv6-options@2018-09-04.hash new file mode 100644 index 0000000..cd99d1b --- /dev/null +++ b/src/share/yang/modules/hashes/ietf-dhcpv6-options@2018-09-04.hash @@ -0,0 +1 @@ +deaf2a9c68b0cf88c6d2080036e50eded5c2356d062f339df44232f5cb240da6 diff --git a/src/share/yang/modules/hashes/ietf-dhcpv6-relay@2018-09-04.hash b/src/share/yang/modules/hashes/ietf-dhcpv6-relay@2018-09-04.hash new file mode 100644 index 0000000..a6c5446 --- /dev/null +++ b/src/share/yang/modules/hashes/ietf-dhcpv6-relay@2018-09-04.hash @@ -0,0 +1 @@ +1a18c64a05cf4295864e2e9871b811b9b4fdf30568f0ce14de045a6af9d04450 diff --git a/src/share/yang/modules/hashes/ietf-dhcpv6-server@2018-09-04.hash b/src/share/yang/modules/hashes/ietf-dhcpv6-server@2018-09-04.hash new file mode 100644 index 0000000..a6e5569 --- /dev/null +++ b/src/share/yang/modules/hashes/ietf-dhcpv6-server@2018-09-04.hash @@ -0,0 +1 @@ +474fcc1cf5a017028796d37240491d72d6a10511539554a709bf877de54c8947 diff --git a/src/share/yang/modules/hashes/ietf-dhcpv6-types@2018-09-04.hash b/src/share/yang/modules/hashes/ietf-dhcpv6-types@2018-09-04.hash new file mode 100644 index 0000000..9c8977d --- /dev/null +++ b/src/share/yang/modules/hashes/ietf-dhcpv6-types@2018-09-04.hash @@ -0,0 +1 @@ +de34e4338042b62894a42b88026ab2966b98236757b2359167c8f8c238715abe diff --git a/src/share/yang/modules/hashes/ietf-inet-types@2013-07-15.hash b/src/share/yang/modules/hashes/ietf-inet-types@2013-07-15.hash new file mode 100644 index 0000000..601b32e --- /dev/null +++ b/src/share/yang/modules/hashes/ietf-inet-types@2013-07-15.hash @@ -0,0 +1 @@ +9ba53b11ecce24a3b878a816555efd8f6559bbcbb5179c62c48af91598744b9e diff --git a/src/share/yang/modules/hashes/ietf-interfaces@2018-02-20.hash b/src/share/yang/modules/hashes/ietf-interfaces@2018-02-20.hash new file mode 100644 index 0000000..1445fe1 --- /dev/null +++ b/src/share/yang/modules/hashes/ietf-interfaces@2018-02-20.hash @@ -0,0 +1 @@ +990663408339f40c7a68e73920a3d65b18a08eeb87bf788712aec2520aedc475 diff --git a/src/share/yang/modules/hashes/ietf-yang-types@2013-07-15.hash b/src/share/yang/modules/hashes/ietf-yang-types@2013-07-15.hash new file mode 100644 index 0000000..32ebab2 --- /dev/null +++ b/src/share/yang/modules/hashes/ietf-yang-types@2013-07-15.hash @@ -0,0 +1 @@ +0e69553a19dff434f563e5f10fac3dd9b87b5d49d73b92fa11453f9f8e6e2c0b 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 new file mode 100644 index 0000000..bf142b8 --- /dev/null +++ b/src/share/yang/modules/hashes/kea-ctrl-agent@2019-08-12.hash @@ -0,0 +1 @@ +5d11568b445edc65a4783f53fe5e8571af9a79b759272d4a3e4bfba994f71087 diff --git a/src/share/yang/modules/hashes/kea-dhcp-ddns@2022-07-27.hash b/src/share/yang/modules/hashes/kea-dhcp-ddns@2022-07-27.hash new file mode 100644 index 0000000..e0e5205 --- /dev/null +++ b/src/share/yang/modules/hashes/kea-dhcp-ddns@2022-07-27.hash @@ -0,0 +1 @@ +5a1ad7031da9ab5f93a87df74ddba26aab2ade6250969c06504a0b5f13007d7f diff --git a/src/share/yang/modules/hashes/kea-dhcp-types@2022-07-27.hash b/src/share/yang/modules/hashes/kea-dhcp-types@2022-07-27.hash new file mode 100644 index 0000000..a03e11a --- /dev/null +++ b/src/share/yang/modules/hashes/kea-dhcp-types@2022-07-27.hash @@ -0,0 +1 @@ +37c464015c0ff912febacfd4cff17dd162e73d377df2630a3a3c09f16d812460 diff --git a/src/share/yang/modules/hashes/kea-dhcp4-server@2022-07-27.hash b/src/share/yang/modules/hashes/kea-dhcp4-server@2022-07-27.hash new file mode 100644 index 0000000..dcd2bbe --- /dev/null +++ b/src/share/yang/modules/hashes/kea-dhcp4-server@2022-07-27.hash @@ -0,0 +1 @@ +9337384d8f47ebbce2e6883d612487820cfd841cab9c1447ed25e8b991c64d81 diff --git a/src/share/yang/modules/hashes/kea-dhcp6-server@2022-07-27.hash b/src/share/yang/modules/hashes/kea-dhcp6-server@2022-07-27.hash new file mode 100644 index 0000000..a0d37df --- /dev/null +++ b/src/share/yang/modules/hashes/kea-dhcp6-server@2022-07-27.hash @@ -0,0 +1 @@ +9d1ec0093e418675db838a23782bf880971067f68ec1ea2803a61f8656bcf22c 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 new file mode 100644 index 0000000..b0c8859 --- /dev/null +++ b/src/share/yang/modules/hashes/kea-types@2019-08-12.hash @@ -0,0 +1 @@ +c06b5242654257c9b8d7f9d2375ab78e9c5cfce74ed4e9f8e21face43a949b9a diff --git a/src/share/yang/modules/hashes/keatest-module@2018-11-20.hash b/src/share/yang/modules/hashes/keatest-module@2018-11-20.hash new file mode 100644 index 0000000..95cc911 --- /dev/null +++ b/src/share/yang/modules/hashes/keatest-module@2018-11-20.hash @@ -0,0 +1 @@ +f4a46d17ce7791f9d12d0906e1ed8c4b424b29146b5fd5e097663a6d9d388264 diff --git a/src/share/yang/modules/ietf-dhcpv6-client@2018-09-04.yang b/src/share/yang/modules/ietf-dhcpv6-client@2018-09-04.yang new file mode 100644 index 0000000..c4faa97 --- /dev/null +++ b/src/share/yang/modules/ietf-dhcpv6-client@2018-09-04.yang @@ -0,0 +1,346 @@ +module ietf-dhcpv6-client { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-client"; + prefix "dhcpv6-client"; + + import ietf-dhcpv6-options { + prefix dhcpv6-options; + } + import ietf-dhcpv6-types { + prefix dhcpv6-types; + } + import ietf-interfaces { + prefix if; + } + + organization "DHC WG"; + contact + "cuiyong@tsinghua.edu.cn + wangh13@mails.tsinghua.edu.cn + lh.sunlinh@gmail.com + ian.farrer@telekom.de + sladjana.zechlin@telekom.de + hezihao9512@gmail.com "; + + description "This model defines a YANG data model that can be + used to configure and manage a DHCPv6 client."; + + revision 2018-09-04 { + description ""; + reference "I-D: draft-ietf-dhc-dhcpv6-yang"; + } + + revision 2018-03-04 { + description "Resolved most issues on the DHC official + github"; + reference "I-D: draft-ietf-dhc-dhcpv6-yang"; + } + + revision 2017-12-22 { + description "Resolve most issues on Ian's github."; + reference "I-D: draft-ietf-dhc-dhcpv6-yang"; + } + + revision 2017-11-24 { + description "First version of the separated client specific + YANG model."; + reference "I-D: draft-ietf-dhc-dhcpv6-yang"; + } + /* + * Data Nodes + */ + + container client { + presence "Enables the client"; + description "dhcpv6 client portion"; + + container client-config { + description "configuration tree of client"; + container duid { + description "Sets the DUID"; + uses dhcpv6-types:duid; + } + list client-if { + key if-name; + description "A client may have several interfaces, it is more reasonable to + configure and manage parameters on the interface-level. The list defines + specific client interfaces and their data. Different interfaces are + distinguished by the key which is a configurable string value."; + leaf if-name { + type if:interface-ref; + mandatory true; + description "interface name"; + } + + leaf cli-id { + type uint32; + mandatory true; + description "client id"; + } + + /* + leaf description { + type string; + description "description of the client interface"; + } + */ + + leaf pd-function { + type boolean; + mandatory true; + description "Whether the client can act as a requesting router + to request prefixes using prefix delegation ([RFC3633])."; + } + leaf rapid-commit { + type boolean; + mandatory true; + description "'1' indicates a client can initiate a Solicit-Reply message + exchange by adding a Rapid Commit option in Solicit message. '0' means + the client is not allowed to add a Rapid Commit option to request + addresses in a two-message exchange pattern."; + } + + /* + container mo-tab { + description "The management tab label indicates the operation mode of the + DHCPv6 client. + 'm'=1 and 'o'=1 indicate the client will use DHCPv6 to obtain all the configuration + data. + 'm'=1 and 'o'=0 are a meaningless combination. + 'm'=0 and 'o'=1 indicate the client will use stateless DHCPv6 to obtain configuration + data apart from addresses/prefixes data. + 'm'=0 and 'o'=0 represent the client will not use DHCPv6 but use SLAAC to + achieve configuration."; + + // if - not sure about the intended use here as it seems + // to be redfining what will be received in the PIO. Is + // the intention to be whether they PIO options will be + // obeyed as received or overridden? + leaf m-tab { + type boolean; + mandatory true; + description "m tab"; + } + leaf o-tab { + type boolean; + mandatory true; + description "o tab"; + } + } + */ + + container client-configured-options { + description "client configured options"; + uses dhcpv6-options:client-option-definitions; + } + } + } + + container client-state { + config "false"; + description "state tree of client"; + container if-other-paras { + description "A client can obtain extra configuration + data other than address and prefix information through + DHCPv6. This container describes such data the client + was configured. The potential configuration data may + include DNS server addresses, SIP server domain names, etc."; + uses dhcpv6-options:server-option-definitions; + } + container packet-stats { + config "false"; + description "A container records + all the packet status information + of a specific interface."; + leaf solicit-count { + type uint32; + mandatory true; + description "solicit counter"; + } + leaf request-count { + type uint32; + mandatory true; + description "request counter"; + } + leaf renew-count { + type uint32; + mandatory true; + description "renew counter"; + } + leaf rebind-count { + type uint32; + mandatory true; + description "rebind counter"; + } + leaf decline-count { + type uint32; + mandatory true; + description "decline counter"; + } + leaf release-count { + type uint32; + mandatory true; + description "release counter"; + } + leaf info-req-count { + type uint32; + mandatory true; + description "information request counter"; + } + leaf advertise-count { + type uint32; + mandatory true; + description "advertise counter"; + } + leaf confirm-count { + type uint32; + mandatory true; + description "confirm counter"; + } + leaf reply-count { + type uint32; + mandatory true; + description "reply counter"; + } + leaf reconfigure-count { + type uint32; + mandatory true; + description "recofigure counter"; + } + } + } + + } + + /* + * Notifications + */ + + notification notifications { + description "dhcpv6 client notification module"; + container dhcpv6-client-event { + description "dhcpv6 client event"; + + container ia-lease-event { + description "raised when the client was allocated + a new IA from the server or it renew/rebind/release + its current IA"; + leaf event-type { + type enumeration { + enum "allocation" { + description "allocate"; + } + enum "rebind" { + description "rebind"; + } + enum "renew" { + description "renew"; + } + enum "release" { + description "release"; + } + } + mandatory true; + description "event type"; + } + container duid { + description "Sets the DUID"; + uses dhcpv6-types:duid; + } + leaf iaid { + type uint32; + mandatory true; + description "IAID"; + } + leaf serv-name { + type string; + description "server name"; + } + leaf description { + type string; + description "description of event"; + } + } + + container invalid-ia-detected { + description "raised when the identity association of the + client can be proved to be invalid. Possible condition + includes duplicated address, illegal address, etc."; + container duid { + description "Sets the DUID"; + uses dhcpv6-types:duid; + } + leaf cli-duid { + type uint32; + mandatory true; + description "duid of client"; + } + leaf iaid { + type uint32; + mandatory true; + description "IAID"; + } + leaf serv-name { + type string; + description "server name"; + } + leaf description { + type string; + description "description of the event"; + } + } + + container retransmission-failed { + description "raised when the retransmission mechanism defined + in [RFC3315] is failed."; + container duid { + description "Sets the DUID"; + uses dhcpv6-types:duid; + } + leaf description { + type enumeration { + enum "MRC failed" { + description "MRC failed"; + } + enum "MRD failed" { + description "MRD failed"; + } + } + mandatory true; + description "description of failure"; + } + } + + container failed-status-turn-up { + description "raised when the client receives a message includes + an unsuccessful Status Code option."; + container duid { + description "Sets the DUID"; + uses dhcpv6-types:duid; + } + leaf status-code { + type enumeration { + enum "1" { + description "UnspecFail"; + } + enum "2" { + description "NoAddrAvail"; + } + enum "3" { + description "NoBinding"; + } + enum "4" { + description "NotOnLink"; + } + enum "5" { + description "UseMulticast"; + } + } + mandatory true; + description "employed status code"; + } + } + + } + } +} diff --git a/src/share/yang/modules/ietf-dhcpv6-options@2018-09-04.yang b/src/share/yang/modules/ietf-dhcpv6-options@2018-09-04.yang new file mode 100644 index 0000000..76169f1 --- /dev/null +++ b/src/share/yang/modules/ietf-dhcpv6-options@2018-09-04.yang @@ -0,0 +1,1391 @@ +module ietf-dhcpv6-options { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-options"; + prefix "dhcpv6-options"; + + import ietf-inet-types { + prefix inet; + } + import ietf-yang-types { + prefix yang; + } + import ietf-dhcpv6-types { + prefix dhcpv6-types; + } + + organization "DHC WG"; + contact + "cuiyong@tsinghua.edu.cn + wangh13@mails.tsinghua.edu.cn + lh.sunlinh@gmail.com + ian.farrer@telekom.de + sladjana.zechlin@telekom.de + hezihao9512@gmail.com"; + + description "This model defines a YANG data model that can be + used to configure DHCPv6 options."; + + revision 2018-09-04 { + description ""; + reference "I-D: draft-ietf-dhc-dhcpv6-yang"; + } + revision 2018-03-04 { + description "Resolved most issues on the DHC official + github"; + reference "I-D: draft-ietf-dhc-dhcpv6-yang"; + } + + revision 2017-12-22 { + description "Resolve most issues on Ian's github."; + reference "I-D: draft-ietf-dhc-dhcpv6-yang"; + } + + revision 2017-11-24 { + description "First version of the separated DHCPv6 options + YANG model."; + reference "I-D:draft-ietf-dhc-dhcpv6-yang"; + } + + /* + * Features + */ + + // features for server options + feature server-unicast-op { + description "Support for Server Unicast option"; + } + feature sip-server-domain-name-list-op { + description "Support for SIP Server Domain Name List option"; + } + feature sip-server-address-list-op { + description "Support for SIP Server Address List option"; + } + feature dns-servers-op { + description "Support for DNS Servers Option"; + } + feature domain-searchlist-op { + description "Support for Domain Search List Option"; + } + feature nis-config-op { + description "Support for Network Information Service (NIS) + Servers option"; + } + feature nis-plus-config-op { + description "Support for Network Information Service V2 (NIS+) + Servers option"; + } + feature nis-domain-name-op { + description "Support for Network Information Service (NIS) + Domain Name option"; + } + feature nis-plus-domain-name-op { + description "Support for Network Information Service V2 (NIS+) + Server option"; + } + feature sntp-server-op { + description "Support for Simple Network Protocol Configuration + (SNTP) Servers option"; + } + feature info-refresh-time-op { + description "Support for Information Refresh Time option"; + } + feature client-fqdn-op { + description "Support for Client FQDN option"; + } + feature posix-timezone-op { + description "Support for New POIX Timezone option"; + } + feature tzdb-timezone-op { + description "Support for New TZDB Timezone option"; + } + feature ntp-server-op { + description "Support for Network Time Protocol (NTP) + Server option"; + } + feature boot-file-url-op { + description "Support for Boot File URL option"; + } + feature boot-file-param-op { + description "Support for Boot File Parameters option"; + } + feature aftr-name-op { + description "Support for Address Family Transition + Router (AFTR) option"; + } + feature kbr-default-name-op { + description "Support for Kerberos Default Name + Option"; + } + feature kbr-kdc-op { + description "Support for Kerberos KDC option"; + } + feature sol-max-rt-op { + description "Support for SOL_MAX_RT option"; + } + feature inf-max-rt-op { + description "Support for INF_MAX_RT option"; + } + feature addr-selection-op { + description "Support for Address Selection opiton"; + } + feature pcp-server-op { + description "Support for Port Control Protocol (PCP) + option"; + } + feature s46-rule-op { + description "Support for S46 Rule option"; + } + feature s46-br-op { + description "Support for S46 Border Relay (BR) option"; + } + feature s46-dmr-op { + description "Support for S46 Default Mapping Rule + (DMR) option"; + } + feature s46-v4-v6-binding-op { + description "Support for S46 IPv4/IPv6 Address + Bind option"; + } + + // features for relay-supplied options + feature erp-local-domain-name-op { + description "Support for ERP Local Domain Name option"; + } + + // features for client options + feature option-request-op { + description "Support for Option Request option"; + } + feature rapid-commit-op { + description "Support for Rapid Commit option"; + } + feature user-class-op { + description "Support for User Class option"; + } + feature vendor-class-op { + description "Support for Vendor Class option"; + } + feature client-arch-type-op { + description "Support for Client System Architecture + Type option"; + } + feature client-network-interface-identifier-op { + description "Support for Client Network Interface + Identifier option"; + } + feature kbr-principal-name-op { + description "Support for Kerberos Principal + Name option"; + } + feature kbr-realm-name-op { + description "Support Kerberos Realm Name option"; + } + feature client-link-layer-addr-op { + description "Support for Client Link-Layer Address + Option"; + } + + // features for custom options + feature operator-op-ipv6-address { + description "Support for Option with IPv6 Addresses"; + } + feature operator-op-single-flag { + description "Support for Option with Single Flag"; + } + feature operator-op-ipv6-prefix { + description "Support for Option with IPv6 Prefix"; + } + feature operator-op-int32 { + description "Support for Opion with 32-bit + Integer Value"; + } + feature operator-op-int16 { + description "Support for Opion with 16-bit Integer Value"; + } + feature operator-op-int8 { + description "Support for Opion with 8-bit Integer Value"; + } + feature operator-op-uri { + description "Support for Opion with URI"; + } + feature operator-op-textstring { + description "Support for Opion with Text String"; + } + feature operator-op-var-data { + description "Support for Opion with Variable-Length Data"; + } + feature operator-op-dns-wire { + description "Support for Opion with DNS Wire + Format Domain Name List"; + } + + /* + * Groupings + */ + + grouping server-option-definitions { + description "Contains definitions for options configured on the + DHCPv6 server which will be supplied to clients."; + + container server-unicast-option { + if-feature server-unicast-op; + presence "Enable this option"; + description "OPTION_UNICAST (12) Server Unicast Option"; + reference "RFC3315: Dynamic Host Configuration Protocol for + IPv6 (DHCPv6)"; + leaf server-address { + type inet:ipv6-address; + description "server ipv6 address"; + } + } + + container sip-server-domain-name-list-option { + if-feature sip-server-domain-name-list-op; + presence "Enable this option"; + description "OPTION_SIP_SERVER_D (21) SIP Servers Domain Name List"; + reference "RFC3319: Dynamic Host Configuration Protocol + (DHCPv6) Options for Session Initiation Protocol (SIP) Servers"; + leaf sip-serv-domain-name { + type string; + mandatory true; + description "sip server domain name"; + } + } + + container sip-server-address-list-option { + if-feature sip-server-address-list-op; + presence "Enable this option"; + description "OPTION_SIP_SERVER_A (22) SIP Servers IPv6 Address List"; + reference "RFC3319: Dynamic Host Configuration Protocol (DHCPv6) + Options for Session Initiation Protocol (SIP) Servers"; + list sip-server { + key sip-serv-id; + description "sip server info"; + leaf sip-serv-id { + type uint8; + mandatory true; + description "sip server id"; + } + leaf sip-serv-addr { + type inet:ipv6-address; + mandatory true; + description "sip server addr"; + } + } + } + + container dns-servers-option { + if-feature dns-servers-op; + presence "Enable this option"; + description "OPTION_DNS_SERVERS (23) DNS recursive Name Server option"; + reference "RFC3646: DNS Configuration options for Dynamic Host Configuration + Protocol for IPv6 (DHCPv6)"; + list dns-server { + key dns-serv-id; + description "dns server info"; + leaf dns-serv-id { + type uint8; + mandatory true; + description "DNS server list entry ID."; + } + leaf dns-serv-addr { + type inet:ipv6-address; + mandatory true; + description "DNS server address."; + } + } + } + + container domain-searchlist-option { + if-feature domain-searchlist-op; + presence "Enable this option"; + description "OPTION_DOMAIN_LIST (24) Domain Search List Option"; + reference "RFC3646: DNS Configuration options for Dynamic + Host Configuration Protocol for IPv6 (DHCPv6)"; + list domain-searchlist { + key domain-searchlist-id; + description "dns server info"; + leaf domain-searchlist-id { + type uint8; + mandatory true; + description "Domain seachlist entry ID."; + } + leaf domain-search-list-entry { + type string; + mandatory true; + description "Domain search list entry."; + } + } + } + container nis-config-option { + if-feature nis-config-op; + presence "Enable this option"; + description "OPTION_NIS_SERVERS (27) Network Information Service (NIS) + Servers Option."; + reference "RFC3898: Network Information Service (NIS) Configuration + Options for Dynamic Host Configuration Protocol for IPv6 (DHCPv6)"; + list nis-server { + key nis-serv-id; + description "nis server info"; + leaf nis-serv-id { + type uint8; + mandatory true; + description "nis server id"; + } + leaf nis-serv-addr { + type inet:ipv6-address; + mandatory true; + description "nis server addr"; + } + } + } + + container nis-plus-config-option { + if-feature nis-plus-config-op; + presence "Enable this option"; + description "OPTION_NISP_SERVERS (28): Network Information Service V2 + (NIS+) Servers Option."; + reference "RFC3989: Network Information Service (NIS) Configuration + Options for Dynamic Host Configuration Protocol for IPv6 (DHCPv6)"; + list nis-plus-server { + key nis-plus-serv-id; + description "NIS+ server information."; + leaf nis-plus-serv-id { + type uint8; + mandatory true; + description "nisp server id"; + } + leaf nis-plus-serv-addr { + type inet:ipv6-address; + mandatory true; + description "nisp server addr"; + } + } + } + + container nis-domain-name-option { + if-feature nis-domain-name-op; + presence "Enable this option"; + description "OPTION_NIS_DOMAIN_NAME (29) Network Information + Service (NIS) Domain Name Option"; + reference "RFC3989: Network Information Service (NIS) + Configuration Options for Dynamic Host Configuration Protocol + for IPv6 (DHCPv6)"; + leaf nis-domain-name { + type string; + description "The Network Information Service (NIS) Domain Name + option is used by the server to convey client's NIS Domain Name + info to the client."; + } + } + + container nis-plus-domain-name-option { + if-feature nis-plus-domain-name-op; + presence "Enable this option"; + description "OPTION_NISP_DOMAIN_NAME (30) Network Information + Service V2 (NIS+) Domain Name Option"; + reference "RFC3989: Network Information Service (NIS) + Configuration Options for Dynamic Host Configuration Protocol + for IPv6 (DHCPv6)"; + leaf nis-plus-domain-name { + type string; + description "The Network Information Service V2 (NIS+) Domain Name + option is used by the server to convey client's NIS+ Domain Name + info to the client."; + } + } + + + container sntp-server-option { + if-feature sntp-server-op; + presence "Enable this option"; + description "OPTION_SNTP_SERVERS (31) Simple Network Time Protocol + (SNTP) Servers Option"; + reference "RFC4075: Simple Network Time Protocol (SNTP) Configuration + Option for DHCPv6"; + list sntp-server { + key sntp-serv-id; + description "sntp server info"; + leaf sntp-serv-id { + type uint8; + mandatory true; + description "sntp server id"; + } + leaf sntp-serv-addr { + type inet:ipv6-address; + mandatory true; + description "sntp server addr"; + } + } + } + + container info-refresh-time-option { + if-feature info-refresh-time-op; + presence "Enable this option"; + description "OPTION_INFORMATION_REFRESH_TIME (32) Information Refresh + Time option."; + reference "RFC4242: Information Refresh Time Option for Dynamic Host + Configuration Protocol for IPv6 (DHCPv6"; + leaf info-refresh-time { + type yang:timeticks; + mandatory true; + description "The refresh time."; + } + } + + container client-fqdn-option { + if-feature client-fqdn-op; + presence "Enable this option"; + description "OPTION_CLIENT_FQDN (39) DHCPv6 Client FQDN Option"; + reference "RFC4704: The Dynamic Host Configuration Protocol for IPv6 + (DHCPv6) Client Fully Qualified Domain Name (FQDN) Option"; + leaf server-initiate-update { + type boolean; + mandatory true; + description "server initiate"; + } + leaf client-initiate-update { + type boolean; + mandatory true; + description "client initiate"; + } + leaf modify-name-from-cli { + type boolean; + mandatory true; + description "modify by client"; + } + } + + container posix-timezone-option { + if-feature posix-timezone-op; + presence "Enable this option"; + description "OPTION_NEW_POSIX_TIMEZONE (41) Posix Timezone option"; + reference "RFC4833: Timezone Options for DHCP"; + leaf tz-posix { + type string; + mandatory true; + description "TZ Posix IEEE 1003.1 String"; + } + } + + container tzdb-timezone-option { + if-feature tzdb-timezone-op; + presence "Enable this option"; + description "OPTION_NEW_TZDB_TIMEZONE (42) Timezone Database option"; + reference "RFC4822: Timezone Options for DHCP"; + leaf tz-database { + type string; + mandatory true; + description "Reference to the TZ Database"; + } + } + + container ntp-server-option { + //This option looks like it needs work to correctly model the + //option as defined in the RFC. + + // Zihao - Re-modelled so it only contains one time source suboption + + if-feature ntp-server-op; + presence "Enable this option"; + description "OPTION_NTP_SERVER (56) NTP Server Option for DHCPv6"; + reference "RFC5908: Network Time Protocol (NTP) Server Option for + DHCPv6"; + list ntp-server { + key ntp-serv-id; + description "ntp server info"; + leaf ntp-serv-id { + type uint8; + mandatory true; + description "NTP server id"; + } + choice ntp-time-source-suboption { + description "Select a NTP time source suboption."; + case server-address { + leaf-list ntp-serv-addr-suboption { + type inet:ipv6-address; + description "NTP server addr"; + } + } + case server-multicast-address { + leaf-list ntp-serv-mul-addr-suboption { + type inet:ipv6-address; + description "NTP server multicast addr"; + } + } + case server-fqdn { + leaf-list ntp-serv-fqdn-suboption { + type string; + description "NTP server fqdn"; + } + } + } + } + } + + container boot-file-url-option { + if-feature boot-file-url-op; + presence "Enable this option"; + description "OPT_BOOTFILE_URL (59) Boot File URL Option"; + reference "RFC5970: DHCPv6 Options for Network Boot"; + list boot-file { + key boot-file-id; + description "boot file info"; + leaf boot-file-id { + type uint8; + mandatory true; + description "boot file id"; + } + leaf-list suitable-arch-type { + type uint16; + description "architecture type"; + } + leaf-list suitable-net-if { + type uint32; + description "network interface"; + } + leaf boot-file-url { + type string; + mandatory true; + description "url for boot file"; + } + } + } + + container boot-file-param-option { + if-feature boot-file-param-op; + presence "Enable this option"; + description "OPT_BOOTFiLE_PARAM (60) Boot File Parameters Option"; + reference "RFC5970: DHCPv6 Options for Network Boot"; + list boot-file-paras { + key para-id; + description "boot file parameters"; + leaf para-id { + type uint8; + mandatory true; + description "parameter id"; + } + leaf parameter { + type string; + mandatory true; + description "parameter value"; + } + } + } + + container aftr-name-option { + if-feature aftr-name-op; + presence "Enable this option"; + description "OPTION_AFTR_NAME (64) AFTR-Name DHCPv6 Option"; + reference "RFC6334: Dynamic Host Configuration Protocol for IPv6 + (DHCPv6) Option for Dual-Stack Lite"; + leaf tunnel-endpoint-name { + type string; + mandatory true; + description "aftr name"; + } + } + + container kbr-default-name-option { + if-feature kbr-default-name-op; + presence "Enable this option"; + description "OPTION_KRB_DEFAULT_REALM_NAME (77) Kerberos Default Realm Name Option"; + reference "RFC6784: Kerberos Options for DHCPv6"; + leaf default-realm-name { + type string; + mandatory true; + description "default realm name"; + } + } + + container kbr-kdc-option { + if-feature kbr-kdc-op; + presence "Enable this option"; + description "OPTION_KRB_KDC (78) Kerberos KDB Option"; + reference "RFC6784: Kerberos Options for DHCPv6"; + list kdc-info { + key kdc-id; + description "kdc info"; + leaf kdc-id { + type uint8; + mandatory true; + description "kdc id"; + } + leaf priority { + type uint16; + mandatory true; + description "priority"; + } + leaf weight { + type uint16; + mandatory true; + description "weight"; + } + leaf transport-type { + type uint8; + mandatory true; + description "transport type"; + } + leaf port-number { + type uint16; + mandatory true; + description "port number"; + } + leaf kdc-ipv6-addr { + type inet:ipv6-address; + mandatory true; + description "kdc ipv6 addr"; + } + leaf realm-name { + type string; + mandatory true; + description "realm name"; + } + } + } + + container sol-max-rt-option { + if-feature sol-max-rt-op; + presence "Enable this option"; + description "OPTION_SOL_MAX_RT (82) sol max rt option"; + reference "RFC7083: Modification to Default Values of + SOL_MAX_RT and INF_MAX_RT"; + leaf sol-max-rt-value { + type yang:timeticks; + mandatory true; + description "sol max rt value"; + } + } + + container inf-max-rt-option { + if-feature inf-max-rt-op; + presence "Enable this option"; + description "OPTION_INF_MAX_RT (83) inf max rt option"; + reference "RFC7083: Modification to Default Values of + SOL_MAX_RT and INF_MAX_RT"; + leaf inf-max-rt-value { + type yang:timeticks; + mandatory true; + description "inf max rt value"; + } + } + + container addr-selection-option { + if-feature addr-selection-op; + presence "Enable this option"; + description "OPTION_ADDRSEL (84) and OPTION_ADDRSEL_TABLE (85)"; + reference "RFC7078: Distributing Address Selection Policy Using + DHCPv6"; + // if - Needs checking to see if this matches the RFC - there + // are two options here. + // Zihao - I think this matches RFC7078 + leaf a-bit-set { + type boolean; + mandatory true; + description "a bit"; + } + leaf p-bit-set { + type boolean; + mandatory true; + description "p bit"; + } + list policy-table { + key policy-id; + description "policy table"; + leaf policy-id { + type uint8; + mandatory true; + description "policy id"; + } + leaf label { + type uint8; + mandatory true; + description "label"; + } + leaf precedence { + type uint8; + mandatory true; + description "precedence"; + } + leaf prefix-len { + type uint8; + mandatory true; + description "prefix length"; + } + leaf prefix { + type inet:ipv6-prefix; + mandatory true; + description "prefix"; + } + } + } + + container pcp-server-option { + if-feature pcp-server-op; + presence "Enable this option"; + description "OPTION_V6_PCP_SERVER (86) pcp server option"; + reference "RFC7291: DHCP Options for the Port Control + Protocol (PCP)"; + list pcp-server { + key pcp-serv-id; + description "pcp server info"; + leaf pcp-serv-id { + type uint8; + mandatory true; + description "pcp server id"; + } + leaf pcp-serv-addr { + type inet:ipv6-address; + mandatory true; + description "pcp server addr"; + } + } + } + + container s46-rule-option { + if-feature s46-rule-op; + presence "Enable this option"; + description "OPTION_S46_RULE (89) S46 rule option"; + reference "RFC7598: DHCPv6 Options for Configuration of + Softwire Address and Port-Mapped Clients"; + list s46-rule { + key rule-id; + description "s46 rule"; + leaf rule-id { + type uint8; + mandatory true; + description "rule id"; + } + leaf rule-type { + type enumeration { + enum "BMR" { + description "BMR"; + } + enum "FMR" { + description "FMR"; + } + } + mandatory true; + description "rule type"; + } + leaf prefix4-len { + type uint8; + mandatory true; + description "ipv4 prefix length"; + } + leaf ipv4-prefix { + type inet:ipv4-prefix; + mandatory true; + description "ipv4 prefix"; + } + leaf prefix6-len { + type uint8; + mandatory true; + description "ipv6 prefix length"; + } + leaf ipv6-prefix { + type inet:ipv6-prefix; + mandatory true; + description "ipv6 prefix"; + } + uses dhcpv6-types:portset-para; + } + } + + container s46-br-option { + if-feature s46-br-op; + presence "Enable this option"; + description "OPTION_S46_BR (90) S46 BR Option"; + reference "RFC7598: DHCPv6 Options for Configuration of + Softwire Address and Port-Mapped Clients"; + list br { + key br-id; + description "br info"; + leaf br-id { + type uint8; + mandatory true; + description "br id"; + } + leaf br-ipv6-addr { + type inet:ipv6-address; + mandatory true; + description "br ipv6 addr"; + } + } + } + + container s46-dmr-option { + if-feature s46-dmr-op; + presence "Enable this option"; + description "OPTION_S46_DMR (91) S46 DMR Option"; + reference "RFC7598: DHCPv6 Options for Configuration of + Softwire Address and Port-Mapped Clients"; + list dmr { + key dmr-id; + description "dmr info"; + leaf dmr-id { + type uint8; + mandatory true; + description "dmr id"; + } + leaf dmr-prefix-len { + type uint8; + mandatory true; + description "dmr prefix length"; + } + leaf dmr-ipv6-prefix { + type inet:ipv6-prefix; + mandatory true; + description "dmr ipv6 prefix"; + } + } + } + + container s46-v4-v6-binding-option { + if-feature s46-v4-v6-binding-op; + presence "Enable this option"; + description "OPTION_S46_V4V6BIND (92) S46 IPv4/IPv6 Address + Binding option"; + reference "RFC7598: DHCPv6 Options for Configuration of + Softwire Address and Port-Mapped Clients"; + list ce { + key ce-id; + description "ce info"; + leaf ce-id { + type uint8; + mandatory true; + description "ce id"; + } + leaf ipv4-addr { + type inet:ipv4-address; + mandatory true; + description "ce ipv4 addr"; + } + leaf bind-prefix6-len { + type uint8; + mandatory true; + description "bind ipv6 prefix + length"; + } + leaf bind-ipv6-prefix { + type inet:ipv6-address; + mandatory true; + description "bind ipv6 prefix"; + } + uses dhcpv6-types:portset-para; + } + } + + } + //if - NB - The list of options needs to be updated. + + + grouping relay-supplied-option-definitions { + // if - The structure here needs to be checked and probably reworked. + description "OPTION_RSOO (66) Relay-Supplied Options option"; + reference "RFC6422: Relay-Supplied DHCP Options"; + container erp-local-domain-name-option { + if-feature erp-local-domain-name-op; + presence "Enable this option"; + description "OPTION_ERP_LOCAL_DOMAIN_NAME (65) DHCPv6 ERP Local + Domain Name Option"; + reference "RFC6440: The EAP Re-authentication Protocol (ERP) + Local Domain Name DHCPv6 Option"; + list erp-for-client { + key cli-id; + description "erp for client"; + leaf cli-id { + type uint32; + mandatory true; + description "client id"; + } + container duid { + description "Sets the DUID"; + // uses duid; + // if - Maybe DUID definition needs to be moved to this module. + uses dhcpv6-types:duid; + } + leaf erp-name { + type string; + mandatory true; + description "erp name"; + } + } + } + } + + grouping client-option-definitions { + description "Contains definitions for options configured on the + DHCPv6 client which will be sent to the server."; + + list new-or-standard-cli-option { + key option-code; + description "new or standard client option"; + leaf option-code { + type uint16; + mandatory true; + description "option code"; + } + leaf option-name { + type string; + mandatory true; + description "option name"; + } + leaf option-description { + type string; + mandatory true; + description "description of client + option"; + } + leaf option-reference { + type string; + description "the reference of option"; + } + leaf option-value { + type string; + mandatory true; + description "the option value"; + } + } + + container option-request-option { + if-feature option-request-op; + presence "Enable this option"; + description "OPTION_ORO (6) Option Request Option"; + reference "RFC3315: Dynamic Host Configuration Protocol for + IPv6 (DHCPv6)"; + list oro-option { + key option-code; + description "oro option"; + leaf option-code { + type uint16; + mandatory true; + description "option code"; + } + leaf description { + type string; + mandatory true; + description "description of oro + options"; + } + } + } + + container user-class-option { + if-feature user-class-op; + presence "Enable this option"; + description "OPTION_USER_CLASS (15) User Class Option"; + reference "RFC3315: Dynamic Host Configuration Protocol + for IPv6 (DHCPv6)"; + list user-class { + key user-class-id; + description "user class"; + leaf user-class-id { + type uint8; + mandatory true; + description "user class id"; + } + leaf user-class-data { + type string; + mandatory true; + description "The information contained in the data area + of this option is contained in one or more opaque + fields that represent the user class or classes of + which the client is a member. "; + } + } + } + + container vendor-class-option { + if-feature vendor-class-op; + presence "Enable this option"; + description "OPTION_VENDOR_CLASS (16) Vendor Class Option"; + reference "RFC3315: Dynamic Host Configuration Protocol + for IPv6 (DHCPv6)"; + leaf enterprise-number { + type uint32; + mandatory true; + description "enterprise number"; + } + list vendor-class { + key vendor-class-id; + description "vendor class"; + leaf vendor-class-id { + type uint8; + mandatory true; + description "vendor class id"; + } + leaf vendor-class-data { + type string; + mandatory true; + description "The vendor-class-data is composed of a series of + separate items, each of which describes some characteristic + of the client's hardware configuration. Examples of + vendor-class-data instances might include the version of the + operating system the client is running or the amount of memory + installed on the client."; + } + } + } + + container client-fqdn-option { + if-feature client-fqdn-op; + presence "Enable this option"; + description "OPTION_CLIENT_FQDN (39) The Dynamic Host + Configuration Protocol for IPv6 (DHCPv6) Client Fully + Qualified Domain Name (FQDN) Option"; + reference "RFC4704: The Dynamic Host Configuration Protocol + for IPv6 (DHCPv6) Client Fully Qualified Domain Name (FQDN) + Option"; + leaf fqdn { + type string; + mandatory true; + description "fqdn"; + } + leaf server-initiate-update { + type boolean; + mandatory true; + description "whether server initiate"; + } + leaf client-initiate-update { + type boolean; + mandatory true; + description "whether client initiate"; + } + } + + container client-arch-type-option { + if-feature client-arch-type-op; + presence "Enable this option"; + description "OPTION_CLIENT_ARCH_TYPE (61) Client System + Architecture Type Option"; + reference "RFC5970: DHCPv6 Options for Network Boot"; + list architecture-types { + key type-id; + description "architecture types"; + leaf type-id { + type uint16; + mandatory true; + description "type id"; + } + leaf most-preferred { + type boolean; + mandatory true; + description "most preferred flag"; + } + } + } + + container client-network-interface-identifier-option { + if-feature client-network-interface-identifier-op; + presence "Enable this option"; + description "OPTION_NII (62) Client Network Interface + Identifier Option"; + reference "RFC5970: DHCPv6 Options for Network Boot"; + leaf type { + type uint8; + mandatory true; + description "type"; + } + leaf major { + type uint8; + mandatory true; + description "major"; + } + leaf minor { + type uint8; + mandatory true; + description "minor"; + } + } + + container kbr-principal-name-option { + if-feature kbr-principal-name-op; + presence "Enable this option"; + description "OPTION_KRB_PRINCIPAL_NAME (75) Kerberos + Principal Name Option"; + reference "RFC6784: Kerberos Options for DHCPv6"; + list principle-name { + key principle-name-id; + description "principle name"; + leaf principle-name-id { + type uint8; + mandatory true; + description "principle name id"; + } + leaf name-type { + type int32; + mandatory true; + description "This field specifies the type of name that follows."; + } + leaf name-string { + type string; + mandatory true; + description "This field encodes a sequence of components that form + a name, each component encoded as a KerberoString"; + } + } + } + + container kbr-realm-name-option { + if-feature kbr-realm-name-op; + presence "Enable this option"; + description "OPTION_KRB_REALM_NAME (76) Kerberos Realm Name Option"; + reference "RFC6784: Kerberos Options for DHCPv6"; + leaf realm-name { + type string; + mandatory true; + description "realm name"; + } + } + + container client-link-layer-addr-option { + if-feature client-link-layer-addr-op; + presence "Enable this option"; + description "OPTION_CLIENT_LINKLAYER_ADDR (79) DHCPv6 Client + Link-Layer Address Option"; + reference "RFC6939: Client Link-Layer Address Option in + DHCPv6"; + leaf link-layer-type { + type uint16; + mandatory true; + description "Client link-layer address type. The link-layer + type MUST be a valid hardware type assigned by the IANA, + as described in [RFC0826]"; + } + leaf link-layer-addr { + type string; + mandatory true; + description "Client link-layer address"; + } + } + + } + + + grouping custom-option-definitions { + description "operator customized options"; + + container operator-option-ipv6-address { + if-feature operator-op-ipv6-address; + presence "Enable this option"; + description "operator ipv6 address option"; + reference "RFC7227: Guidelines for Creating New DHCPv6 Options"; + list operator-ipv6-addr { + key operator-ipv6-addr-id; + description "operator ipv6 address info"; + leaf operator-ipv6-addr-id { + type uint8; + mandatory true; + description "operator ipv6 address id"; + } + leaf operator-ipv6-addr { + type inet:ipv6-address; + mandatory true; + description "operator ipv6 address id"; + } + } + } + + container operator-option-single-flag { + if-feature operator-op-single-flag; + presence "Enable this option"; + description "operator single flag"; + reference "RFC7227: Guidelines for Creating New DHCPv6 + Options"; + list flag { + key flag-id; + description "operator single flag info"; + leaf flag-id { + type uint8; + mandatory true; + description "operator single flag id"; + } + leaf flag-value{ + type boolean; + mandatory true; + description "operator single flag value"; + } + } + } + + container operator-option-ipv6-prefix { + if-feature operator-op-ipv6-prefix; + presence "Enable this option"; + description "operator ipv6 prefix option"; + reference "RFC7227: Guidelines for Creating New DHCPv6 + Options"; + list operator-ipv6-prefix { + key operator-ipv6-prefix-id; + description "operator ipv6 prefix info"; + leaf operator-ipv6-prefix-id { + type uint8; + mandatory true; + description "operator ipv6 prefix id"; + } + leaf operator-ipv6-prefix6-len { + type uint8; + mandatory true; + description "operator ipv6 prefix length"; + } + leaf operator-ipv6-prefix { + type inet:ipv6-prefix; + mandatory true; + description "operator ipv6 prefix"; + } + } + } + + container operator-option-int32 { + if-feature operator-op-int32; + presence "Enable this option"; + description "operator integer 32 option"; + reference "RFC7227: Guidelines for Creating New DHCPv6 + Options"; + list int32val { + key int32val-id; + description "operator integer 32 info"; + leaf int32val-id { + type uint8; + mandatory true; + description "operator integer 32 id"; + } + leaf int32val { + type uint32; + mandatory true; + description "operator integer 32 value"; + } + } + } + + container operator-option-int16 { + if-feature operator-op-int16; + presence "Enable this option"; + description "operator integer 16 option"; + reference "RFC7227: Guidelines for Creating New DHCPv6 + Options"; + list int16val { + key int16val-id; + description "operator integer 16 info"; + leaf int16val-id { + type uint8; + mandatory true; + description "operator integer 16 id"; + } + leaf int16val { + type uint16; + mandatory true; + description "operator integer 16 value"; + } + } + } + + container operator-option-int8 { + if-feature operator-op-int8; + presence "Enable this option"; + description "operator integer 8 option"; + reference "RFC7227: Guidelines for Creating New DHCPv6 + Options"; + list int8val { + key int8val-id; + description "operator integer 8 info"; + leaf int8val-id { + type uint8; + mandatory true; + description "operator integer 8 id"; + } + leaf int8val { + type uint8; + mandatory true; + description "operator integer 8 value"; + } + } + } + + container operator-option-uri { + if-feature operator-op-uri; + presence "Enable this option"; + description "operator uri option"; + reference "RFC7227: Guidelines for Creating New DHCPv6 Options"; + list uri{ + key uri-id; + description "operator uri info"; + leaf uri-id { + type uint8; + mandatory true; + description "operator uri id"; + } + leaf uri { + type string; + mandatory true; + description "operator uri value"; + } + } + } + + container operator-option-textstring { + if-feature operator-op-textstring; + presence "Enable this option"; + description "operator itext string option"; + reference "RFC7227: Guidelines for Creating New DHCPv6 Options"; + list textstring{ + key textstring-id; + description "operator text string info"; + leaf textstring-id { + type uint8; + mandatory true; + description "operator text string id"; + } + leaf textstring { + type string; + mandatory true; + description "operator text string value"; + } + } + } + + container operator-option-var-data { + if-feature operator-op-var-data; + presence "Enable this option"; + description "operator variable length data option"; + reference "RFC7227: Guidelines for Creating New DHCPv6 Options"; + list int32val { + key var-data-id; + description "operator ivariable length data info"; + leaf var-data-id { + type uint8; + mandatory true; + description "operator variable length id"; + } + leaf var-data { + type binary; + mandatory true; + description "operator variable length value"; + } + } + } + + container operator-option-dns-wire { + if-feature operator-op-dns-wire; + presence "Enable this option"; + description "operator dns wire format domain name list option"; + reference "RFC7227: Guidelines for Creating New DHCPv6 + Options"; + list operator-option-dns-wire { + key operator-option-dns-wire-id; + description "operator dns wire format info"; + leaf operator-option-dns-wire-id { + type uint8; + mandatory true; + description "operator dns wire format id"; + } + leaf operator-option-dns-wire{ + type binary; + mandatory true; + description "operator dns wire format value"; + } + } + } + + } +} diff --git a/src/share/yang/modules/ietf-dhcpv6-relay@2018-09-04.yang b/src/share/yang/modules/ietf-dhcpv6-relay@2018-09-04.yang new file mode 100644 index 0000000..b480ff4 --- /dev/null +++ b/src/share/yang/modules/ietf-dhcpv6-relay@2018-09-04.yang @@ -0,0 +1,476 @@ +module ietf-dhcpv6-relay { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-relay"; + prefix "dhcpv6-relay"; + + import ietf-inet-types { + prefix inet; + } + import ietf-dhcpv6-options { + prefix dhcpv6-options; + } + import ietf-dhcpv6-types { + prefix dhcpv6-types; + } + import ietf-interfaces { + prefix if; + } + + organization + "IETF DHC (Dynamic Host Configuration) Working group"; + + contact + "cuiyong@tsinghua.edu.cn + lh.sunlinh@gmail.com + ian.farrer@telekom.de + sladjana.zechlin@telekom.de + hezihao9512@gmail.com"; + + description + "This model defines a YANG data model that can be + used to configure and manage a DHCPv6 relay."; + + revision 2018-09-04 { + description ""; + reference "I-D: draft-ietf-dhc-dhcpv6-yang"; + } + + revision 2018-03-04 { + description "Resolved most issues on the DHC official + github"; + reference "I-D: draft-ietf-dhc-dhcpv6-yang"; + } + + revision 2017-12-22 { + description + "Resolve most issues on Ian's github."; + reference + "I-D: draft-ietf-dhc-dhcpv6-yang"; + } + + revision 2017-11-24 { + description + "First version of the separated relay specific + YANG model."; + reference + "I-D: draft-ietf-dhc-dhcpv6-yang"; + } + + /* + * Data Nodes + */ + + container relay { + presence + "Enables the relay"; + description + "DHCPv6 relay portion"; + + container relay-config { + description + "This container contains the configuration data + of the relay."; + container relay-attributes { + description + "A container describes some basic attributes of the relay + agent including some relay agent specific options data that + need to be configured previously. + Such options include Remote-Id option and Subscriber-Id + option."; + leaf name { + type string; + description + "Relay agent name"; + } + leaf description { + type string; + description + "Textual description of the relay agent"; + } + leaf-list dest-addrs { + type inet:ipv6-address; + description + "Each DHCPv6 relay agent may be configured with a list + of destination addresses. + This node defines such a list of IPv6 addresses that + may include unicast addresses, multicast addresses or + other addresses."; + } + list subscribers { + key subscriber; + description + "Subscribers"; + leaf subscriber { + type uint8; + mandatory true; + description + "Subscriber"; + } + leaf subscriber-id { + type string; + mandatory true; + description + "Subscriber id"; + } + } + list remote-host { + key ent-num; + description + "Remote host"; + leaf ent-num { + type uint32; + mandatory true; + description + "Enterprise number"; + } + leaf remote-id { + type string; + mandatory true; + description + "Remote id"; + } + } + uses dhcpv6-types:vendor-infor; + } + + container rsoo-option-sets { + description + "DHCPv6 relay agent could provide some information that would + be useful to DHCPv6 client. + Since relay agent cannot provide options directly to the + client, RSOO-enabled options are defined to propose options + for the server to send to the client. + This container models such RSOO-enabled options."; + reference + "RFC6422"; + list option-set { + key option-set-id; + description + "This list under the 'rsoo-option-sets' container is similar + to the that defined in server module. + It allows the relay to implement several sets of RSOO-enabled + options for different interfaces. + The list only includes the EAP Re-authentication Protocol + (ERP) Local Domain Name DHCPv6 Option defined in RFC6440, + since it is the only one RSOO-enabled options accepted by + IANA so far."; + leaf option-set-id { + type uint32; + description "Option sed id"; + } + uses dhcpv6-options:relay-supplied-option-definitions; + } + } + + list relay-if { + // if - This should reference an entry in ietf-interfaces + key if-name; + description + "A relay agent may have several interfaces, we should provide + a way to configure and manage parameters on the interface-level. + A list that describes specific interfaces and their corresponding + parameters is employed to fulfil the configfuration. Here we use + a string called 'if-name' as the key of list."; + leaf if-name { + type if:interface-ref; + mandatory true; + description + "Interface name"; + } + leaf interface-id { + type string; + description + "Interface id"; + } + + /* + leaf enable { + type boolean; + mandatory true; + description "whether this interface is enabled"; + } + */ + + leaf ipv6-address { + type inet:ipv6-address; + description + "IPv6 address for this interface"; + } + + leaf rsoo-option-set-id { + type leafref { + path "/relay/relay-config/rsoo-option-sets/option-set/option-set-id"; + } + description "Configured Relay Supplied Option set"; + } + + list next-entity { + key dest-addr; + description + "This node defines a list that is used to describe the + next hop entity of this relay distinguished by their + addresses."; + leaf dest-addr { + type inet:ipv6-address; + mandatory true; + description + "Destination addr"; + } + leaf available { + type boolean; + mandatory true; + description + "Whether the next entity is available or not"; + } + leaf multicast { + type boolean; + mandatory true; + description + "Whether the address is multicast or not"; + } + leaf server { + type boolean; + mandatory true; + description + "Whether the next entity is a server"; + } + } + } + } + + + container relay-state { + config "false"; + description + "State data of relay"; + list relay-if { + key if-name; + description + "A relay agent may have several interfaces, we should provide + a way to configure and manage parameters on the interface-level. + A list that describes specific interfaces and their corresponding + parameters is employed to fulfil the configfuration. Here we use + a string called 'if-name' as the key of list."; + leaf if-name{ + type string; + mandatory true; + description + "Interface name"; + } + list pd-route { + // if - need to look at if/how we model these. If they are + // going to be modelled, then they should be ro state + // entries (we're not trying to configure routes here) + key pd-route-id; + description "pd route"; + leaf pd-route-id { + type uint8; + mandatory true; + description + "PD route id"; + } + leaf requesting-router-id { + type uint32; + mandatory true; + description + "Requesting router id"; + } + leaf delegating-router-id { + type uint32; + mandatory true; + description + "Delegating router id"; + } + leaf next-router { + type inet:ipv6-address; + mandatory true; + description + "Next router"; + } + leaf last-router { + type inet:ipv6-address; + mandatory true; + description + "Previous router"; + } + } + list next-entity { + key dest-addr; + description "This node defines a list that is used to + describe the next hop entity of this relay agent. + Different entities are distinguished by their + addresses."; + leaf dest-addr { + type inet:ipv6-address; + mandatory true; + description "destination addr"; + } + container packet-stats { + description "packet statistics"; + leaf solicit-rvd-count { + type uint32; + mandatory true; + description "solicit received counter"; + } + leaf request-rvd-count { + type uint32; + mandatory true; + description "request received counter"; + } + leaf renew-rvd-count { + type uint32; + mandatory true; + description "renew received counter"; + } + leaf rebind-rvd-count { + type uint32; + mandatory true; + description "rebind recevied counter"; + } + leaf decline-rvd-count { + type uint32; + mandatory true; + description "decline received counter"; + } + leaf release-rvd-count { + type uint32; + mandatory true; + description "release received counter"; + } + leaf info-req-rvd-count { + type uint32; + mandatory true; + description "information request counter"; + } + leaf relay-for-rvd-count { + type uint32; + mandatory true; + description "relay forward received counter"; + } + leaf relay-rep-rvd-count { + type uint32; + mandatory true; + description "relay reply received counter"; + } + leaf packet-to-cli-count { + type uint32; + mandatory true; + description "packet to client counter"; + } + leaf adver-sent-count { + type uint32; + mandatory true; + description "advertisement sent counter"; + } + leaf confirm-sent-count { + type uint32; + mandatory true; + description "confirm sent counter"; + } + leaf reply-sent-count { + type uint32; + mandatory true; + description "reply sent counter"; + } + leaf reconfig-sent-count { + type uint32; + mandatory true; + description "reconfigure sent counter"; + } + leaf relay-for-sent-count { + type uint32; + mandatory true; + description "relay forward sent counter"; + } + leaf relay-rep-sent-count { + type uint32; + mandatory true; + description "relay reply sent counter"; + } + } + } + } + container relay-stats { + config "false"; + description + "Relay statistics"; + leaf cli-packet-rvd-count { + type uint32; + mandatory true; + description + "Client packet received counter"; + } + leaf relay-for-rvd-count { + type uint32; + mandatory true; + description + "Relay forward received counter"; + } + leaf relay-rep-rvd-count { + type uint32; + mandatory true; + description + "Relay reply recevied counter"; + } + leaf packet-to-cli-count { + type uint32; + mandatory true; + description + "Packet to client counter"; + } + leaf relay-for-sent-count { + type uint32; + mandatory true; + description + "Relay forward sent counter"; + } + leaf relay-rep-sent-count { + type uint32; + mandatory true; + description + "Relay reply sent counter"; + } + leaf discarded-packet-count { + type uint32; + mandatory true; + description + "Discarded packet counter"; + } + } + } + } + + /* + * Notifications + */ + + notification notifications { + description "DHCPv6 relay notification module"; + container dhcpv6-relay-event { + description + "DHCPv6 relay event"; + container topo-changed { + description + "Raised when the topology of the relay agent is changed."; + leaf relay-if-name { + type string; + mandatory true; + description + "Relay interface name"; + } + leaf first-hop { + type boolean; + mandatory true; + description + "First hop"; + } + leaf last-entity-addr { + type inet:ipv6-address; + mandatory true; + description + "Last entity address"; + } + } + } + } +} diff --git a/src/share/yang/modules/ietf-dhcpv6-server@2018-09-04.yang b/src/share/yang/modules/ietf-dhcpv6-server@2018-09-04.yang new file mode 100644 index 0000000..0e13df4 --- /dev/null +++ b/src/share/yang/modules/ietf-dhcpv6-server@2018-09-04.yang @@ -0,0 +1,967 @@ +module ietf-dhcpv6-server { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-server"; + prefix "dhcpv6-server"; + + import ietf-inet-types { + prefix inet; + } + import ietf-yang-types { + prefix yang; + } + import ietf-dhcpv6-options { + prefix dhcpv6-options; + } + import ietf-dhcpv6-types { + prefix dhcpv6-types; + } + import ietf-interfaces { + prefix if; + } + + organization "DHC WG"; + contact + "cuiyong@tsinghua.edu.cn + lh.sunlinh@gmail.com + ian.farrer@telekom.de + sladjana.zechlin@telekom.de + hezihao9512@gmail.com"; + + description "This model defines a YANG data model that can be + used to configure and manage a DHCPv6 server."; + + revision 2018-09-04 { + description ""; + reference "I-D: draft-ietf-dhc-dhcpv6-yang"; + } + + revision 2018-03-04 { + description "Resolved most issues on the DHC official + github"; + reference "I-D: draft-ietf-dhc-dhcpv6-yang"; + } + + revision 2017-12-22 { + description "Resolve most issues on Ian's github."; + reference "I-D: draft-ietf-dhc-dhcpv6-yang"; + } + + revision 2017-11-24 { + description "First version of the separated server specific + YANG model."; + reference "I-D: draft-ietf-dhc-dhcpv6-yang"; + } + + /* + * Typedef + */ + typedef threshold { + type union { + type uint16 { + range 0..100; + } + type enumeration { + enum "disabled" { + description "No threshold"; + } + } + } + description "Threshold value in percent"; + } + + /* + * Data Nodes + */ + container server { + presence "Enables the server"; + description "DHCPv6 server portion"; + + /* + * Configuration data + */ + container server-config { + description "This container contains the configuration data + of a server."; + container serv-attributes { + description + "This container contains basic attributes of a DHCPv6 server + such as IPv6 address, server name and so on. Some optional + functions that can be provided by the server is also included."; + container duid { + description "Sets the DUID of server"; + uses dhcpv6-types:duid; + } + leaf name { + type string; + description "server's name"; + } + leaf description { + type string; + description "description of the server."; + } + leaf-list ipv6-address { + type inet:ipv6-address; + description "server's IPv6 address."; + } + leaf-list interfaces-config { + // Note - this should probably be references to + // entries in the ietf-interfaces model + type if:interface-ref; + description "A leaf list to denote which one or more interfaces + the server should listen on. The default value is to listen + on all the interfaces. This node is also used to set a unicast + address for the server to listen with a specific interface. + For example, if people want the server to listen on a unicast + address with a specific interface, he can use the format like + 'eth1/2001:db8::1'."; + } + container lease-storage { + description "Indicates how the server stores the lease"; + choice storage-type { + description "the type of lease storage"; + // leaf persist { + // type boolean; + // mandatory true; + // description "controls whether the new leases and updates to existing leases are + // written to the file"; + // } + case memfile { + description "the server stores lease information in a CSV file"; + + leaf memfile-name { + type string; + description "specifies an absolute location of the lease file in which new leases + and lease updates will be recorded"; + } + + leaf memfile-lfc-interval { + type uint64; + description "specifies the interval in seconds, at which the server will perform a + lease file cleanup (LFC)"; + } + + } + case mysql { + leaf mysql-name { + type string; + description "type of the database"; + } + leaf mysql-host { + type string; + description "If the database is located + on a different system to the DHCPv6 server, the database host name must also be specified."; + } + leaf mysql-password { + type string; + description "the credentials of the account under which the server will access the database"; + } + leaf mysql-port { + type uint8; + description "If the database is located on a different system, the port number may be specified"; + } + leaf mysql-lfc-interval { + type uint64; + description "specifies the interval in seconds, at which the server will perform a + lease file cleanup (LFC)"; + } + leaf mysql-connect-timeout { + type uint64; + description "If the database is located on a different system, a longer interval needs to be specified"; + } + + } + case postgresql { + leaf postgresql-name { + type string; + description "type of the database"; + } + leaf postgresql-host { + type string; + description "If the database is located + on a different system to the DHCPv6 server, the database host name must also be specified."; + } + leaf postgresql-password { + type string; + description "the credentials of the account under which the server will access the database"; + } + leaf postgresql-port { + type uint8; + description "If the database is located on a different system, the port number may be specified"; + } + leaf postgresql-lfc-interval { + type uint64; + description "specifies the interval in seconds, at which the server will perform a + lease file cleanup (LFC)"; + } + leaf postgresql-connect-timeout { + type uint64; + description "If the database is located on a different system, a longer interval needs to be specified"; + } + } + case cassandra { + leaf cassandra-name { + type string; + description "type of the database"; + } + leaf cassandra-contact-points { + type string; + description "Cassandra takes a list of comma separated IP addresses to contact the cluster"; + } + leaf cassandra-password { + type string; + description "the credentials of the account under which the server will access the database"; + } + leaf cassandra-lfc-interval { + type uint64; + description "specifies the interval in seconds, at which the server will perform a + lease file cleanup (LFC)"; + } + leaf cassandra-connect-timeout { + type uint64; + description "If the database is located on a different system, a longer interval needs to be specified"; + } + } + } + } + uses dhcpv6-types:vendor-infor; + } + + container option-sets { + description "DHCPv6 employs various options to carry additional + information and parameters in DHCP messages. This container defines + all the possible options that need to be configured at the server + side. "; + list option-set { + key option-set-id; + description "A server may allow different option sets to be + configured for different conditions (i.e. different networks, + clients and etc). This 'option-set' list enables various sets of + options being defined and configured in a single server. Different + sets are distinguished by the key called 'option-set-id'. All the + possible options discussed above are defined in the list and each + option is corresponding to a container. Since all the options in + the list are optional, each container in this list has a 'presence' + statement to indicate whether this option (container) will be + included in the current option set or not. In addition, each container + also has a 'if-feature' statement to indicate whether the server + supports this option (container)."; + leaf option-set-id { + type uint32; + description "option set id"; + } + uses dhcpv6-options:server-option-definitions; + uses dhcpv6-options:custom-option-definitions; + } + } + + container network-ranges { + description "This model supports a hierarchy + to achieve dynamic configuration. That is to say we could configure the + server at different levels through this model. The top level is a global + level which is defined as the container 'network-ranges'. The following + levels are defined as sub-containers under it. The 'network-ranges' + contains the parameters (e.g. option-sets) that would be allocated to + all the clients served by this server."; + + leaf option-set-id { + type leafref { + path "/server/server-config/option-sets/option-set/option-set-id"; + } + description + "The ID field of relevant global option-set to be provisioned to + clients."; + } + list network-range { + key network-range-id; + description + "Under the 'network-ranges' container, a 'network-range' list + is defined to configure the server at a network level which is also + considered as the second level. Different network are identified by the + key 'network-range-id'. This is because a server may have different + configuration parameters (e.g. option sets) for different networks."; + leaf network-range-id { + type uint32; + mandatory true; + description "equivalent to subnet id"; + } + leaf network-description { + type string; + mandatory true; + description "description of the subnet"; + } + leaf network-prefix { + type inet:ipv6-prefix; + mandatory true; + description "subnet prefix"; + } + leaf option-set-id { + type leafref { + path "/server/server-config/option-sets/option-set/option-set-id"; + } + description "The ID field of relevant option-set to be provisioned to + clients of this network-range."; + } + + container address-pools { + description + "A container that describes the DHCPv6 server's + address pools."; + list address-pool { + key pool-id; + description "A DHCPv6 server can be configured with + several address pools. This list defines such address pools + which are distinguished by the key called 'pool-id'."; + leaf pool-id { + type uint32; + mandatory true; + description "pool id"; + } + leaf pool-prefix { + type inet:ipv6-prefix; + mandatory true; + description "pool prefix"; + } + leaf start-address { + type inet:ipv6-address-no-zone; + mandatory true; + description "start address"; + } + leaf end-address { + type inet:ipv6-address-no-zone; + mandatory true; + description "end address"; + } + leaf valid-lifetime { + type yang:timeticks; + mandatory true; + description "valid liftime for IA"; + } + leaf renew-time { + type yang:timeticks; + mandatory true; + description "renew time"; + } + leaf rebind-time { + type yang:timeticks; + mandatory true; + description "rebind time"; + } + leaf preferred-lifetime { + type yang:timeticks; + mandatory true; + description "preferred lifetime for IA"; + } + leaf rapid-commit { + type boolean; + mandatory true; + description "A boolean value specifies whether the pool + supports client-server exchanges involving two messages."; + } + leaf client-class { + type string; + description + "If this leaf is specified, this pool will only serve + the clients belonging to this class."; + } + leaf max-address-count { + type threshold; + mandatory true; + description "maximum count of addresses that can + be allocated in this pool. This value may be + less than count of total addresses."; + } + leaf option-set-id { + type leafref { + path "/server/server-config/option-sets/option-set/option-set-id"; + } + mandatory true; + description "The ID field of relevant option-set to be + provisioned to clients of this address-pool."; + } + } + } + + container pd-pools { + description "If a server supports prefix delegation function, this + container will be used to define the delegating router's prefix + pools."; + list pd-pool { + key pool-id; + description "Similar to server's address pools, a delegating + router can also be configured with multiple prefix pools + specified by a list called 'prefix-pool'."; + leaf pool-id { + type uint32; + mandatory true; + description "pool id"; + } + leaf prefix { + type inet:ipv6-prefix; + mandatory true; + description "ipv6 prefix"; + } + leaf prefix-length { + type uint8; + mandatory true; + description "prefix length"; + } + leaf valid-lifetime { + type yang:timeticks; + mandatory true; + description "valid lifetime for IA"; + } + leaf renew-time { + type yang:timeticks; + mandatory true; + description "renew time"; + } + leaf rebind-time { + type yang:timeticks; + mandatory true; + description "rebind time"; + } + leaf preferred-lifetime { + type yang:timeticks; + mandatory true; + description "preferred lifetime for IA"; + } + leaf rapid-commit { + type boolean; + mandatory true; + description "A boolean value specifies whether the server + support client-server exchanges involving two messages defined."; + } + leaf client-class { + type string; + description "client class"; + } + leaf max-pd-space-utilization { + type threshold; + mandatory true; + description "Maximum utilization of pd space in this pool"; + } + leaf option-set-id { + type leafref { + path "/server/server-config/option-sets/option-set/option-set-id"; + } + mandatory true; + description "The ID field of relevant option-set to be + provisioned to clients of this prefix-pool."; + } + } + } + + container host-reservations { + description + "This container allows the server to make reservations at host level."; + list host-reservation { + key cli-id; + description "This list allows the server to reserve addresses, + prefixes, hostname and options for different clients."; + leaf cli-id { + type uint32; + mandatory true; + description "client id"; + } + + choice client-identifier { + description "When making reservations, the server needs to choose a + identifier to identify the client. Currently 'DUID' and 'hardware + address' are supported."; + case duid { + description "DUID"; + uses dhcpv6-types:duid; + } + case hw-address { + description "hardware address"; + leaf hardware-address { + type yang:mac-address; + description "MAC address of client"; + } + } + } + + leaf-list reserv-addr { + type inet:ipv6-address; + description "reserved addr"; + } + + list prefix-reservation { + key reserv-prefix-id; + description "reserved prefix reservation"; + leaf reserv-prefix-id { + type uint32; + mandatory true; + description "reserved prefix id"; + } + leaf reserv-prefix { + type inet:ipv6-prefix; + mandatory true; + description "reserved prefix"; + } + leaf reserv-prefix-len { + type uint8; + mandatory true; + description "reserved prefix length"; + } + } + + leaf hostname { + type string; + description "reserved hostname"; + } + + leaf option-set-id { + type leafref { + path "/server/server-config/option-sets/option-set/option-set-id"; + } + description "The ID field of relevant option-set to be provisioned + in the host reservation."; + } + } + } + + } + } + + container relay-opaque-paras { + description "This container contains some opaque values in Relay Agent + options that need to be configured on the server side only for value + match. Such Relay Agent options include Interface-Id option, + Remote-Id option and Subscriber-Id option."; + list relays { + key relay-name; + description "relay agents"; + leaf relay-name { + type string; + mandatory true; + description "relay agent name"; + } + list interface-info { + key if-name; + description "interface info"; + leaf if-name { + type string; + mandatory true; + description "interface name"; + } + leaf interface-id { + type string; + mandatory true; + description "interface id"; + } + } + list subscribers { + key subscriber; + description "subscribers"; + leaf subscriber { + type uint32; + mandatory true; + description "subscriber"; + } + leaf subscriber-id { + type string; + mandatory true; + description "subscriber id"; + } + } + list remote-host { + key ent-num; + description "remote host"; + leaf ent-num { + type uint32; + mandatory true; + description "enterprise number"; + } + leaf remote-id { + type string; + mandatory true; + description "remote id"; + } + } + } + } + + container rsoo-enabled-options { + description "rsoo enabled options"; + list rsoo-enabled-option { + key option-code; + description "rsoo enabled option"; + leaf option-code { + type uint16; + mandatory true; + description "option code"; + } + leaf description { + type string; + mandatory true; + description "description of the option"; + } + } + } + + } + + /* + * State data + */ + container server-state { + config "false"; + description "states of server"; + container network-ranges { + description "This model supports a hierarchy to achieve dynamic configuration. + That is to say we could configure the server at different levels through + this model. The top level is a global level which is defined as the container + 'network-ranges'. The following levels are defined as sub-containers under it. + The 'network-ranges' contains the parameters (e.g. option-sets) that would be + allocated to all the clients served by this server."; + list network-range { + key network-range-id; + description "The ID field of relevant option-set to be provisioned + to clients of this network-range."; + leaf network-range-id { + type uint32; + mandatory true; + description "equivalent to subnet id"; + } + container address-pools { + description "A container that describes the DHCPv6 server's address pools"; + list address-pool { + key pool-id; + description "A DHCPv6 server can be configured with + several address pools. This list defines such address pools + which are distinguished by the key called 'pool-id'."; + leaf pool-id { + type uint32; + mandatory true; + description "pool id"; + } + leaf total-address-count { + type uint64; + mandatory true; + description "count of total addresses in the pool"; + } + leaf allocated-address-conut { + type uint64; + mandatory true; + description "count of allocated addresses in the pool"; + } + } + list binding-info { + key cli-id; + description "A list that records a binding information for each DHCPv6 + client that has already been allocated IPv6 addresses."; + leaf cli-id { + type uint32; + mandatory true; + description "client id"; + } + container duid { + description "Read the DUID"; + uses dhcpv6-types:duid; + } + list cli-ia { + key iaid; + description "client IA"; + leaf ia-type { + type string; + mandatory true; + description "IA type"; + } + leaf iaid { + type uint32; + mandatory true; + description "IAID"; + } + leaf-list cli-addr { + type inet:ipv6-address; + description "client addr"; + } + leaf pool-id { + type uint32; + mandatory true; + description "pool id"; + } + } + } + } + container pd-pools { + description "If a server supports prefix delegation function, + this container will be used to define the delegating + router's prefix pools."; + list prefix-pool { + key pool-id; + description "Similar to server's address pools, a delegating + router can also be configured with multiple prefix pools + specified by a list called 'prefix-pool'."; + leaf pool-id { + type uint32; + mandatory true; + description "pool id"; + } + leaf pd-space-utilization { + type threshold; + mandatory true; + description "current PD space utilization"; + } + } + list binding-info { + key cli-id; + description "A list records a binding information for each DHCPv6 + client that has already been alloated IPv6 prefixes."; + leaf cli-id { + type uint32; + mandatory true; + description "client id"; + } + container duid { + description "Reads the DUID"; + uses dhcpv6-types:duid; + } + list cli-iapd { + key iaid; + description "client IAPD"; + leaf iaid { + type uint32; + mandatory true; + description "IAID"; + } + leaf-list cli-prefix { + type inet:ipv6-prefix; + description "client ipv6 prefix"; + } + leaf-list cli-prefix-len { + type uint8; + description "client prefix length"; + } + leaf pool-id { + type uint32; + mandatory true; + description "pool id"; + } + } + } + } + + container host-reservations { + description "This container provides host reservations in the host level."; + list binding-info { + key cli-id; + description + "A list records a binding information for each DHCPv6 + client that has already been alloated IPv6 addresses or prefixes + by host reservations."; + leaf cli-id { + type uint32; + mandatory true; + description "client id"; + } + container duid { + description "Reads the DUID"; + uses dhcpv6-types:duid; + } + list cli-ia { + key iaid; + description "client IA"; + leaf ia-type { + type string; + mandatory true; + description "IA type, IA_NA or IA_TA"; + } + leaf iaid { + type uint32; + mandatory true; + description "IAID"; + } + leaf-list cli-addr { + type inet:ipv6-address; + description "client addr"; + } + } + + list cli-iapd { + key iaid; + description "client IAPD"; + leaf iaid { + type uint32; + mandatory true; + description "IAID"; + } + leaf-list cli-prefix { + type inet:ipv6-prefix; + description "client ipv6 prefix"; + } + leaf-list cli-prefix-len { + type uint8; + description "client prefix length"; + } + } + } + } + + } + } + + container packet-stats { + description "A container presents the packet statistics related to + the DHCPv6 server."; + leaf solicit-count { + type uint32; + mandatory true; + description "solicit counter"; + } + leaf request-count { + type uint32; + mandatory true; + description "request counter"; + } + leaf renew-count { + type uint32; + mandatory true; + description "renew counter"; + } + leaf rebind-count { + type uint32; + mandatory true; + description "rebind counter"; + } + leaf decline-count { + type uint32; + mandatory true; + description "decline count"; + } + leaf release-count { + type uint32; + mandatory true; + description "release counter"; + } + leaf info-req-count { + type uint32; + mandatory true; + description "information request counter"; + } + leaf advertise-count { + type uint32; + mandatory true; + description "advertise counter"; + } + leaf confirm-count { + type uint32; + mandatory true; + description "confirm counter"; + } + leaf reply-count { + type uint32; + mandatory true; + description "reply counter"; + } + leaf reconfigure-count { + type uint32; + mandatory true; + description "reconfigure counter"; + } + leaf relay-forward-count { + type uint32; + mandatory true; + description "relay forward counter"; + } + leaf relay-reply-count { + type uint32; + mandatory true; + description "relay reply counter"; + } + } + } + } + + /* + * Notifications + */ + + notification notifications { + description "dhcpv6 server notification module"; + container dhcpv6-server-event { + description "dhcpv6 server event"; + container address-pool-running-out { + description "raised when the address pool is going to + run out. A threshold for utilization ratio of the pool has + been defined in the server feature so that it will notify the + administrator when the utilization ratio reaches the + threshold, and such threshold is a settable parameter"; + leaf total-address-count { + type uint64; + mandatory true; + description "count of total addresses in the pool"; + } + leaf max-address-count { + type uint64; + mandatory true; + description "maximum count of addresses that can be allocated + in the pool. This value may be less than count of total + addresses"; + } + leaf allocated-address-conut { + type uint64; + mandatory true; + description "count of allocated addresses in the pool"; + } + container duid { + description "server duid"; + uses dhcpv6-types:duid; + } + leaf serv-name { + type string; + description "server name"; + } + leaf pool-name { + type string; + mandatory true; + description "pool name"; + } + } + container pd-pool-running-out { + description "raised when the address/prefix pool is going to + run out. A threshold for utilization ratio of the pool has + been defined in the server feature so that it will notify the + administrator when the utilization ratio reaches the + threshold, and such threshold is a settable parameter"; + leaf max-pd-space-utilization { + type threshold; + mandatory true; + description "maximum pd space utilization"; + } + leaf pd-space-utilization { + type threshold; + mandatory true; + description "current pd space utilization"; + } + container duid { + description "Sets the DUID"; + uses dhcpv6-types:duid; + } + leaf serv-name { + type string; + description "server name"; + } + leaf pool-name { + type string; + mandatory true; + description "pool name"; + } + } + container invalid-client-detected { + description "raised when the server has found a client which + can be regarded as a potential attacker. Some description + could also be included."; + container duid { + description "Sets the DUID"; + uses dhcpv6-types:duid; + } + leaf description { + type string; + description "description of the event"; + } + } + } + } +} diff --git a/src/share/yang/modules/ietf-dhcpv6-types@2018-09-04.yang b/src/share/yang/modules/ietf-dhcpv6-types@2018-09-04.yang new file mode 100644 index 0000000..52feb28 --- /dev/null +++ b/src/share/yang/modules/ietf-dhcpv6-types@2018-09-04.yang @@ -0,0 +1,211 @@ +module ietf-dhcpv6-types { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-types"; + prefix "dhcpv6-types"; + + import ietf-inet-types { + prefix inet; + } + import ietf-yang-types { + prefix yang; + } + + organization "DHC WG"; + contact + "cuiyong@tsinghua.edu.cn + lh.sunlinh@gmail.com + ian.farrer@telekom.de + sladjana.zechlin@telekom.de + hezihao9512@gmail.com"; + + description "This model defines a YANG data model that can be + used to define some commonly used DHCPv6 types"; + + revision 2018-09-04 { + description ""; + reference "I-D: draft-ietf-dhc-dhcpv6-yang"; + } + + revision 2018-01-30 { + description "Initial revision"; + reference "I-D: draft-ietf-dhc-dhcpv6-yang"; + } + + /* + * Grouping + */ + grouping vendor-infor { + description "Vendor information."; + container vendor-info { + description ""; + leaf ent-num { + type uint32; + mandatory true; + description "enterprise number"; + } + leaf-list data { + type string; + description "specific vendor info"; + } + } + } + + grouping duid { + description + "Each server and client has only one DUID (DHCP Unique Identifier). + The DUID here identifies a unique DHCPv6 server for clients. DUID + consists of a two-octet type field and an arbitrary length (no more + than 128 bytes) content field. Currently there are four defined types + of DUIDs in RFC3315 and RFC6355 - DUID-LLT, DUID-EN, DUID-LL and + DUID-UUID. DUID-Unknown represents those unconventional DUIDs."; + reference "RFC3315: Section 9 and RFC6355: Section 4"; + leaf type-code { + type uint16; + default 65535; + description "Type code of this DUID"; + } + choice duid-type { + default duid-unknown; + description "Selects the format for the DUID."; + case duid-llt { + description "DUID Based on Link-layer Address Plus Time + (Type 1 - DUID-LLT)"; + reference "RFC3315 Section 9.2"; + leaf duid-llt-hardware-type { + type uint16; + description "Hardware type as assigned by IANA (RFC826)."; + } + leaf duid-llt-time { + type yang:timeticks; + description "The time value is the time that the DUID is + generated represented in seconds since midnight (UTC), + January 1, 2000, modulo 2^32."; + } + leaf duid-llt-link-layer-addr { + type yang:mac-address; + description "Link-layer address as described in RFC2464"; + } + } + case duid-en { + description "DUID Assigned by Vendor Based on Enterprise Number + (Type 2 - DUID-EN)"; + reference "RFC3315 Section 9.3"; + leaf duid-en-enterprise-number { + type uint32; + description "Vendor's registered Private Enterprise Number as + maintained by IANA"; + } + leaf duid-en-identifier { + type string; + description "Indentifier, unique to the device that is + using it"; + } + } + case duid-ll { + description "DUID Based on Link-layer Address (Type 3 - DUID-LL)"; + reference "RFC3315 Section 9.4"; + leaf duid-ll-hardware-type { + type uint16; + description "Hardware type as assigned by IANA (RFC826)."; + } + leaf duid-ll-link-layer-addr { + type yang:mac-address; + description "Link-layer address as described in RFC2464"; + } + } + case duid-uuid { + description "DUID Based on Universally Unique Identifier + (Type 4 - DUID-UUID)"; + reference "RFC6335 Defination of the UUID-Based Unique Identifier"; + leaf uuid { + type yang:uuid; + description "A Universally Unique IDentifier in the string + representation defined in RFC 4122. The canonical + representation uses lowercase characters"; + } + } + case duid-unknown { + description "DUID based on free raw bytes"; + leaf data { + type binary; + description "The bits to be used as the identifier"; + } + } + } + } + + grouping portset-para { + description "portset parameters"; + container port-parameter { + description "port parameter"; + leaf offset { + type uint8; + mandatory true; + description "offset in a port set"; + } + leaf psid-len { + type uint8; + mandatory true; + description "length of a psid"; + } + leaf psid { + type uint16; + mandatory true; + description "psid value"; + } + } + } + + grouping iaid { + description "IA is a construct through which a server and a + client can identify, group, and manage a set of related IPv6 + addresses. The key of the list is a 4-byte number IAID defined + in [RFC3315]."; + list identity-association { + config "false"; + description "IA"; + leaf iaid { + type uint32; + mandatory true; + description "IAID"; + } + leaf ia-type { + type string; + mandatory true; + description "IA type"; + } + leaf-list ipv6-addr { + type inet:ipv6-address; + description "ipv6 address"; + } + leaf-list ipv6-prefix { + type inet:ipv6-prefix; + description "ipv6 prefix"; + } + leaf-list prefix-length { + type uint8; + description "ipv6 prefix length"; + } + leaf t1-time { + type yang:timeticks; + mandatory true; + description "t1 time"; + } + leaf t2-time { + type yang:timeticks; + mandatory true; + description "t2 time"; + } + leaf preferred-lifetime { + type yang:timeticks; + mandatory true; + description "preferred lifetime"; + } + leaf valid-lifetime { + type yang:timeticks; + mandatory true; + description "valid lifetime"; + } + } + } +} diff --git a/src/share/yang/modules/ietf-inet-types@2013-07-15.yang b/src/share/yang/modules/ietf-inet-types@2013-07-15.yang new file mode 100644 index 0000000..2f14270 --- /dev/null +++ b/src/share/yang/modules/ietf-inet-types@2013-07-15.yang @@ -0,0 +1,457 @@ +module ietf-inet-types { + + namespace "urn:ietf:params:xml:ns:yang:ietf-inet-types"; + prefix "inet"; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: David Kessens + <mailto:david.kessens@nsn.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This module contains a collection of generally useful derived + YANG data types for Internet addresses and related things. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6991; see + the RFC itself for full legal notices."; + + revision 2013-07-15 { + description + "This revision adds the following new data types: + - ip-address-no-zone + - ipv4-address-no-zone + - ipv6-address-no-zone"; + reference + "RFC 6991: Common YANG Data Types"; + } + + revision 2010-09-24 { + description + "Initial revision."; + reference + "RFC 6021: Common YANG Data Types"; + } + + /*** collection of types related to protocol fields ***/ + + typedef ip-version { + type enumeration { + enum unknown { + value "0"; + description + "An unknown or unspecified version of the Internet + protocol."; + } + enum ipv4 { + value "1"; + description + "The IPv4 protocol as defined in RFC 791."; + } + enum ipv6 { + value "2"; + description + "The IPv6 protocol as defined in RFC 2460."; + } + } + description + "This value represents the version of the IP protocol. + + In the value set and its semantics, this type is equivalent + to the InetVersion textual convention of the SMIv2."; + reference + "RFC 791: Internet Protocol + RFC 2460: Internet Protocol, Version 6 (IPv6) Specification + RFC 4001: Textual Conventions for Internet Network Addresses"; + } + + typedef dscp { + type uint8 { + range "0..63"; + } + description + "The dscp type represents a Differentiated Services Code Point + that may be used for marking packets in a traffic stream. + In the value set and its semantics, this type is equivalent + to the Dscp textual convention of the SMIv2."; + reference + "RFC 3289: Management Information Base for the Differentiated + Services Architecture + RFC 2474: Definition of the Differentiated Services Field + (DS Field) in the IPv4 and IPv6 Headers + RFC 2780: IANA Allocation Guidelines For Values In + the Internet Protocol and Related Headers"; + } + + typedef ipv6-flow-label { + type uint32 { + range "0..1048575"; + } + description + "The ipv6-flow-label type represents the flow identifier or Flow + Label in an IPv6 packet header that may be used to + discriminate traffic flows. + + In the value set and its semantics, this type is equivalent + to the IPv6FlowLabel textual convention of the SMIv2."; + reference + "RFC 3595: Textual Conventions for IPv6 Flow Label + RFC 2460: Internet Protocol, Version 6 (IPv6) Specification"; + } + + typedef port-number { + type uint16 { + range "0..65535"; + } + description + "The port-number type represents a 16-bit port number of an + Internet transport-layer protocol such as UDP, TCP, DCCP, or + SCTP. Port numbers are assigned by IANA. A current list of + all assignments is available from <http://www.iana.org/>. + + Note that the port number value zero is reserved by IANA. In + situations where the value zero does not make sense, it can + be excluded by subtyping the port-number type. + In the value set and its semantics, this type is equivalent + to the InetPortNumber textual convention of the SMIv2."; + reference + "RFC 768: User Datagram Protocol + RFC 793: Transmission Control Protocol + RFC 4960: Stream Control Transmission Protocol + RFC 4340: Datagram Congestion Control Protocol (DCCP) + RFC 4001: Textual Conventions for Internet Network Addresses"; + } + + /*** collection of types related to autonomous systems ***/ + + typedef as-number { + type uint32; + description + "The as-number type represents autonomous system numbers + which identify an Autonomous System (AS). An AS is a set + of routers under a single technical administration, using + an interior gateway protocol and common metrics to route + packets within the AS, and using an exterior gateway + protocol to route packets to other ASes. IANA maintains + the AS number space and has delegated large parts to the + regional registries. + + Autonomous system numbers were originally limited to 16 + bits. BGP extensions have enlarged the autonomous system + number space to 32 bits. This type therefore uses an uint32 + base type without a range restriction in order to support + a larger autonomous system number space. + + In the value set and its semantics, this type is equivalent + to the InetAutonomousSystemNumber textual convention of + the SMIv2."; + reference + "RFC 1930: Guidelines for creation, selection, and registration + of an Autonomous System (AS) + RFC 4271: A Border Gateway Protocol 4 (BGP-4) + RFC 4001: Textual Conventions for Internet Network Addresses + RFC 6793: BGP Support for Four-Octet Autonomous System (AS) + Number Space"; + } + + /*** collection of types related to IP addresses and hostnames ***/ + + typedef ip-address { + type union { + type inet:ipv4-address; + type inet:ipv6-address; + } + description + "The ip-address type represents an IP address and is IP + version neutral. The format of the textual representation + implies the IP version. This type supports scoped addresses + by allowing zone identifiers in the address format."; + reference + "RFC 4007: IPv6 Scoped Address Architecture"; + } + + typedef ipv4-address { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])' + + '(%[\p{N}\p{L}]+)?'; + } + description + "The ipv4-address type represents an IPv4 address in + dotted-quad notation. The IPv4 address may include a zone + index, separated by a % sign. + + The zone index is used to disambiguate identical address + values. For link-local addresses, the zone index will + typically be the interface index number or the name of an + interface. If the zone index is not present, the default + zone of the device will be used. + + The canonical format for the zone index is the numerical + format"; + } + + typedef ipv6-address { + type string { + pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))' + + '(%[\p{N}\p{L}]+)?'; + pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)' + + '(%.+)?'; + } + description + "The ipv6-address type represents an IPv6 address in full, + mixed, shortened, and shortened-mixed notation. The IPv6 + address may include a zone index, separated by a % sign. + + The zone index is used to disambiguate identical address + values. For link-local addresses, the zone index will + typically be the interface index number or the name of an + interface. If the zone index is not present, the default + zone of the device will be used. + + The canonical format of IPv6 addresses uses the textual + representation defined in Section 4 of RFC 5952. The + canonical format for the zone index is the numerical + format as described in Section 11.2 of RFC 4007."; + reference + "RFC 4291: IP Version 6 Addressing Architecture + RFC 4007: IPv6 Scoped Address Architecture + RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + typedef ip-address-no-zone { + type union { + type inet:ipv4-address-no-zone; + type inet:ipv6-address-no-zone; + } + description + "The ip-address-no-zone type represents an IP address and is + IP version neutral. The format of the textual representation + implies the IP version. This type does not support scoped + addresses since it does not allow zone identifiers in the + address format."; + reference + "RFC 4007: IPv6 Scoped Address Architecture"; + } + + typedef ipv4-address-no-zone { + type inet:ipv4-address { + pattern '[0-9\.]*'; + } + description + "An IPv4 address without a zone index. This type, derived from + ipv4-address, may be used in situations where the zone is + known from the context and hence no zone index is needed."; + } + + typedef ipv6-address-no-zone { + type inet:ipv6-address { + pattern '[0-9a-fA-F:\.]*'; + } + description + "An IPv6 address without a zone index. This type, derived from + ipv6-address, may be used in situations where the zone is + known from the context and hence no zone index is needed."; + reference + "RFC 4291: IP Version 6 Addressing Architecture + RFC 4007: IPv6 Scoped Address Architecture + RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + typedef ip-prefix { + type union { + type inet:ipv4-prefix; + type inet:ipv6-prefix; + } + description + "The ip-prefix type represents an IP prefix and is IP + version neutral. The format of the textual representations + implies the IP version."; + } + + typedef ipv4-prefix { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])' + + '/(([0-9])|([1-2][0-9])|(3[0-2]))'; + } + description + "The ipv4-prefix type represents an IPv4 address prefix. + The prefix length is given by the number following the + slash character and must be less than or equal to 32. + + A prefix length value of n corresponds to an IP address + mask that has n contiguous 1-bits from the most + significant bit (MSB) and all other bits set to 0. + + The canonical format of an IPv4 prefix has all bits of + the IPv4 address set to zero that are not part of the + IPv4 prefix."; + } + + typedef ipv6-prefix { + type string { + pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))' + + '(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))'; + pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)' + + '(/.+)'; + } + description + "The ipv6-prefix type represents an IPv6 address prefix. + The prefix length is given by the number following the + slash character and must be less than or equal to 128. + + A prefix length value of n corresponds to an IP address + mask that has n contiguous 1-bits from the most + significant bit (MSB) and all other bits set to 0. + + The IPv6 address should have all bits that do not belong + to the prefix set to zero. + + The canonical format of an IPv6 prefix has all bits of + the IPv6 address set to zero that are not part of the + IPv6 prefix. Furthermore, the IPv6 address is represented + as defined in Section 4 of RFC 5952."; + reference + "RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + /*** collection of domain name and URI types ***/ + + typedef domain-name { + type string { + length "1..253"; + pattern + '((([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.)*' + + '([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.?)' + + '|\.'; + } + description + "The domain-name type represents a DNS domain name. The + name SHOULD be fully qualified whenever possible. + + Internet domain names are only loosely specified. Section + 3.5 of RFC 1034 recommends a syntax (modified in Section + 2.1 of RFC 1123). The pattern above is intended to allow + for current practice in domain name use, and some possible + future expansion. It is designed to hold various types of + domain names, including names used for A or AAAA records + (host names) and other records, such as SRV records. Note + that Internet host names have a stricter syntax (described + in RFC 952) than the DNS recommendations in RFCs 1034 and + 1123, and that systems that want to store host names in + schema nodes using the domain-name type are recommended to + adhere to this stricter standard to ensure interoperability. + + The encoding of DNS names in the DNS protocol is limited + to 255 characters. Since the encoding consists of labels + prefixed by a length bytes and there is a trailing NULL + byte, only 253 characters can appear in the textual dotted + notation. + + The description clause of schema nodes using the domain-name + type MUST describe when and how these names are resolved to + IP addresses. Note that the resolution of a domain-name value + may require to query multiple DNS records (e.g., A for IPv4 + and AAAA for IPv6). The order of the resolution process and + which DNS record takes precedence can either be defined + explicitly or may depend on the configuration of the + resolver. + + Domain-name values use the US-ASCII encoding. Their canonical + format uses lowercase US-ASCII characters. Internationalized + domain names MUST be A-labels as per RFC 5890."; + reference + "RFC 952: DoD Internet Host Table Specification + RFC 1034: Domain Names - Concepts and Facilities + RFC 1123: Requirements for Internet Hosts -- Application + and Support + RFC 2782: A DNS RR for specifying the location of services + (DNS SRV) + RFC 5890: Internationalized Domain Names in Applications + (IDNA): Definitions and Document Framework"; + } + + typedef host { + type union { + type inet:ip-address; + type inet:domain-name; + } + description + "The host type represents either an IP address or a DNS + domain name."; + } + + typedef uri { + type string; + description + "The uri type represents a Uniform Resource Identifier + (URI) as defined by STD 66. + + Objects using the uri type MUST be in US-ASCII encoding, + and MUST be normalized as described by RFC 3986 Sections + 6.2.1, 6.2.2.1, and 6.2.2.2. All unnecessary + percent-encoding is removed, and all case-insensitive + characters are set to lowercase except for hexadecimal + digits, which are normalized to uppercase as described in + Section 6.2.2.1. + + The purpose of this normalization is to help provide + unique URIs. Note that this normalization is not + sufficient to provide uniqueness. Two URIs that are + textually distinct after this normalization may still be + equivalent. + + Objects using the uri type may restrict the schemes that + they permit. For example, 'data:' and 'urn:' schemes + might not be appropriate. + + A zero-length URI is not a valid URI. This can be used to + express 'URI absent' where required. + + In the value set and its semantics, this type is equivalent + to the Uri SMIv2 textual convention defined in RFC 5017."; + reference + "RFC 3986: Uniform Resource Identifier (URI): Generic Syntax + RFC 3305: Report from the Joint W3C/IETF URI Planning Interest + Group: Uniform Resource Identifiers (URIs), URLs, + and Uniform Resource Names (URNs): Clarifications + and Recommendations + RFC 5017: MIB Textual Conventions for Uniform Resource + Identifiers (URIs)"; + } + +} diff --git a/src/share/yang/modules/ietf-interfaces@2018-02-20.yang b/src/share/yang/modules/ietf-interfaces@2018-02-20.yang new file mode 100644 index 0000000..f66c205 --- /dev/null +++ b/src/share/yang/modules/ietf-interfaces@2018-02-20.yang @@ -0,0 +1,1123 @@ +module ietf-interfaces { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-interfaces"; + prefix if; + + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NETMOD (Network Modeling) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com>"; + + description + "This module contains a collection of YANG definitions for + managing network interfaces. + + Copyright (c) 2018 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8343; see + the RFC itself for full legal notices."; + + revision 2018-02-20 { + description + "Updated to support NMDA."; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + + revision 2014-05-08 { + description + "Initial revision."; + reference + "RFC 7223: A YANG Data Model for Interface Management"; + } + + /* + * Typedefs + */ + + typedef interface-ref { + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + description + "This type is used by data models that need to reference + interfaces."; + } + + /* + * Identities + */ + + identity interface-type { + description + "Base identity from which specific interface types are + derived."; + } + + /* + * Features + */ + + feature arbitrary-names { + description + "This feature indicates that the device allows user-controlled + interfaces to be named arbitrarily."; + } + feature pre-provisioning { + description + "This feature indicates that the device supports + pre-provisioning of interface configuration, i.e., it is + possible to configure an interface whose physical interface + hardware is not present on the device."; + } + feature if-mib { + description + "This feature indicates that the device implements + the IF-MIB."; + reference + "RFC 2863: The Interfaces Group MIB"; + } + + /* + * Data nodes + */ + + container interfaces { + description + "Interface parameters."; + + list interface { + key "name"; + + description + "The list of interfaces on the device. + + The status of an interface is available in this list in the + operational state. If the configuration of a + system-controlled interface cannot be used by the system + (e.g., the interface hardware present does not match the + interface type), then the configuration is not applied to + the system-controlled interface shown in the operational + state. If the configuration of a user-controlled interface + cannot be used by the system, the configured interface is + not instantiated in the operational state. + + System-controlled interfaces created by the system are + always present in this list in the operational state, + whether or not they are configured."; + + leaf name { + type string; + description + "The name of the interface. + + A device MAY restrict the allowed values for this leaf, + possibly depending on the type of the interface. + For system-controlled interfaces, this leaf is the + device-specific name of the interface. + + If a client tries to create configuration for a + system-controlled interface that is not present in the + operational state, the server MAY reject the request if + the implementation does not support pre-provisioning of + interfaces or if the name refers to an interface that can + never exist in the system. A Network Configuration + Protocol (NETCONF) server MUST reply with an rpc-error + with the error-tag 'invalid-value' in this case. + + If the device supports pre-provisioning of interface + configuration, the 'pre-provisioning' feature is + advertised. + + If the device allows arbitrarily named user-controlled + interfaces, the 'arbitrary-names' feature is advertised. + + When a configured user-controlled interface is created by + the system, it is instantiated with the same name in the + operational state. + + A server implementation MAY map this leaf to the ifName + MIB object. Such an implementation needs to use some + mechanism to handle the differences in size and characters + allowed between this leaf and ifName. The definition of + such a mechanism is outside the scope of this document."; + reference + "RFC 2863: The Interfaces Group MIB - ifName"; + } + + leaf description { + type string; + description + "A textual description of the interface. + + A server implementation MAY map this leaf to the ifAlias + MIB object. Such an implementation needs to use some + mechanism to handle the differences in size and characters + allowed between this leaf and ifAlias. The definition of + such a mechanism is outside the scope of this document. + + Since ifAlias is defined to be stored in non-volatile + storage, the MIB implementation MUST map ifAlias to the + value of 'description' in the persistently stored + configuration."; + reference + "RFC 2863: The Interfaces Group MIB - ifAlias"; + } + + leaf type { + type identityref { + base interface-type; + } + mandatory true; + description + "The type of the interface. + + When an interface entry is created, a server MAY + initialize the type leaf with a valid value, e.g., if it + is possible to derive the type from the name of the + interface. + + If a client tries to set the type of an interface to a + value that can never be used by the system, e.g., if the + type is not supported or if the type does not match the + name of the interface, the server MUST reject the request. + A NETCONF server MUST reply with an rpc-error with the + error-tag 'invalid-value' in this case."; + reference + "RFC 2863: The Interfaces Group MIB - ifType"; + } + + leaf enabled { + type boolean; + default "true"; + description + "This leaf contains the configured, desired state of the + interface. + + Systems that implement the IF-MIB use the value of this + leaf in the intended configuration to set + IF-MIB.ifAdminStatus to 'up' or 'down' after an ifEntry + has been initialized, as described in RFC 2863. + + Changes in this leaf in the intended configuration are + reflected in ifAdminStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifAdminStatus"; + } + + leaf link-up-down-trap-enable { + if-feature if-mib; + type enumeration { + enum enabled { + value 1; + description + "The device will generate linkUp/linkDown SNMP + notifications for this interface."; + } + enum disabled { + value 2; + description + "The device will not generate linkUp/linkDown SNMP + notifications for this interface."; + } + } + description + "Controls whether linkUp/linkDown SNMP notifications + should be generated for this interface. + + If this node is not configured, the value 'enabled' is + operationally used by the server for interfaces that do + not operate on top of any other interface (i.e., there are + no 'lower-layer-if' entries), and 'disabled' otherwise."; + reference + "RFC 2863: The Interfaces Group MIB - + ifLinkUpDownTrapEnable"; + } + + leaf admin-status { + if-feature if-mib; + type enumeration { + enum up { + value 1; + description + "Ready to pass packets."; + } + enum down { + value 2; + description + "Not ready to pass packets and not in some test mode."; + } + enum testing { + value 3; + description + "In some test mode."; + } + } + config false; + mandatory true; + description + "The desired state of the interface. + + This leaf has the same read semantics as ifAdminStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifAdminStatus"; + } + + leaf oper-status { + type enumeration { + enum up { + value 1; + description + "Ready to pass packets."; + } + enum down { + value 2; + + description + "The interface does not pass any packets."; + } + enum testing { + value 3; + description + "In some test mode. No operational packets can + be passed."; + } + enum unknown { + value 4; + description + "Status cannot be determined for some reason."; + } + enum dormant { + value 5; + description + "Waiting for some external event."; + } + enum not-present { + value 6; + description + "Some component (typically hardware) is missing."; + } + enum lower-layer-down { + value 7; + description + "Down due to state of lower-layer interface(s)."; + } + } + config false; + mandatory true; + description + "The current operational state of the interface. + + This leaf has the same semantics as ifOperStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifOperStatus"; + } + + leaf last-change { + type yang:date-and-time; + config false; + description + "The time the interface entered its current operational + state. If the current state was entered prior to the + last re-initialization of the local network management + subsystem, then this node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - ifLastChange"; + } + + leaf if-index { + if-feature if-mib; + type int32 { + range "1..2147483647"; + } + config false; + mandatory true; + description + "The ifIndex value for the ifEntry represented by this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifIndex"; + } + + leaf phys-address { + type yang:phys-address; + config false; + description + "The interface's address at its protocol sub-layer. For + example, for an 802.x interface, this object normally + contains a Media Access Control (MAC) address. The + interface's media-specific modules must define the bit + and byte ordering and the format of the value of this + object. For interfaces that do not have such an address + (e.g., a serial line), this node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - ifPhysAddress"; + } + + leaf-list higher-layer-if { + type interface-ref; + config false; + description + "A list of references to interfaces layered on top of this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifStackTable"; + } + + leaf-list lower-layer-if { + type interface-ref; + config false; + + description + "A list of references to interfaces layered underneath this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifStackTable"; + } + + leaf speed { + type yang:gauge64; + units "bits/second"; + config false; + description + "An estimate of the interface's current bandwidth in bits + per second. For interfaces that do not vary in + bandwidth or for those where no accurate estimation can + be made, this node should contain the nominal bandwidth. + For interfaces that have no concept of bandwidth, this + node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - + ifSpeed, ifHighSpeed"; + } + + container statistics { + config false; + description + "A collection of interface-related statistics objects."; + + leaf discontinuity-time { + type yang:date-and-time; + mandatory true; + description + "The time on the most recent occasion at which any one or + more of this interface's counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local management + subsystem, then this node contains the time the local + management subsystem re-initialized itself."; + } + + leaf in-octets { + type yang:counter64; + description + "The total number of octets received on the interface, + including framing characters. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInOctets"; + } + + leaf in-unicast-pkts { + type yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were not addressed to a + multicast or broadcast address at this sub-layer. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts"; + } + + leaf in-broadcast-pkts { + type yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a broadcast + address at this sub-layer. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCInBroadcastPkts"; + } + + leaf in-multicast-pkts { + type yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a multicast + address at this sub-layer. For a MAC-layer protocol, + this includes both Group and Functional addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCInMulticastPkts"; + } + + leaf in-discards { + type yang:counter32; + description + "The number of inbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being deliverable to a higher-layer + protocol. One possible reason for discarding such a + packet could be to free up buffer space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInDiscards"; + } + + leaf in-errors { + type yang:counter32; + description + "For packet-oriented interfaces, the number of inbound + packets that contained errors preventing them from being + deliverable to a higher-layer protocol. For character- + oriented or fixed-length interfaces, the number of + inbound transmission units that contained errors + preventing them from being deliverable to a higher-layer + protocol. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInErrors"; + } + + leaf in-unknown-protos { + type yang:counter32; + + description + "For packet-oriented interfaces, the number of packets + received via the interface that were discarded because + of an unknown or unsupported protocol. For + character-oriented or fixed-length interfaces that + support protocol multiplexing, the number of + transmission units received via the interface that were + discarded because of an unknown or unsupported protocol. + For any interface that does not support protocol + multiplexing, this counter is not present. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos"; + } + + leaf out-octets { + type yang:counter64; + description + "The total number of octets transmitted out of the + interface, including framing characters. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutOctets"; + } + + leaf out-unicast-pkts { + type yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted and that were not addressed + to a multicast or broadcast address at this sub-layer, + including those that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts"; + } + + leaf out-broadcast-pkts { + type yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted and that were addressed to a + broadcast address at this sub-layer, including those + that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCOutBroadcastPkts"; + } + + leaf out-multicast-pkts { + type yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted and that were addressed to a + multicast address at this sub-layer, including those + that were discarded or not sent. For a MAC-layer + protocol, this includes both Group and Functional + addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCOutMulticastPkts"; + } + + leaf out-discards { + type yang:counter32; + description + "The number of outbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being transmitted. One possible reason + for discarding such a packet could be to free up buffer + space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutDiscards"; + } + + leaf out-errors { + type yang:counter32; + description + "For packet-oriented interfaces, the number of outbound + packets that could not be transmitted because of errors. + For character-oriented or fixed-length interfaces, the + number of outbound transmission units that could not be + transmitted because of errors. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutErrors"; + } + } + + } + } + + /* + * Legacy typedefs + */ + + typedef interface-state-ref { + type leafref { + path "/if:interfaces-state/if:interface/if:name"; + } + status deprecated; + description + "This type is used by data models that need to reference + the operationally present interfaces."; + } + + /* + * Legacy operational state data nodes + */ + + container interfaces-state { + config false; + status deprecated; + description + "Data nodes for the operational state of interfaces."; + + list interface { + key "name"; + status deprecated; + + description + "The list of interfaces on the device. + + System-controlled interfaces created by the system are + always present in this list, whether or not they are + configured."; + + leaf name { + type string; + status deprecated; + description + "The name of the interface. + + A server implementation MAY map this leaf to the ifName + MIB object. Such an implementation needs to use some + mechanism to handle the differences in size and characters + allowed between this leaf and ifName. The definition of + such a mechanism is outside the scope of this document."; + reference + "RFC 2863: The Interfaces Group MIB - ifName"; + } + + leaf type { + type identityref { + base interface-type; + } + mandatory true; + status deprecated; + description + "The type of the interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifType"; + } + + leaf admin-status { + if-feature if-mib; + type enumeration { + enum up { + value 1; + description + "Ready to pass packets."; + } + enum down { + value 2; + description + "Not ready to pass packets and not in some test mode."; + } + enum testing { + value 3; + description + "In some test mode."; + } + } + mandatory true; + status deprecated; + description + "The desired state of the interface. + + This leaf has the same read semantics as ifAdminStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifAdminStatus"; + } + + leaf oper-status { + type enumeration { + enum up { + value 1; + description + "Ready to pass packets."; + } + enum down { + value 2; + description + "The interface does not pass any packets."; + } + enum testing { + value 3; + description + "In some test mode. No operational packets can + be passed."; + } + enum unknown { + value 4; + description + "Status cannot be determined for some reason."; + } + enum dormant { + value 5; + description + "Waiting for some external event."; + } + enum not-present { + value 6; + description + "Some component (typically hardware) is missing."; + } + enum lower-layer-down { + value 7; + description + "Down due to state of lower-layer interface(s)."; + } + } + mandatory true; + status deprecated; + description + "The current operational state of the interface. + + This leaf has the same semantics as ifOperStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifOperStatus"; + } + + leaf last-change { + type yang:date-and-time; + status deprecated; + description + "The time the interface entered its current operational + state. If the current state was entered prior to the + last re-initialization of the local network management + subsystem, then this node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - ifLastChange"; + } + + leaf if-index { + if-feature if-mib; + type int32 { + range "1..2147483647"; + } + mandatory true; + status deprecated; + description + "The ifIndex value for the ifEntry represented by this + interface."; + + reference + "RFC 2863: The Interfaces Group MIB - ifIndex"; + } + + leaf phys-address { + type yang:phys-address; + status deprecated; + description + "The interface's address at its protocol sub-layer. For + example, for an 802.x interface, this object normally + contains a Media Access Control (MAC) address. The + interface's media-specific modules must define the bit + and byte ordering and the format of the value of this + object. For interfaces that do not have such an address + (e.g., a serial line), this node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - ifPhysAddress"; + } + + leaf-list higher-layer-if { + type interface-state-ref; + status deprecated; + description + "A list of references to interfaces layered on top of this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifStackTable"; + } + + leaf-list lower-layer-if { + type interface-state-ref; + status deprecated; + description + "A list of references to interfaces layered underneath this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifStackTable"; + } + + leaf speed { + type yang:gauge64; + units "bits/second"; + status deprecated; + description + "An estimate of the interface's current bandwidth in bits + per second. For interfaces that do not vary in + bandwidth or for those where no accurate estimation can + + be made, this node should contain the nominal bandwidth. + For interfaces that have no concept of bandwidth, this + node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - + ifSpeed, ifHighSpeed"; + } + + container statistics { + status deprecated; + description + "A collection of interface-related statistics objects."; + + leaf discontinuity-time { + type yang:date-and-time; + mandatory true; + status deprecated; + description + "The time on the most recent occasion at which any one or + more of this interface's counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local management + subsystem, then this node contains the time the local + management subsystem re-initialized itself."; + } + + leaf in-octets { + type yang:counter64; + status deprecated; + description + "The total number of octets received on the interface, + including framing characters. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInOctets"; + } + + leaf in-unicast-pkts { + type yang:counter64; + status deprecated; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were not addressed to a + multicast or broadcast address at this sub-layer. + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts"; + } + + leaf in-broadcast-pkts { + type yang:counter64; + status deprecated; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a broadcast + address at this sub-layer. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCInBroadcastPkts"; + } + + leaf in-multicast-pkts { + type yang:counter64; + status deprecated; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a multicast + address at this sub-layer. For a MAC-layer protocol, + this includes both Group and Functional addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCInMulticastPkts"; + } + + leaf in-discards { + type yang:counter32; + status deprecated; + + description + "The number of inbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being deliverable to a higher-layer + protocol. One possible reason for discarding such a + packet could be to free up buffer space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInDiscards"; + } + + leaf in-errors { + type yang:counter32; + status deprecated; + description + "For packet-oriented interfaces, the number of inbound + packets that contained errors preventing them from being + deliverable to a higher-layer protocol. For character- + oriented or fixed-length interfaces, the number of + inbound transmission units that contained errors + preventing them from being deliverable to a higher-layer + protocol. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInErrors"; + } + + leaf in-unknown-protos { + type yang:counter32; + status deprecated; + description + "For packet-oriented interfaces, the number of packets + received via the interface that were discarded because + of an unknown or unsupported protocol. For + character-oriented or fixed-length interfaces that + support protocol multiplexing, the number of + transmission units received via the interface that were + discarded because of an unknown or unsupported protocol. + For any interface that does not support protocol + multiplexing, this counter is not present. + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos"; + } + + leaf out-octets { + type yang:counter64; + status deprecated; + description + "The total number of octets transmitted out of the + interface, including framing characters. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutOctets"; + } + + leaf out-unicast-pkts { + type yang:counter64; + status deprecated; + description + "The total number of packets that higher-level protocols + requested be transmitted and that were not addressed + to a multicast or broadcast address at this sub-layer, + including those that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts"; + } + + leaf out-broadcast-pkts { + type yang:counter64; + status deprecated; + + description + "The total number of packets that higher-level protocols + requested be transmitted and that were addressed to a + broadcast address at this sub-layer, including those + that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCOutBroadcastPkts"; + } + + leaf out-multicast-pkts { + type yang:counter64; + status deprecated; + description + "The total number of packets that higher-level protocols + requested be transmitted and that were addressed to a + multicast address at this sub-layer, including those + that were discarded or not sent. For a MAC-layer + protocol, this includes both Group and Functional + addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCOutMulticastPkts"; + } + + leaf out-discards { + type yang:counter32; + status deprecated; + description + "The number of outbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being transmitted. One possible reason + for discarding such a packet could be to free up buffer + space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutDiscards"; + } + + leaf out-errors { + type yang:counter32; + status deprecated; + description + "For packet-oriented interfaces, the number of outbound + packets that could not be transmitted because of errors. + For character-oriented or fixed-length interfaces, the + number of outbound transmission units that could not be + transmitted because of errors. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutErrors"; + } + } + } + } +} diff --git a/src/share/yang/modules/ietf-yang-types@2013-07-15.yang b/src/share/yang/modules/ietf-yang-types@2013-07-15.yang new file mode 100644 index 0000000..ee58fa3 --- /dev/null +++ b/src/share/yang/modules/ietf-yang-types@2013-07-15.yang @@ -0,0 +1,474 @@ +module ietf-yang-types { + + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-types"; + prefix "yang"; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: David Kessens + <mailto:david.kessens@nsn.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This module contains a collection of generally useful derived + YANG data types. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6991; see + the RFC itself for full legal notices."; + + revision 2013-07-15 { + description + "This revision adds the following new data types: + - yang-identifier + - hex-string + - uuid + - dotted-quad"; + reference + "RFC 6991: Common YANG Data Types"; + } + + revision 2010-09-24 { + description + "Initial revision."; + reference + "RFC 6021: Common YANG Data Types"; + } + + /*** collection of counter and gauge types ***/ + + typedef counter32 { + type uint32; + description + "The counter32 type represents a non-negative integer + that monotonically increases until it reaches a + maximum value of 2^32-1 (4294967295 decimal), when it + wraps around and starts increasing again from zero. + + Counters have no defined 'initial' value, and thus, a + single value of a counter has (in general) no information + content. Discontinuities in the monotonically increasing + value normally occur at re-initialization of the + management system, and at other times as specified in the + description of a schema node using this type. If such + other times can occur, for example, the creation of + a schema node of type counter32 at times other than + re-initialization, then a corresponding schema node + should be defined, with an appropriate type, to indicate + the last discontinuity. + + The counter32 type should not be used for configuration + schema nodes. A default statement SHOULD NOT be used in + combination with the type counter32. + + In the value set and its semantics, this type is equivalent + to the Counter32 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef zero-based-counter32 { + type yang:counter32; + default "0"; + description + "The zero-based-counter32 type represents a counter32 + that has the defined 'initial' value zero. + + A schema node of this type will be set to zero (0) on creation + and will thereafter increase monotonically until it reaches + a maximum value of 2^32-1 (4294967295 decimal), when it + wraps around and starts increasing again from zero. + + Provided that an application discovers a new schema node + of this type within the minimum time to wrap, it can use the + 'initial' value as a delta. It is important for a management + station to be aware of this minimum time and the actual time + between polls, and to discard data if the actual time is too + long or there is no defined minimum time. + + In the value set and its semantics, this type is equivalent + to the ZeroBasedCounter32 textual convention of the SMIv2."; + reference + "RFC 4502: Remote Network Monitoring Management Information + Base Version 2"; + } + + typedef counter64 { + type uint64; + description + "The counter64 type represents a non-negative integer + that monotonically increases until it reaches a + maximum value of 2^64-1 (18446744073709551615 decimal), + when it wraps around and starts increasing again from zero. + + Counters have no defined 'initial' value, and thus, a + single value of a counter has (in general) no information + content. Discontinuities in the monotonically increasing + value normally occur at re-initialization of the + management system, and at other times as specified in the + description of a schema node using this type. If such + other times can occur, for example, the creation of + a schema node of type counter64 at times other than + re-initialization, then a corresponding schema node + should be defined, with an appropriate type, to indicate + the last discontinuity. + + The counter64 type should not be used for configuration + schema nodes. A default statement SHOULD NOT be used in + combination with the type counter64. + + In the value set and its semantics, this type is equivalent + to the Counter64 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef zero-based-counter64 { + type yang:counter64; + default "0"; + description + "The zero-based-counter64 type represents a counter64 that + has the defined 'initial' value zero. + + A schema node of this type will be set to zero (0) on creation + and will thereafter increase monotonically until it reaches + a maximum value of 2^64-1 (18446744073709551615 decimal), + when it wraps around and starts increasing again from zero. + + Provided that an application discovers a new schema node + of this type within the minimum time to wrap, it can use the + 'initial' value as a delta. It is important for a management + station to be aware of this minimum time and the actual time + between polls, and to discard data if the actual time is too + long or there is no defined minimum time. + + In the value set and its semantics, this type is equivalent + to the ZeroBasedCounter64 textual convention of the SMIv2."; + reference + "RFC 2856: Textual Conventions for Additional High Capacity + Data Types"; + } + + typedef gauge32 { + type uint32; + description + "The gauge32 type represents a non-negative integer, which + may increase or decrease, but shall never exceed a maximum + value, nor fall below a minimum value. The maximum value + cannot be greater than 2^32-1 (4294967295 decimal), and + the minimum value cannot be smaller than 0. The value of + a gauge32 has its maximum value whenever the information + being modeled is greater than or equal to its maximum + value, and has its minimum value whenever the information + being modeled is smaller than or equal to its minimum value. + If the information being modeled subsequently decreases + below (increases above) the maximum (minimum) value, the + gauge32 also decreases (increases). + + In the value set and its semantics, this type is equivalent + to the Gauge32 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef gauge64 { + type uint64; + description + "The gauge64 type represents a non-negative integer, which + may increase or decrease, but shall never exceed a maximum + value, nor fall below a minimum value. The maximum value + cannot be greater than 2^64-1 (18446744073709551615), and + the minimum value cannot be smaller than 0. The value of + a gauge64 has its maximum value whenever the information + being modeled is greater than or equal to its maximum + value, and has its minimum value whenever the information + being modeled is smaller than or equal to its minimum value. + If the information being modeled subsequently decreases + below (increases above) the maximum (minimum) value, the + gauge64 also decreases (increases). + + In the value set and its semantics, this type is equivalent + to the CounterBasedGauge64 SMIv2 textual convention defined + in RFC 2856"; + reference + "RFC 2856: Textual Conventions for Additional High Capacity + Data Types"; + } + + /*** collection of identifier-related types ***/ + + typedef object-identifier { + type string { + pattern '(([0-1](\.[1-3]?[0-9]))|(2\.(0|([1-9]\d*))))' + + '(\.(0|([1-9]\d*)))*'; + } + description + "The object-identifier type represents administratively + assigned names in a registration-hierarchical-name tree. + + Values of this type are denoted as a sequence of numerical + non-negative sub-identifier values. Each sub-identifier + value MUST NOT exceed 2^32-1 (4294967295). Sub-identifiers + are separated by single dots and without any intermediate + whitespace. + + The ASN.1 standard restricts the value space of the first + sub-identifier to 0, 1, or 2. Furthermore, the value space + of the second sub-identifier is restricted to the range + 0 to 39 if the first sub-identifier is 0 or 1. Finally, + the ASN.1 standard requires that an object identifier + has always at least two sub-identifiers. The pattern + captures these restrictions. + + Although the number of sub-identifiers is not limited, + module designers should realize that there may be + implementations that stick with the SMIv2 limit of 128 + sub-identifiers. + + This type is a superset of the SMIv2 OBJECT IDENTIFIER type + since it is not restricted to 128 sub-identifiers. Hence, + this type SHOULD NOT be used to represent the SMIv2 OBJECT + IDENTIFIER type; the object-identifier-128 type SHOULD be + used instead."; + reference + "ISO9834-1: Information technology -- Open Systems + Interconnection -- Procedures for the operation of OSI + Registration Authorities: General procedures and top + arcs of the ASN.1 Object Identifier tree"; + } + + typedef object-identifier-128 { + type object-identifier { + pattern '\d*(\.\d*){1,127}'; + } + description + "This type represents object-identifiers restricted to 128 + sub-identifiers. + + In the value set and its semantics, this type is equivalent + to the OBJECT IDENTIFIER type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef yang-identifier { + type string { + length "1..max"; + pattern '[a-zA-Z_][a-zA-Z0-9\-_.]*'; + pattern '.|..|[^xX].*|.[^mM].*|..[^lL].*'; + } + description + "A YANG identifier string as defined by the 'identifier' + rule in Section 12 of RFC 6020. An identifier must + start with an alphabetic character or an underscore + followed by an arbitrary sequence of alphabetic or + numeric characters, underscores, hyphens, or dots. + + A YANG identifier MUST NOT start with any possible + combination of the lowercase or uppercase character + sequence 'xml'."; + reference + "RFC 6020: YANG - A Data Modeling Language for the Network + Configuration Protocol (NETCONF)"; + } + + /*** collection of types related to date and time***/ + + typedef date-and-time { + type string { + pattern '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?' + + '(Z|[\+\-]\d{2}:\d{2})'; + } + description + "The date-and-time type is a profile of the ISO 8601 + standard for representation of dates and times using the + Gregorian calendar. The profile is defined by the + date-time production in Section 5.6 of RFC 3339. + + The date-and-time type is compatible with the dateTime XML + schema type with the following notable exceptions: + + (a) The date-and-time type does not allow negative years. + + (b) The date-and-time time-offset -00:00 indicates an unknown + time zone (see RFC 3339) while -00:00 and +00:00 and Z + all represent the same time zone in dateTime. + + (c) The canonical format (see below) of data-and-time values + differs from the canonical format used by the dateTime XML + schema type, which requires all times to be in UTC using + the time-offset 'Z'. + + This type is not equivalent to the DateAndTime textual + convention of the SMIv2 since RFC 3339 uses a different + separator between full-date and full-time and provides + higher resolution of time-secfrac. + + The canonical format for date-and-time values with a known time + zone uses a numeric time zone offset that is calculated using + the device's configured known offset to UTC time. A change of + the device's offset to UTC time will cause date-and-time values + to change accordingly. Such changes might happen periodically + in case a server follows automatically daylight saving time + (DST) time zone offset changes. The canonical format for + date-and-time values with an unknown time zone (usually + referring to the notion of local time) uses the time-offset + -00:00."; + reference + "RFC 3339: Date and Time on the Internet: Timestamps + RFC 2579: Textual Conventions for SMIv2 + XSD-TYPES: XML Schema Part 2: Datatypes Second Edition"; + } + + typedef timeticks { + type uint32; + description + "The timeticks type represents a non-negative integer that + represents the time, modulo 2^32 (4294967296 decimal), in + hundredths of a second between two epochs. When a schema + node is defined that uses this type, the description of + the schema node identifies both of the reference epochs. + + In the value set and its semantics, this type is equivalent + to the TimeTicks type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef timestamp { + type yang:timeticks; + description + "The timestamp type represents the value of an associated + timeticks schema node at which a specific occurrence + happened. The specific occurrence must be defined in the + description of any schema node defined using this type. When + the specific occurrence occurred prior to the last time the + associated timeticks attribute was zero, then the timestamp + value is zero. Note that this requires all timestamp values + to be reset to zero when the value of the associated timeticks + attribute reaches 497+ days and wraps around to zero. + + The associated timeticks schema node must be specified + in the description of any schema node using this type. + + In the value set and its semantics, this type is equivalent + to the TimeStamp textual convention of the SMIv2."; + reference + "RFC 2579: Textual Conventions for SMIv2"; + } + + /*** collection of generic address types ***/ + + typedef phys-address { + type string { + pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'; + } + + description + "Represents media- or physical-level addresses represented + as a sequence octets, each octet represented by two hexadecimal + numbers. Octets are separated by colons. The canonical + representation uses lowercase characters. + + In the value set and its semantics, this type is equivalent + to the PhysAddress textual convention of the SMIv2."; + reference + "RFC 2579: Textual Conventions for SMIv2"; + } + + typedef mac-address { + type string { + pattern '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'; + } + description + "The mac-address type represents an IEEE 802 MAC address. + The canonical representation uses lowercase characters. + + In the value set and its semantics, this type is equivalent + to the MacAddress textual convention of the SMIv2."; + reference + "IEEE 802: IEEE Standard for Local and Metropolitan Area + Networks: Overview and Architecture + RFC 2579: Textual Conventions for SMIv2"; + } + + /*** collection of XML-specific types ***/ + + typedef xpath1.0 { + type string; + description + "This type represents an XPATH 1.0 expression. + + When a schema node is defined that uses this type, the + description of the schema node MUST specify the XPath + context in which the XPath expression is evaluated."; + reference + "XPATH: XML Path Language (XPath) Version 1.0"; + } + + /*** collection of string types ***/ + + typedef hex-string { + type string { + pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'; + } + description + "A hexadecimal string with octets represented as hex digits + separated by colons. The canonical representation uses + lowercase characters."; + } + + typedef uuid { + type string { + pattern '[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-' + + '[0-9a-fA-F]{4}-[0-9a-fA-F]{12}'; + } + description + "A Universally Unique IDentifier in the string representation + defined in RFC 4122. The canonical representation uses + lowercase characters. + + The following is an example of a UUID in string representation: + f81d4fae-7dec-11d0-a765-00a0c91e6bf6 + "; + reference + "RFC 4122: A Universally Unique IDentifier (UUID) URN + Namespace"; + } + + typedef dotted-quad { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'; + } + description + "An unsigned 32-bit number expressed in the dotted-quad + notation, i.e., four octets written as decimal numbers + and separated with the '.' (full stop) character."; + } +} 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 new file mode 100644 index 0000000..ff25896 --- /dev/null +++ b/src/share/yang/modules/kea-ctrl-agent@2019-08-12.yang @@ -0,0 +1,78 @@ +module kea-ctrl-agent { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:kea-ctrl-agent"; + prefix "kea-ctrl-agent"; + + import ietf-inet-types { + prefix inet; + } + import kea-types { + prefix kea; + 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 control agent."; + + revision 2019-08-12 { + description "Initial revision"; + reference ""; + } + + /* + * Data Nodes + */ + + container config { + // config true; + description "Contains control agent configuration."; + + leaf http-host { + type inet:ip-address; + description "IP address to which HTTP service will be bound."; + } + + leaf http-port { + type uint16; + description "Port to which HTTP service will be bound."; + } + + container control-sockets { + description "Control sockets."; + list socket { + key server-type; + description "List of server control socket."; + leaf server-type { + type enumeration { + enum "dhcp4" { + description "kea-dhcp4 server"; + } + enum "dhcp6" { + description "kea-dhcp6 server"; + } + enum "d2" { + description "kea-dhcp-ddns server"; + } + } + mandatory true; + description "Server type."; + } + container control-socket { + description "Control socket information."; + uses kea:control-socket-info; + } + } + } + + uses kea:hooks-libraries; + + leaf user-context { + type kea:user-context; + description "Control agent user context."; + } + + uses kea:loggers; + } +} diff --git a/src/share/yang/modules/kea-dhcp-ddns@2022-07-27.yang b/src/share/yang/modules/kea-dhcp-ddns@2022-07-27.yang new file mode 100644 index 0000000..bafa6a3 --- /dev/null +++ b/src/share/yang/modules/kea-dhcp-ddns@2022-07-27.yang @@ -0,0 +1,184 @@ +module kea-dhcp-ddns { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:kea-dhcp-ddns"; + prefix "kea-dhcp-ddns"; + + import ietf-inet-types { + prefix inet; + } + import kea-types { + prefix kea; + 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 DHCP-DDNS server."; + + revision 2022-07-27 { + description "Added GSS-TSIG key-name configration parameter for DNS + servers"; + } + + revision 2019-08-12 { + description "Initial revision"; + reference ""; + } + + /* + * Groupings + */ + + grouping managed-domains { + description "Contains parameters for forward or reverse DDNS managed + domains."; + + container ddns-domains { + description "DDNS domains."; + list ddns-domain { + key name; + description "List of DDNS domains."; + leaf name { + type string; + mandatory true; + description "DDNS domain name."; + } + leaf key-name { + type string; + description "TSIG key to use. Blank means no TSIG."; + } + container dns-servers { + description "DNS servers."; + list server { + key ip-address; + description "List of DNS servers."; + leaf hostname { + type string; + description "DNS server hostname."; + } + leaf ip-address { + type inet:ip-address; + mandatory true; + description "DNS server IP address."; + } + leaf port { + type uint16; + description "DNS server port."; + } + leaf key-name { + type string; + description "Name of the TSIG key used to protect DNS updates for + this server."; + } + leaf user-context { + type kea:user-context; + description "DNS server user context."; + } + } + } + leaf user-context { + type kea:user-context; + description "DDNS domain user context."; + } + } + } + } + + /* + * Data Nodes + */ + + container config { + // config true; + description "Contains DHCP-DDNS server configuration."; + + leaf ip-address { + type inet:ip-address; + description "IP address on which the server listens for requests."; + } + + leaf port { + type uint16; + description "Port on which the server listens for requests."; + } + + leaf dns-server-timeout { + type uint32; + units "milliseconds"; + description "Maximum amount of time that the server will wait for + a response from a DNS server to a single DNS update message."; + } + + leaf ncr-protocol { + type enumeration { + enum "UDP" { + description "UDP transport"; + } + enum "TCP" { + description "TCP transport"; + } + } + description "Protocol to use when sending requests to the server."; + } + + leaf ncr-format { + type enumeration { + enum "JSON" { + description "JSON format"; + } + } + description "Packet format to use when sending requests to the server."; + } + + uses kea:control-socket; + + container forward-ddns { + description "Forward DNS zones."; + uses managed-domains; + } + + container reverse-ddns { + description "Reverse DNS zones."; + uses managed-domains; + } + + container tsig-keys { + description "Keys to use with TSIG."; + list key { + key name; + description "List of TSIG keys."; + leaf name { + type string; + mandatory true; + description "Key name."; + } + leaf algorithm { + type string; + mandatory true; + description "Hashing algorithm to use with the key."; + } + leaf digest-bits { + type uint16; + units "bits"; + description "Minimum truncated length. 0 means no truncation."; + } + leaf secret { + type string; + mandatory true; + description "Shared secret for the key."; + } + leaf user-context { + type kea:user-context; + description "Key user context."; + } + } + } + leaf user-context { + type kea:user-context; + description "DHCP-DDNS server user context."; + } + + uses kea:loggers; + } +} diff --git a/src/share/yang/modules/kea-dhcp-types@2022-07-27.yang b/src/share/yang/modules/kea-dhcp-types@2022-07-27.yang new file mode 100644 index 0000000..68b3ce3 --- /dev/null +++ b/src/share/yang/modules/kea-dhcp-types@2022-07-27.yang @@ -0,0 +1,1122 @@ +module kea-dhcp-types { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:kea-dhcp-types"; + prefix "kea-dhcp-types"; + + import ietf-inet-types { + prefix inet; + } + import kea-types { + prefix kea; + revision-date 2019-08-12; + } + + organization "Internet Systems Consortium"; + contact "kea-dev@lists.isc.org"; + description "This file defines some commonly used Kea DHCP types and + groupings."; + + revision 2022-07-27 { + description "Added TLS parameters for database connections: trust-anchor, + cert-file, key-file, cipher-list. Added parameters which govern + the way the server behaves regarding detection of configured + interfaces: service-sockets-require-all, + service-sockets-max-retries, service-sockets-retry-wait-time. + Added parameters which govern reservations lookup: + early-global-reservations-lookup, reservations-lookup-first."; + } + + revision 2021-11-24 { + description "Fixed store-extended-info. Added several containers and leaves: + compatibility, lenient-option-parsing, multi-threading, + enable-multi-threading, packet-queue-size, thread-pool-size, + valid-lifetime, min-valid-lifetime, max-valid-lifetime, + preferred-lifetime, min-preferred-lifetime, + max-preferred-lifetime, cache-max-age, cache-threshold, + ddns-generated-prefix, ddns-override-client-update, + ddns-override-no-update, ddns-qualifying-suffix, + ddns-replace-client-name, ddns-send-updates, + ddns-update-on-renew, ddns-use-conflict-resolution, + ip-reservations-unique, parked-packet-limit, + reservations-global, reservations-in-subnet, + reservations-out-of-pool, statistic-default-sample-age, + statistic-default-sample-count, store-extended-info, on-fail."; + } + + revision 2021-08-25 { + description "Added store-extended-info"; + } + + revision 2019-08-12 { + description "Initial revision"; + } + + /* + * Typedef + */ + typedef host-reservation-mode { + type enumeration { + enum "disabled" { + description "Host reservation support is disabled."; + } + enum "out-of-pool" { + description "Allows only out of pool host reservations."; + } + enum "all" { + description "Allows both in pool and out of pool host reservations."; + } + enum "global" { + description "Allows only global host reservations."; + } + } + description "Host reservation mode."; + } + + typedef lease-state { + type enumeration { + enum "default" { + description "Active/default"; + } + enum "declined" { + description "Declined"; + } + enum "expired-reclaimed" { + description "Expired-reclaimed"; + } + } + description "Defines state of the lease."; + } + + /* + * Grouping + */ + grouping valid-lifetime { + description "Valid lifetime grouping."; + leaf valid-lifetime { + type uint32; + units "seconds"; + description "Valid lifetime entry."; + } + } + + grouping min-valid-lifetime { + description "Minimum valid lifetime grouping."; + leaf min-valid-lifetime { + type uint32; + units "seconds"; + description "Minimum valid lifetime entry."; + } + } + + grouping max-valid-lifetime { + description "Maximum valid lifetime grouping."; + leaf max-valid-lifetime { + type uint32; + units "seconds"; + description "Maximum valid lifetime entry."; + } + } + + grouping renew-timer { + description "Renew timer grouping."; + leaf renew-timer { + type uint32; + units "seconds"; + description "Renew timer entry."; + } + } + + grouping rebind-timer { + description "Rebind timer grouping."; + leaf rebind-timer { + type uint32; + units "seconds"; + description "Rebind timer entry."; + } + } + + grouping calculate-tee-times { + description "Calculate T1/T2 grouping."; + leaf calculate-tee-times { + type boolean; + description "Calculate T1/T2 entry."; + } + } + + grouping cache-max-age { + leaf cache-max-age { + type uint32; + description + "maximum lease age until cached"; + } + } + + grouping cache-threshold { + leaf cache-threshold { + type decimal64 { + fraction-digits 18; + range "0 .. 1"; + } + description + "cache threshold"; + } + } + + grouping t1-percent { + description "T1 timer grouping."; + leaf t1-percent { + type decimal64 { + fraction-digits 18; + range "0 .. 1"; + } + description "T1 timer entry."; + } + } + + grouping t2-percent { + description "T2 timer grouping."; + leaf t2-percent { + type decimal64 { + fraction-digits 18; + range "0 .. 1"; + } + description "T2 timer entry."; + } + } + + grouping database { + description "Database grouping."; + leaf database-type { + type string; + mandatory true; + description "Database type (e.g. mysql)."; + } + leaf user { + type string; + description "Database user name."; + } + leaf password { + type string; + description "Database user password."; + } + leaf host { + type string; + description "Database host."; + } + leaf name { + type string; + description "Database name."; + } + leaf persist { + type boolean; + description "Write lease to disk file. This parameter applies only to + memfile backend."; + } + leaf port { + type uint16; + description "Database port."; + } + leaf lfc-interval { + type uint32; + units "seconds"; + description "Interval between two lease file cleanups."; + } + leaf readonly { + type boolean; + description "If set to true, the database will be connected in + read-only mode. This does not make sense for lease + databases, only for host reservations and possibly + for upcoming config backend."; + } + leaf trust-anchor { + type string; + description "TLS trust anchor."; + } + leaf cert-file { + type string; + description "TLS certificate file."; + } + leaf key-file { + type string; + description "TLS key file."; + } + leaf cipher-list { + type string; + description "TLS cipher list."; + } + leaf connect-timeout { + type uint32; + units "milliseconds"; + description "Database connection timeout."; + } + leaf contact-points { + type string; + description "Cassandra database contact points, a coma separated list of + IP addresses."; + } + leaf keyspace { + type string; + description "Cassandra database keyspace (this is Cassandra's equivalent + of a database name)."; + } + leaf max-reconnect-tries { + type uint32; + description "Maximum of recovery attempts before exit."; + } + leaf reconnect-wait-time { + type uint32; + units "milliseconds"; + description "Waiting delay between two recovery attempts."; + } + leaf request-timeout { + type uint32; + units "milliseconds"; + description "Timeout waiting for a response."; + } + leaf tcp-keepalive { + type uint32; + units "seconds"; + description "TCP keepalive for the database connection."; + } + leaf tcp-nodelay { + type boolean; + description "TCP nodelay for the database connection."; + } + leaf consistency { + type string; + description "Consistency level."; + } + leaf serial-consistency { + type string; + description "Serial consistency level."; + } + leaf max-row-errors { + type uint32; + description "Maximum row errors (0 means unlimited)."; + } + leaf on-fail { + type string; + description + "action to take when connection recovery fails"; + } + uses kea:user-context { + refine user-context { + description "Database user context. Arbitrary JSON data can be + stored here."; + } + } + } + + grouping databases { + description "Databases grouping."; + container lease-database { + presence "Have lease database."; + description "Lease database."; + uses database; + } + list hosts-database { + key database-type; + description "List of databases."; + uses database; + } + } + + grouping expired-leases-processing { + description "Expired leases processing grouping."; + container expired-leases-processing { + description "Expired leases processing setup."; + leaf reclaim-timer-wait-time { + type uint32; + units "seconds"; + description "Interval between reclamation cycles."; + } + leaf flush-reclaimed-timer-wait-time { + type uint32; + units "seconds"; + description "Interval between reclaimed leases collection."; + } + leaf hold-reclaimed-time { + type uint32; + units "seconds"; + description "Hold timer for re-assignment."; + } + leaf max-reclaim-leases { + type uint32; + description "Maximum number of reclaimed leases per cycle."; + } + leaf max-reclaim-time { + type uint32; + units "milliseconds"; + description "Maximum duration of a reclamation cycle."; + } + leaf unwarned-reclaim-cycles { + type uint32; + description "Maximum numbers of uncomplete cycles before warning."; + } + } + } + + grouping hostname-char-set { + description "Hostname character set grouping."; + leaf hostname-char-set { + type string; + description "A regex defining invalid characters. If detected, those + will be replaced by hostname-char-replacement."; + } + } + + grouping hostname-char-replacement { + description "Hostname character replacement grouping."; + leaf hostname-char-replacement { + type string; + description "Replacement for invalid charaters. See + hostname-char-set."; + } + } + + grouping dhcp-ddns { + description "DHCP-DDNS grouping."; + container dhcp-ddns { + description "DHCP-DDNS client setup."; + leaf enable-updates { + type boolean; + description "Enable DHCP-DDNS updates."; + } + leaf qualifying-suffix { + type string; + description "DHCP-DDNS qualifying suffix."; + } + leaf server-ip { + type inet:ip-address; + description "DHCP-DDNS server IP address."; + } + leaf server-port { + type uint16; + description "DHCP-DDNS server port."; + } + leaf sender-ip { + type inet:ip-address; + description "DHCP-DDNS sender IP address."; + } + leaf sender-port { + type uint16; + description "DHCP-DDNS sender port."; + } + leaf max-queue-size { + type uint32; + description "Maximum DHCP-DDNS queue size."; + } + leaf ncr-protocol { + type enumeration { + enum "UDP" { + description "UDP transport"; + } + enum "TCP" { + description "TCP transport"; + } + } + description "Protocol to use for DHCP-DDNS communication. + Currently only UDP is supported."; + } + leaf ncr-format { + type enumeration { + enum "JSON" { + description "JSON format"; + } + } + description "Packet format to use for DHCP-DDNS."; + } + leaf override-no-update { + type boolean; + description "Ignore client request and send update."; + } + leaf override-client-update { + type boolean; + description "Ignore client delegation."; + } + leaf replace-client-name { + type enumeration { + enum "when-present" { + description "When the client sent a name."; + } + enum "never" { + description "Never replace or generate a name."; + } + enum "always" { + description "Always replace or generate a name."; + } + enum "when-not-present" { + description "When the client did not send a name."; + } + } + description "Replace the name provided by the client."; + } + leaf generated-prefix { + type string; + description "DHCP-DDNS generated prefix."; + } + uses hostname-char-set; + uses hostname-char-replacement; + uses kea:user-context { + refine user-context { + description "DHCP-DDNS user context. Arbitrary JSON data can + be stored here."; + } + } + } + } + + grouping sanity-checks { + description "Sanity checks grouping."; + container sanity-checks { + description "Sanity checks container."; + leaf lease-checks { + type enumeration { + enum "none" { + description "No checks."; + } + enum "warn" { + description "When a check fails print a warning and accept the + lease."; + } + enum "fix" { + description "When a check fails try to fix it and accept the + lease."; + } + enum "fix-del" { + description "When a check fails try to fix it and reject the + lease if still bad."; + } + enum "del" { + description "When a check fails reject the lease."; + } + } + description "Lease checks: verify subnet-id consistency on memfile + loading."; + } + } + } + + grouping client-class { + description "Client class grouping."; + leaf client-class { + type string; + description "Client class entry."; + } + } + + grouping pool-client-class { + description "Client class grouping for a pool."; + uses client-class { + refine client-class { + description "Pool client class guard (only clients belonging + to this class will be allowed in this pool)."; + } + } + } + + grouping subnet-client-class { + description "Client class grouping for a subnet."; + uses client-class { + refine client-class { + description "Subnet client class guard (only clients belonging to this + class will be allowed in this subnet)."; + } + } + } + + grouping network-client-class { + description "Client class grouping for a shared network."; + uses client-class { + refine client-class { + description "Shared network client class guard (only clients + belonging to this class will be allowed in this + shared network)."; + } + } + } + + grouping require-client-classes { + description "Require client classes grouping."; + leaf-list require-client-classes { + type string; + description "List of client classes."; + } + } + + grouping pool-require-client-classes { + description "Require client classes grouping for a pool."; + uses require-client-classes { + refine require-client-classes { + description "Pool require client classes."; + } + } + } + + grouping subnet-require-client-classes { + description "Require client classes grouping for a subnet."; + uses require-client-classes { + refine require-client-classes { + description "Subnet require client classes."; + } + } + } + + grouping network-require-client-classes { + description "Require client classes grouping for a shared network."; + uses require-client-classes { + refine require-client-classes { + description "Shared network require client classes."; + } + } + } + + grouping interface { + description "Interface grouping."; + leaf interface { + type string; + description "Interface entry."; + } + } + + grouping subnet-interface { + description "Interface grouping for a subnet."; + uses interface { + refine interface { + description "Name of the network interface this subnet is directly + accessible with (optional)."; + } + } + } + + grouping network-interface { + description "Interface grouping for a shared network."; + uses interface { + refine interface { + description "Specifies the network interface this shared network is + directly accessible with. (optional)"; + } + } + } + + grouping subnet-id { + description "Subnet ID grouping."; + leaf id { + type uint32 { + range 1..max; + } + mandatory true; + description "Subnet ID, a unique identifier used to locate or reference + a subnet."; + } + } + + grouping host-identifier { + description "Host identifier grouping."; + leaf identifier { + type string; + description "Host identifier."; + } + } + + grouping host-hostname { + description "Host DNS name grouping."; + leaf hostname { + type string; + description "Host DNS name."; + } + } + + grouping host-client-classes { + description "Host client classes grouping."; + leaf-list client-classes { + type string; + description "Host client classes (if host identifier matches, a + client's packet will be added to the classes liste + here.)"; + } + } + + grouping host-subnet-id { + description "Host subnet ID grouping."; + leaf subnet-id { + type uint32; + mandatory true; + description "Host subnet ID."; + } + } + + grouping reservation-mode { + description "Reservation mode grouping."; + leaf reservation-mode { + type host-reservation-mode; + description "Reservation mode entry."; + } + } + + grouping interfaces-re-detect { + description "Interfaces re-detect grouping."; + leaf re-detect { + type boolean; + description "Re-detect interfaces at each reconfiguration."; + } + } + + grouping interfaces-service-sockets-require-all { + description "Interfaces service-sockets-require-all grouping."; + leaf service-sockets-require-all { + type boolean; + description "Kea tries to bind the service sockets during initialization. + It may fail due to a port being already opened or + misconfiguration. Kea can suppress these errors and only logs + them. This flag prevents starting the DHCP server without + binding all sockets."; + } + } + + grouping interfaces-service-sockets-max-retries { + description "Interfaces service-sockets-max-retries grouping."; + leaf service-sockets-max-retries { + type uint32; + description "Kea tries to bind the service sockets during initialization. + This option specifies how many times binding to interface + will be retried."; + } + } + + grouping interfaces-service-sockets-retry-wait-time { + description "Interfaces service-sockets-retry-wait-time grouping."; + leaf service-sockets-retry-wait-time { + type uint32; + description "The time interval in milliseconds to wait before the next + attempt to retry opening a service socket."; + } + } + + grouping class-name { + description "Client class name grouping."; + leaf name { + type string; + mandatory true; + description "Name of the client class."; + } + } + + grouping class-test { + description "Client class test grouping."; + leaf test { + type string; + description "Defines an expression that evaluates every incoming + packet."; + } + } + + grouping class-only-if-required { + description "Client class only-if-required grouping."; + leaf only-if-required { + type boolean; + description "Client class only if required flag."; + } + } + + grouping option-def-name { + description "Option definition name grouping."; + leaf name { + type string; + mandatory true; + description "Name of the new option being defined."; + } + } + + grouping option-def-type { + description "Option definition type grouping."; + leaf type { + type string; + mandatory true; + description "Type of the new option being defined (such as + string, record or uint8)."; + } + } + + grouping option-def-record-types { + description "Option definition record types grouping."; + leaf record-types { + type string; + description "Option definition record types."; + } + } + + grouping option-def-encapsulate { + description "Option definition encapsulate grouping."; + leaf encapsulate { + type string; + description "Defines option space this new option encapsulates. + Usually empty."; + } + } + + grouping option-data-name { + description "Option data name grouping."; + leaf name { + type string; + description "Option name."; + } + } + + grouping option-data-data { + description "Option data data grouping."; + leaf data { + type string; + description "Option data."; + } + } + + grouping option-data-csv-format { + description "Option data csv-format grouping."; + leaf csv-format { + type boolean; + description "If true, the option is specified as comma separated + values. If false, it is expected as a hex string."; + } + } + + grouping option-data-always-send { + description "Option data always-send grouping."; + leaf always-send { + type boolean; + description "Defines whether to always send the option, + regardless if the client requested it or not."; + } + } + + grouping option-def-array { + description "Option data array grouping."; + leaf array { + type boolean; + description "Option definition array flag."; + } + } + + grouping decline-probation-period { + description "Decline probation period grouping."; + leaf decline-probation-period { + type uint32; + units "seconds"; + description "Decline probabation period."; + } + } + + grouping network-name { + description "Shared network name grouping."; + leaf name { + type string; + mandatory true; + description "Shared network name."; + } + } + + grouping dhcp4o6-port { + description "DHCPv4-over-DHCPv6 port grouping."; + leaf dhcp4o6-port { + type uint16; + description "DHCPv4-over-DHCPv6 interserver port."; + } + } + + grouping pool-user-context { + description "User context grouping for a pool."; + uses kea:user-context { + refine user-context { + description "Pool user context. Arbitrary JSON data can be + stored here."; + } + } + } + + grouping host-user-context { + description "User context grouping for a host reservation."; + uses kea:user-context { + refine user-context { + description "Host user context. Arbitrary JSON data can be + stored here."; + } + } + } + + grouping subnet-user-context { + description "User context grouping for a subnet."; + uses kea:user-context { + refine user-context { + description "Subnet user context. Arbitrary JSON data can be + stored here."; + } + } + } + + grouping network-user-context { + description "User context grouping for a shared network."; + uses kea:user-context { + refine user-context { + description "Shared network user context. Arbitrary JSON data can be + stored here."; + } + } + } + + grouping interfaces-user-context { + description "User context grouping for interfaces."; + uses kea:user-context { + refine user-context { + description "Interfaces user context. Arbitrary JSON data can + be stored here."; + } + } + } + + grouping class-user-context { + description "User context grouping for a client class."; + uses kea:user-context { + refine user-context { + description "Client class user context. Arbitrary JSON data can + be stored here."; + } + } + } + + grouping option-def-user-context { + description "User context grouping for an option definition."; + uses kea:user-context { + refine user-context { + description "Option definition user context. Arbitrary JSON data + can be stored here."; + } + } + } + + grouping option-data-user-context { + description "User context grouping for an option data."; + uses kea:user-context { + refine user-context { + description "Option user context. Arbitrary JSON data can be + stored here."; + } + } + } + + grouping config-control { + description "Config control grouping."; + container config-control { + description "Config control."; + leaf config-fetch-wait-time { + type uint32; + units "seconds"; + description "Configuration fetch wait time entry."; + } + list config-database { + key database-type; + description "List of databases."; + uses database; + } + } + } + + grouping server-tag { + description "Server tag grouping."; + leaf server-tag { + type string; + description "Server tag."; + } + } + + grouping dhcp-queue-control { + description "DHCP queue control grouping."; + leaf dhcp-queue-control { + type string; + description "DHCP queue control (JSON map)."; + } + } + + grouping store-extended-info { + leaf store-extended-info { + description "whether Kea should store additional client query data e.g. RAI in packets"; + type boolean; + } + } + + grouping compatibility { + container compatibility { + description + "parameters for triggering behaviors compatible with broken or + non-compliant clients, relays or other agents"; + leaf lenient-option-parsing { + type boolean; + description + "enable more lenient option parsing"; + } + } + } + + grouping ddns-generated-prefix { + leaf ddns-generated-prefix { + type string; + description + "the prefix to be prepended to the generated Client FQDN"; + } + } + + grouping ddns-override-client-update { + leaf ddns-override-client-update { + type boolean; + description + "whether to ignore DHCP client requests to update DNS"; + } + } + + grouping ddns-override-no-update { + leaf ddns-override-no-update { + type boolean; + description + "whether to override DHCP client requests to not update DNS"; + } + } + + grouping ddns-qualifying-suffix { + leaf ddns-qualifying-suffix { + type string; + description + "the suffix appended to the partial name sent to the DNS"; + } + } + + grouping ddns-replace-client-name { + leaf ddns-replace-client-name { + type string; + description + "whether the server should honor the hostname or Client FQDN + sent by the client; multiple options are available"; + } + } + + grouping ddns-send-updates { + leaf ddns-send-updates { + type boolean; + description + "whether DDNS updates should be enabled"; + } + } + + grouping ddns-update-on-renew { + leaf ddns-update-on-renew { + type boolean; + description + "whether to update DNS when leases are renewed"; + } + } + + grouping ddns-use-conflict-resolution { + leaf ddns-use-conflict-resolution { + type boolean; + description + "whether RFC 4703 DNS update conflict resolution should be + employed"; + } + } + + grouping ip-reservations-unique { + leaf ip-reservations-unique { + type boolean; + description + "whether Kea should enforce a single reservation per address"; + } + } + + grouping early-global-reservations-lookup { + leaf early-global-reservations-lookup { + type boolean; + description + "whether an early global host reservations lookup should be performed"; + } + } + + grouping reservations-lookup-first { + leaf reservations-lookup-first { + type boolean; + description + "whether host reservations lookup should be performed before lease + lookup"; + } + } + + grouping multi-threading { + container multi-threading { + description + "multi-threading parameters"; + leaf enable-multi-threading { + type boolean; + description + "whether Kea should run on multiple threads or just one"; + } + + leaf packet-queue-size { + type uint32; + description + "the capacity of the packet backlog that threads dequeue from"; + } + + leaf thread-pool-size { + type uint32; + description + "the number of threads Kea should use for packet processing"; + } + } + } + + grouping parked-packet-limit { + leaf parked-packet-limit { + type uint32; + description + "maximum allowed capacity of parked packets"; + } + } + + grouping reservations-global { + leaf reservations-global { + type boolean; + description + "whether Kea should lookup global reservations"; + } + } + + grouping reservations-in-subnet { + leaf reservations-in-subnet { + type boolean; + description + "whether Kea should lookup in-subnet reservations"; + } + } + + grouping reservations-out-of-pool { + leaf reservations-out-of-pool { + type boolean; + description + "whether Kea can assume that all reservations are + out-of-pool"; + } + } + + grouping statistic-default-sample-age { + leaf statistic-default-sample-age { + type uint32; + description + "the maximum number of seconds that samples are kept for"; + } + } + + grouping statistic-default-sample-count { + leaf statistic-default-sample-count { + type uint32; + description + "the maximum number of samples which are kept"; + } + } +} diff --git a/src/share/yang/modules/kea-dhcp4-server@2022-07-27.yang b/src/share/yang/modules/kea-dhcp4-server@2022-07-27.yang new file mode 100644 index 0000000..de56557 --- /dev/null +++ b/src/share/yang/modules/kea-dhcp4-server@2022-07-27.yang @@ -0,0 +1,609 @@ +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 2022-07-27; + } + + 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 2022-07-27 { + description "Added TLS parameters for database connections: trust-anchor, + cert-file, key-file, cipher-list. Added parameters which govern + the way the server behaves regarding detection of configured + interfaces: service-sockets-require-all, + service-sockets-max-retries, service-sockets-retry-wait-time. + Added parameters which govern reservations lookup: + early-global-reservations-lookup, reservations-lookup-first."; + } + + revision 2021-11-24 { + description "Fixed store-extended-info. Added several containers and leaves: + compatibility, lenient-option-parsing, multi-threading, + enable-multi-threading, packet-queue-size, thread-pool-size, + valid-lifetime, min-valid-lifetime, max-valid-lifetime, + preferred-lifetime, min-preferred-lifetime, + max-preferred-lifetime, cache-max-age, cache-threshold, + ddns-generated-prefix, ddns-override-client-update, + ddns-override-no-update, ddns-qualifying-suffix, + ddns-replace-client-name, ddns-send-updates, + ddns-update-on-renew, ddns-use-conflict-resolution, + ip-reservations-unique, parked-packet-limit, + reservations-global, reservations-in-subnet, + reservations-out-of-pool, statistic-default-sample-age, + statistic-default-sample-count, store-extended-info, on-fail."; + } + + revision 2021-08-25 { + description "Added store-extended-info"; + } + + revision 2019-08-12 { + description "Initial revision"; + } + + /* + * 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:cache-max-age; + uses dhcp:cache-threshold; + uses dhcp:ddns-generated-prefix; + uses dhcp:ddns-override-client-update; + uses dhcp:ddns-override-no-update; + uses dhcp:ddns-qualifying-suffix; + uses dhcp:ddns-replace-client-name; + uses dhcp:ddns-send-updates; + uses dhcp:ddns-update-on-renew; + uses dhcp:ddns-use-conflict-resolution; + uses dhcp:hostname-char-replacement; + uses dhcp:hostname-char-set; + uses dhcp:reservations-global; + uses dhcp:reservations-in-subnet; + uses dhcp:reservations-out-of-pool; + uses dhcp:store-extended-info; + 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:valid-lifetime; + uses dhcp:min-valid-lifetime; + uses dhcp:max-valid-lifetime; + 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:cache-max-age; + uses dhcp:cache-threshold; + uses dhcp:ddns-generated-prefix; + uses dhcp:ddns-override-client-update; + uses dhcp:ddns-override-no-update; + uses dhcp:ddns-qualifying-suffix; + uses dhcp:ddns-replace-client-name; + uses dhcp:ddns-send-updates; + uses dhcp:ddns-update-on-renew; + uses dhcp:ddns-use-conflict-resolution; + uses dhcp:hostname-char-replacement; + uses dhcp:hostname-char-set; + uses dhcp:reservations-global; + uses dhcp:reservations-in-subnet; + uses dhcp:reservations-out-of-pool; + uses dhcp:store-extended-info; + 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-service-sockets-require-all; + uses dhcp:interfaces-service-sockets-max-retries; + uses dhcp:interfaces-service-sockets-retry-wait-time; + 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; + uses dhcp:cache-max-age; + uses dhcp:cache-threshold; + uses dhcp:compatibility; + uses dhcp:ddns-generated-prefix; + uses dhcp:ddns-override-client-update; + uses dhcp:ddns-override-no-update; + uses dhcp:ddns-qualifying-suffix; + uses dhcp:ddns-replace-client-name; + uses dhcp:ddns-send-updates; + uses dhcp:ddns-update-on-renew; + uses dhcp:ddns-use-conflict-resolution; + uses dhcp:ip-reservations-unique; + uses dhcp:early-global-reservations-lookup; + uses dhcp:reservations-lookup-first; + uses dhcp:multi-threading; + uses dhcp:parked-packet-limit; + uses dhcp:reservations-global; + uses dhcp:reservations-in-subnet; + uses dhcp:reservations-out-of-pool; + uses dhcp:statistic-default-sample-age; + uses dhcp:statistic-default-sample-count; + uses dhcp:store-extended-info; + } + + /* + * 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-dhcp6-server@2022-07-27.yang b/src/share/yang/modules/kea-dhcp6-server@2022-07-27.yang new file mode 100644 index 0000000..b7f6e7f --- /dev/null +++ b/src/share/yang/modules/kea-dhcp6-server@2022-07-27.yang @@ -0,0 +1,715 @@ +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 2022-07-27; + } + + 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 2022-07-27 { + description "Added TLS parameters for database connections: trust-anchor, + cert-file, key-file, cipher-list. Added parameters which govern + the way the server behaves regarding detection of configured + interfaces: service-sockets-require-all, + service-sockets-max-retries, service-sockets-retry-wait-time. + Added parameters which govern reservations lookup: + early-global-reservations-lookup, reservations-lookup-first."; + } + + revision 2021-11-24 { + description "Fixed store-extended-info. Added several containers and leaves: + compatibility, lenient-option-parsing, multi-threading, + enable-multi-threading, packet-queue-size, thread-pool-size, + valid-lifetime, min-valid-lifetime, max-valid-lifetime, + preferred-lifetime, min-preferred-lifetime, + max-preferred-lifetime, cache-max-age, cache-threshold, + ddns-generated-prefix, ddns-override-client-update, + ddns-override-no-update, ddns-qualifying-suffix, + ddns-replace-client-name, ddns-send-updates, + ddns-update-on-renew, ddns-use-conflict-resolution, + ip-reservations-unique, parked-packet-limit, + reservations-global, reservations-in-subnet, + reservations-out-of-pool, statistic-default-sample-age, + statistic-default-sample-count, store-extended-info, on-fail."; + } + + revision 2021-08-25 { + description "Added store-extended-info"; + } + + revision 2019-08-12 { + description "Initial revision"; + } + + /* + * 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:cache-max-age; + uses dhcp:cache-threshold; + uses dhcp:ddns-generated-prefix; + uses dhcp:ddns-override-client-update; + uses dhcp:ddns-override-no-update; + uses dhcp:ddns-qualifying-suffix; + uses dhcp:ddns-replace-client-name; + uses dhcp:ddns-send-updates; + uses dhcp:ddns-update-on-renew; + uses dhcp:ddns-use-conflict-resolution; + uses dhcp:hostname-char-replacement; + uses dhcp:hostname-char-set; + uses dhcp:reservations-global; + uses dhcp:reservations-in-subnet; + uses dhcp:reservations-out-of-pool; + uses dhcp:store-extended-info; + 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-data-list; + 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: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:cache-max-age; + uses dhcp:cache-threshold; + uses dhcp:ddns-generated-prefix; + uses dhcp:ddns-override-client-update; + uses dhcp:ddns-override-no-update; + uses dhcp:ddns-qualifying-suffix; + uses dhcp:ddns-replace-client-name; + uses dhcp:ddns-send-updates; + uses dhcp:ddns-update-on-renew; + uses dhcp:ddns-use-conflict-resolution; + uses dhcp:hostname-char-replacement; + uses dhcp:hostname-char-set; + uses dhcp:reservations-global; + uses dhcp:reservations-in-subnet; + uses dhcp:reservations-out-of-pool; + uses dhcp:store-extended-info; + 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-service-sockets-require-all; + uses dhcp:interfaces-service-sockets-max-retries; + uses dhcp:interfaces-service-sockets-retry-wait-time; + 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; + uses dhcp:cache-max-age; + uses dhcp:cache-threshold; + uses dhcp:compatibility; + uses dhcp:ddns-generated-prefix; + uses dhcp:ddns-override-client-update; + uses dhcp:ddns-override-no-update; + uses dhcp:ddns-qualifying-suffix; + uses dhcp:ddns-replace-client-name; + uses dhcp:ddns-send-updates; + uses dhcp:ddns-update-on-renew; + uses dhcp:ddns-use-conflict-resolution; + uses dhcp:ip-reservations-unique; + uses dhcp:early-global-reservations-lookup; + uses dhcp:reservations-lookup-first; + uses dhcp:multi-threading; + uses dhcp:parked-packet-limit; + uses dhcp:reservations-global; + uses dhcp:reservations-in-subnet; + uses dhcp:reservations-out-of-pool; + uses dhcp:statistic-default-sample-age; + uses dhcp:statistic-default-sample-count; + uses dhcp:store-extended-info; + } + + /* + * 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-types@2019-08-12.yang b/src/share/yang/modules/kea-types@2019-08-12.yang new file mode 100644 index 0000000..a19c18f --- /dev/null +++ b/src/share/yang/modules/kea-types@2019-08-12.yang @@ -0,0 +1,159 @@ +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"; + } + + /* + * 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/keatest-module@2018-11-20.yang b/src/share/yang/modules/keatest-module@2018-11-20.yang new file mode 100644 index 0000000..8993218 --- /dev/null +++ b/src/share/yang/modules/keatest-module@2018-11-20.yang @@ -0,0 +1,228 @@ +module keatest-module { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:keatest-module"; + prefix tm; + + organization "Sysrepo and ISC"; + description + "ISC imported a test module from Sysrepo tests and adapted it + to kea testing regime."; + contact + "kea-dev@lists.isc.org"; + + revision 2018-11-20 { + description "Initial revision"; + reference ""; + } + + container container { + config true; + list list { + leaf leaf { + type string; + } + leaf key1 { + type string; + } + leaf key2 { + type string; + } + key "key1 key2"; + } + } + + container main { + leaf enum { + type enumeration { + enum "yes" { + value 1; + } + enum "no" { + value 2; + } + enum "maybe" { + value 3; + } + } + } + leaf options { + type bits { + bit strict; + bit recursive; + bit logging; + } + } + leaf raw { + type binary; + } + leaf dec64 { + type decimal64{ + fraction-digits 2; + } + } + leaf i8 { + type int8; + } + leaf i16 { + type int16; + } + leaf i32 { + type int32; + } + leaf i64 { + type int64; + } + leaf ui8 { + type uint8; + } + leaf ui16 { + type uint16; + } + leaf ui32 { + type uint32; + } + leaf ui64 { + type uint64; + } + leaf empty { + type empty; + } + leaf boolean { + type boolean; + } + leaf string { + type string; + } + leaf id_ref { + type identityref { + base base_id; + } + } + leaf-list numbers { + type uint8; + } + leaf instance_id { + type instance-identifier; + } + anyxml xml-data; + anydata any-data; + } + + identity base_id; + + identity id_1 { + base base_id; + } + + identity id_2 { + base base_id; + } + + list list { + key "key"; + leaf key { + type string; + } + leaf id_ref { + type identityref { + base base_id; + } + } + leaf instance_id { + type instance-identifier; + } + leaf union { + type union { + type uint8; + type enumeration { + enum "infinity"; + } + } + } + } + + container kernel-modules { + list kernel-module { + key "name"; + + leaf name { + type string; + } + + leaf location { + type string; + default "/lib/modules"; + } + + leaf loaded { + type boolean; + } + + action load { + input { + leaf params { + mandatory "true"; + type string; + } + leaf force { + type boolean; + default "false"; + when "../../loaded = 'false'"; + } + leaf dry-run { + type boolean; + default false; + } + } + output { + leaf return-code { + type uint8; + } + } + } + } + } + + container presence-container { + presence "presence-container"; + + leaf topleaf1 { + type int8; + } + + leaf topleaf2 { + type int8; + } + + container child1 { + leaf child1-leaf { + type int8; + } + + container grandchild1 { + leaf grandchild1-leaf { + type int8; + default 10; + } + } + } + + container child2 { + leaf child2-leaf { + type int8; + } + + container grandchild2 { + leaf grandchild2-leaf1 { + type int8; + } + leaf grandchild2-leaf2 { + type int8; + } + leaf grandchild2-leaf3 { + type int8; + } + } + } + } +} diff --git a/src/share/yang/modules/utils/Makefile.am b/src/share/yang/modules/utils/Makefile.am new file mode 100644 index 0000000..277f93d --- /dev/null +++ b/src/share/yang/modules/utils/Makefile.am @@ -0,0 +1,27 @@ +SUBDIRS = . + +yangdir = ${datarootdir}/${PACKAGE_NAME}/yang/modules/utils + +yang_list = +yang_list += check-hashes.sh +yang_list += check-revisions.sh + +EXTRA_DIST = ${yang_list} + +if HAVE_SYSREPO + +yang_SCRIPTS = reinstall.sh + +# Shell tests +SHTESTS = +SHTESTS += check-hashes.sh +SHTESTS += check-revisions.sh + +# Run shell tests on "make check". +check_SCRIPTS = $(SHTESTS) +TESTS = $(SHTESTS) + +# Don't install tests. +noinst_SCRIPTS = $(SHTESTS) + +endif diff --git a/src/share/yang/modules/utils/Makefile.in b/src/share/yang/modules/utils/Makefile.in new file mode 100644 index 0000000..00edbb2 --- /dev/null +++ b/src/share/yang/modules/utils/Makefile.in @@ -0,0 +1,906 @@ +# Makefile.in generated by automake 1.16.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2018 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/share/yang/modules/utils +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4macros/ax_boost_for_kea.m4 \ + $(top_srcdir)/m4macros/ax_cpp11.m4 \ + $(top_srcdir)/m4macros/ax_crypto.m4 \ + $(top_srcdir)/m4macros/ax_find_library.m4 \ + $(top_srcdir)/m4macros/ax_gssapi.m4 \ + $(top_srcdir)/m4macros/ax_gtest.m4 \ + $(top_srcdir)/m4macros/ax_isc_rpath.m4 \ + $(top_srcdir)/m4macros/ax_sysrepo.m4 \ + $(top_srcdir)/m4macros/libtool.m4 \ + $(top_srcdir)/m4macros/ltoptions.m4 \ + $(top_srcdir)/m4macros/ltsugar.m4 \ + $(top_srcdir)/m4macros/ltversion.m4 \ + $(top_srcdir)/m4macros/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = reinstall.sh +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(yangdir)" +SCRIPTS = $(noinst_SCRIPTS) $(yang_SCRIPTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir distdir-am +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red='[0;31m'; \ + grn='[0;32m'; \ + lgn='[1;32m'; \ + blu='[1;34m'; \ + mgn='[0;35m'; \ + brg='[1m'; \ + std='[m'; \ + fi; \ +} +DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/reinstall.sh.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ASCIIDOC = @ASCIIDOC@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BOOST_INCLUDES = @BOOST_INCLUDES@ +BOOST_LIBS = @BOOST_LIBS@ +BOTAN_TOOL = @BOTAN_TOOL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONTRIB_DIR = @CONTRIB_DIR@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CRYPTO_CFLAGS = @CRYPTO_CFLAGS@ +CRYPTO_INCLUDES = @CRYPTO_INCLUDES@ +CRYPTO_LDFLAGS = @CRYPTO_LDFLAGS@ +CRYPTO_LIBS = @CRYPTO_LIBS@ +CRYPTO_PACKAGE = @CRYPTO_PACKAGE@ +CRYPTO_RPATH = @CRYPTO_RPATH@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DISTCHECK_BOOST_CONFIGURE_FLAG = @DISTCHECK_BOOST_CONFIGURE_FLAG@ +DISTCHECK_CONTRIB_CONFIGURE_FLAG = @DISTCHECK_CONTRIB_CONFIGURE_FLAG@ +DISTCHECK_CRYPTO_CONFIGURE_FLAG = @DISTCHECK_CRYPTO_CONFIGURE_FLAG@ +DISTCHECK_GTEST_CONFIGURE_FLAG = @DISTCHECK_GTEST_CONFIGURE_FLAG@ +DISTCHECK_KEA_SHELL_CONFIGURE_FLAG = @DISTCHECK_KEA_SHELL_CONFIGURE_FLAG@ +DISTCHECK_LOG4CPLUS_CONFIGURE_FLAG = @DISTCHECK_LOG4CPLUS_CONFIGURE_FLAG@ +DISTCHECK_PERFDHCP_CONFIGURE_FLAG = @DISTCHECK_PERFDHCP_CONFIGURE_FLAG@ +DISTCHECK_PREMIUM_CONFIGURE_FLAG = @DISTCHECK_PREMIUM_CONFIGURE_FLAG@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GENHTML = @GENHTML@ +GREP = @GREP@ +GSSAPI_CFLAGS = @GSSAPI_CFLAGS@ +GSSAPI_LIBS = @GSSAPI_LIBS@ +GTEST_CONFIG = @GTEST_CONFIG@ +GTEST_INCLUDES = @GTEST_INCLUDES@ +GTEST_LDADD = @GTEST_LDADD@ +GTEST_LDFLAGS = @GTEST_LDFLAGS@ +GTEST_SOURCE = @GTEST_SOURCE@ +HAVE_SYSREPO = @HAVE_SYSREPO@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KEA_CXXFLAGS = @KEA_CXXFLAGS@ +KEA_SRCID = @KEA_SRCID@ +KRB5_CONFIG = @KRB5_CONFIG@ +LCOV = @LCOV@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOG4CPLUS_INCLUDES = @LOG4CPLUS_INCLUDES@ +LOG4CPLUS_LIBS = @LOG4CPLUS_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MYSQL_CPPFLAGS = @MYSQL_CPPFLAGS@ +MYSQL_LIBS = @MYSQL_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_TYPE = @PACKAGE_VERSION_TYPE@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PDFLATEX = @PDFLATEX@ +PERL = @PERL@ +PGSQL_CPPFLAGS = @PGSQL_CPPFLAGS@ +PGSQL_LIBS = @PGSQL_LIBS@ +PKGPYTHONDIR = @PKGPYTHONDIR@ +PKG_CONFIG = @PKG_CONFIG@ +PLANTUML = @PLANTUML@ +PREMIUM_DIR = @PREMIUM_DIR@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SED = @SED@ +SEP = @SEP@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SPHINXBUILD = @SPHINXBUILD@ +SRPD_PLUGINS_PATH = @SRPD_PLUGINS_PATH@ +SR_REPO_PATH = @SR_REPO_PATH@ +STRIP = @STRIP@ +SYSREPOCPP_VERSION = @SYSREPOCPP_VERSION@ +SYSREPO_CPPFLAGS = @SYSREPO_CPPFLAGS@ +SYSREPO_INCLUDEDIR = @SYSREPO_INCLUDEDIR@ +SYSREPO_LIBS = @SYSREPO_LIBS@ +SYSREPO_VERSION = @SYSREPO_VERSION@ +USE_LCOV = @USE_LCOV@ +VALGRIND = @VALGRIND@ +VERSION = @VERSION@ +WARNING_GCC_44_STRICT_ALIASING_CFLAG = @WARNING_GCC_44_STRICT_ALIASING_CFLAG@ +YACC = @YACC@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = . +yangdir = ${datarootdir}/${PACKAGE_NAME}/yang/modules/utils +yang_list = check-hashes.sh check-revisions.sh +EXTRA_DIST = ${yang_list} +@HAVE_SYSREPO_TRUE@yang_SCRIPTS = reinstall.sh + +# Shell tests +@HAVE_SYSREPO_TRUE@SHTESTS = check-hashes.sh check-revisions.sh + +# Run shell tests on "make check". +@HAVE_SYSREPO_TRUE@check_SCRIPTS = $(SHTESTS) +@HAVE_SYSREPO_TRUE@TESTS = $(SHTESTS) + +# Don't install tests. +@HAVE_SYSREPO_TRUE@noinst_SCRIPTS = $(SHTESTS) +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/share/yang/modules/utils/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/share/yang/modules/utils/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +reinstall.sh: $(top_builddir)/config.status $(srcdir)/reinstall.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +install-yangSCRIPTS: $(yang_SCRIPTS) + @$(NORMAL_INSTALL) + @list='$(yang_SCRIPTS)'; test -n "$(yangdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(yangdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(yangdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(yangdir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(yangdir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-yangSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(yang_SCRIPTS)'; test -n "$(yangdir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + dir='$(DESTDIR)$(yangdir)'; $(am__uninstall_files_from_dir) + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + fi; \ + echo "$${col}$$dashes$${std}"; \ + echo "$${col}$$banner$${std}"; \ + test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ + test -z "$$report" || echo "$${col}$$report$${std}"; \ + echo "$${col}$$dashes$${std}"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-recursive +all-am: Makefile $(SCRIPTS) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(yangdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-yangSCRIPTS + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-yangSCRIPTS + +.MAKE: $(am__recursive_targets) check-am install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-TESTS check-am clean clean-generic clean-libtool \ + cscopelist-am ctags ctags-am distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip install-yangSCRIPTS \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-yangSCRIPTS + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/src/share/yang/modules/utils/check-hashes.sh b/src/share/yang/modules/utils/check-hashes.sh new file mode 100755 index 0000000..968289d --- /dev/null +++ b/src/share/yang/modules/utils/check-hashes.sh @@ -0,0 +1,54 @@ +#!/bin/sh + +# Copyright (C) 2018-2022 Internet Systems Consortium, Inc. ("ISC") +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +# Check hashes +# +# This developer script verifies recorded hashes still match the +# result of SHA-256 checksums of the YIN format. +# Requires yanglint to translate YANG to YIN formats and openssl +# for a system independent SHA-256. + +# Exit with error if commands exit with non-zero and if undefined variables are +# used. +set -eu + +# Change directory to the YANG modules' directory. +script_path=$(cd "$(dirname "${0}")" && pwd) +cd "${script_path}/.." + +amend=false +if test "${1-}" = '-a' || test "${1-}" = '--amend'; then + amend=true +fi + +exit_code=0 +for m in *.yang +do + hash1=$(yanglint -f yin "${m}" | openssl dgst -sha256 | sed 's/(stdin)= //' | sed 's/SHA2-256//') + h="hashes/$(basename "${m}" .yang).hash" + if test -f "${h}" + then + hash2=$(cat "${h}") + if test "$hash1" != "$hash2" + then + exit_code=$((exit_code | 1)) + printf 'hash mismatch on %s expected %s in %s\n' "${m}" "${hash1}" "${h}" + if "${amend}"; then + printf '%s\n' "${hash1}" > "${h}" + fi + fi + else + exit_code=$((exit_code | 2)) + printf 'missing hash file %s for %s\n' "${h}" "${m}" + if "${amend}"; then + printf '%s\n' "${hash1}" > "${h}" + fi + fi +done + +exit "${exit_code}" diff --git a/src/share/yang/modules/utils/check-revisions.sh b/src/share/yang/modules/utils/check-revisions.sh new file mode 100755 index 0000000..04c9615 --- /dev/null +++ b/src/share/yang/modules/utils/check-revisions.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +# Copyright (C) 2018-2020 Internet Systems Consortium, Inc. ("ISC") +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +# Check revisions +# +# This developer script verifies versions in module contents match +# the version in the name. +# Requires yanglint to translate YANG to YIN formats. +# Fixme: use xlstproc to extract the revision. + +# Exit with error if commands exit with non-zero and if undefined variables are +# used. +set -eu + +# Change directory to the YANG modules' directory. +script_path=$(cd "$(dirname "${0}")" && pwd) +cd "${script_path}/.." + +error=0 +for m in *.yang +do + rev1=$(yanglint -f yin "${m}" | grep '<revision date=' | head -1 | sed \ + 's/.*<revision date="\([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]\)".*/\1/') + rev2=$(echo "${m}" | sed \ + 's/.*@\([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]\)\..*/\1/') + + if test "${rev1}" != "${rev2}" + then + error=1 + printf 'revision mismatch on %s got %s\n' "${m}" "${rev1}" + fi +done +exit $error diff --git a/src/share/yang/modules/utils/reinstall.sh.in b/src/share/yang/modules/utils/reinstall.sh.in new file mode 100644 index 0000000..5924a6c --- /dev/null +++ b/src/share/yang/modules/utils/reinstall.sh.in @@ -0,0 +1,169 @@ +#!/bin/sh + +# Copyright (C) 2021 Internet Systems Consortium, Inc. ("ISC") +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +# Usage: +# +# reinstall.sh [-d|--debug] [-h|--help] [-s|--sysrepo ${SYSREPO_INSTALLATION}] + +# Exit with error if commands exit with non-zero and if undefined variables are +# used. +set -eu + +# Print usage. +# Expressions don't expand in single quotes, use double quotes for that. [SC2016] +# shellcheck disable=SC2016 +print_usage() { + printf \ +'Usage: %s {{options}} +Options: + [-d|--debug] enable debug mode, showing every executed command + [-h|--help] print usage (this text) + [-s|--sysrepo ${SYSREPO_INSTALLATION}] point to sysrepo installation which is needed for sysrepoctl + [-u|--uninstall-first] uninstall before installing +' \ + "$(basename "${0}")" +} + +# Define some ANSI color codes. +if test -t 1; then + red='\033[91m' + reset='\033[0m' +else + red= + reset= +fi + +# Parse parameters. +while test ${#} -gt 0; do + case "${1}" in + # [-d|--debug] enable debug mode, showing every executed command + '-d'|'--debug') set -vx ;; + + # [-h|--help] print usage (this text) + '-h'|'--help') print_usage; exit 0 ;; + + # [-s|--sysrepo ${SYSREPO_INSTALLATION}] point to sysrepo installation which is needed for sysrepoctl + '-s'|'--sysrepo') shift; sysrepo=${1} ;; + + # [-u|--uninstall-first] uninstall before installing + '-u'|'--uninstall-first') uninstall_first=true ;; + + # Unrecognized argument + *) + printf "${red}ERROR: Unrecognized argument '%s'${reset}\\n" "${1}" 1>&2; print_usage; exit 1 ;; + esac; shift +done + +# Default arguments +test -z "${sysrepo+x}" && sysrepo='/usr/local' +test -z "${uninstall_first+x}" && uninstall_first='false' + +#------------------------------------------------------------------------------# + +# Get script path. +script_path=$(cd "$(dirname "${0}")" && pwd) + +# shellcheck disable=SC2034 +# prefix appears unused. Verify use (or export if used externally). +# reason: prefix is used in datarootdir (@datarootdir@) below. +prefix="@prefix@" + +# Find modules location. +# If script is in sources, use modules from sources. +# If script is in installation, use modules from installation. +for i in \ + "@datarootdir@/@PACKAGE_NAME@/yang/modules" \ + "@abs_top_builddir@/src/share/yang/modules" \ +; do + if test "${script_path}" = "${i}/utils"; then + modules="${i}" + break + fi +done +if test -z "${modules+x}"; then + printf 'ERROR: cannot find location of modules. Use this script from sources or from installation.' >&2 + exit 1 +fi + +# sysrepoctl does not set its rpath. Set LD_LIBRARY_PATH instead. +export LD_LIBRARY_PATH="${LD_LIBRARY_PATH-}:${sysrepo}/lib:${sysrepo}/lib64" + +# Check if module is installed. +is_module_installed() { + module=${1} + if test "$("${sysrepo}/bin/sysrepoctl" -l | grep -F '| I' | cut -d ' ' -f 1 | tail -n +7 | head -n -1 | grep -Ec "^${module}")" -eq 0; then + # not installed + return 1 + fi + # installed + return 0 +} + +# Install a module from the Kea sources. Should upgrade automatically to a newer +# revision. +install_kea_module() { + module=${1} + + if is_module_installed "${module}"; then + # Upgrade. + flag="-U" + else + # Install. + flag="-i" + fi + + # Find a module starting with given name and act on it. + find "${modules}" -maxdepth 1 -type f -name "${module}*.yang" -exec \ + "${sysrepo}/bin/sysrepoctl" "${flag}" {} -s "${modules}" -v 4 \; +} + +# Uninstall a module if installed. +uninstall_module() { + module=${1} + if ! is_module_installed "${module}"; then + return; + fi + "${sysrepo}/bin/sysrepoctl" -u "${module}" -v 4 +} + +# Install all YANG modules in dependency order. +install_yang_modules() { + install_kea_module 'keatest-module' + install_kea_module 'ietf-interfaces' + install_kea_module 'ietf-dhcpv6-common' + install_kea_module 'ietf-dhcpv6-client' + install_kea_module 'ietf-dhcpv6-relay' + install_kea_module 'ietf-dhcpv6-server' + install_kea_module 'ietf-yang-types' + install_kea_module 'ietf-dhcpv6-options' + install_kea_module 'ietf-dhcpv6-types' + install_kea_module 'ietf-inet-types' + install_kea_module 'kea-types' + install_kea_module 'kea-dhcp-types' + install_kea_module 'kea-dhcp-ddns' + install_kea_module 'kea-ctrl-agent' + install_kea_module 'kea-dhcp4-server' + install_kea_module 'kea-dhcp6-server' +} + +# Uninstall all YANG modules in reverse dependency order. Only uninstalls Kea +# modules. IETF modules might be dependencies to sysrepo internal modules. +uninstall_yang_modules() { + uninstall_module 'kea-dhcp6-server' + uninstall_module 'kea-dhcp4-server' + uninstall_module 'kea-ctrl-agent' + uninstall_module 'kea-dhcp-ddns' + uninstall_module 'kea-dhcp-types' + uninstall_module 'kea-types' + uninstall_module 'keatest-module' +} + +if "${uninstall_first}"; then + uninstall_yang_modules +fi +install_yang_modules |