build, yang: bump libyang minimum required version to 1.0.184

It's time to say good bye to libyang 0.16.105. The recently
released libyang 1.0.184 includes numerous bug fixes and performance
improvements that we need.

Despite the major version bump from 0.x to 1.x, the libyang API is
the same except for a single backward-incompatible change in the
user types interface (which we're currently not using). Hence no
code changes were necessary to adapt FRR to libyang 1.x.

This commit also reintroduces some leafrefs that needed to be
removed from our YANG modules due to a bug that was present on
libyang 0.16.105.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This commit is contained in:
Renato Westphal 2020-05-09 14:24:20 -03:00
parent cd211e2049
commit 240b7826f6
9 changed files with 16 additions and 34 deletions

View File

@ -1740,8 +1740,8 @@ AC_SUBST([SNMP_CFLAGS])
dnl --------------- dnl ---------------
dnl libyang dnl libyang
dnl --------------- dnl ---------------
PKG_CHECK_MODULES([LIBYANG], [libyang >= 0.16.105], , [ PKG_CHECK_MODULES([LIBYANG], [libyang >= 1.0.184], , [
AC_MSG_ERROR([libyang (>= 0.16.105) was not found on your system.]) AC_MSG_ERROR([libyang (>= 1.0.184) was not found on your system.])
]) ])
ac_cflags_save="$CFLAGS" ac_cflags_save="$CFLAGS"
CFLAGS="$CFLAGS $LIBYANG_CFLAGS" CFLAGS="$CFLAGS $LIBYANG_CFLAGS"

2
debian/control vendored
View File

@ -24,7 +24,7 @@ Build-Depends:
libsnmp-dev, libsnmp-dev,
libssh-dev <!pkg.frr.nortrlib>, libssh-dev <!pkg.frr.nortrlib>,
libsystemd-dev <!pkg.frr.nosystemd>, libsystemd-dev <!pkg.frr.nosystemd>,
libyang-dev (>= 0.16.74), libyang-dev (>= 1.0.184),
pkg-config, pkg-config,
python3, python3,
python3-dev, python3-dev,

View File

@ -10,7 +10,7 @@ The FRR project builds binary ``libyang`` packages, which we offer for download
.. warning:: .. warning::
``libyang`` version 0.16.105 or newer is required to build FRR. ``libyang`` version 1.0.184 or newer is required to build FRR.
.. note:: .. note::
@ -51,7 +51,3 @@ The FRR project builds binary ``libyang`` packages, which we offer for download
make make
sudo make install sudo make install
When building ``libyang`` version ``0.16.x`` it's also necessary to pass the
``-DENABLE_CACHE=OFF`` parameter to ``cmake`` to work around a
`known bug <https://github.com/CESNET/libyang/issues/752>`_ in libyang.

View File

@ -170,7 +170,7 @@ BuildRequires: make
BuildRequires: ncurses-devel BuildRequires: ncurses-devel
BuildRequires: readline-devel BuildRequires: readline-devel
BuildRequires: texinfo BuildRequires: texinfo
BuildRequires: libyang-devel >= 0.16.74 BuildRequires: libyang-devel >= 1.0.184
%if 0%{?rhel} && 0%{?rhel} < 7 %if 0%{?rhel} && 0%{?rhel} < 7
#python27-devel is available from ius community repo for RedHat/CentOS 6 #python27-devel is available from ius community repo for RedHat/CentOS 6
BuildRequires: python27-devel BuildRequires: python27-devel

View File

@ -300,11 +300,7 @@ module frr-interface {
} }
leaf vrf { leaf vrf {
type string { type frr-vrf:vrf-ref;
length "1..16";
}
/* yang version 0.16 having issue accessing leafref. */
/* type frr-vrf:vrf-ref;*/
description description
"VRF this interface is associated with."; "VRF this interface is associated with.";
} }

View File

@ -143,7 +143,7 @@ module frr-ripd {
"Enable RIP on the specified IP network."; "Enable RIP on the specified IP network.";
} }
leaf-list interface { leaf-list interface {
type string; type frr-interface:interface-ref;
description description
"Enable RIP on the specified interface."; "Enable RIP on the specified interface.";
} }
@ -204,14 +204,14 @@ module frr-ripd {
} }
leaf-list passive-interface { leaf-list passive-interface {
when "../passive-default = 'false'"; when "../passive-default = 'false'";
type string; type frr-interface:interface-ref;
description description
"A list of interfaces where the sending of RIP packets "A list of interfaces where the sending of RIP packets
is disabled."; is disabled.";
} }
leaf-list non-passive-interface { leaf-list non-passive-interface {
when "../passive-default = 'true'"; when "../passive-default = 'true'";
type string; type frr-interface:interface-ref;
description description
"A list of interfaces where the sending of RIP packets "A list of interfaces where the sending of RIP packets
is enabled."; is enabled.";

View File

@ -101,7 +101,7 @@ module frr-ripngd {
"Enable RIPng on the specified IPv6 network."; "Enable RIPng on the specified IPv6 network.";
} }
leaf-list interface { leaf-list interface {
type string; type frr-interface:interface-ref;
description description
"Enable RIPng on the specified interface."; "Enable RIPng on the specified interface.";
} }

View File

@ -249,7 +249,7 @@ module frr-route-map {
case interface { case interface {
when "./condition = 'interface'"; when "./condition = 'interface'";
leaf interface { leaf interface {
type string; type frr-interface:interface-ref;
} }
} }

View File

@ -393,9 +393,7 @@ module frr-zebra {
} }
leaf vrf { leaf vrf {
type string { type frr-vrf:vrf-ref;
length "1..36";
}
description description
"The tenant VRF."; "The tenant VRF.";
} }
@ -715,9 +713,7 @@ module frr-zebra {
choice vrf-choice { choice vrf-choice {
case single { case single {
leaf vrf { leaf vrf {
type string { type frr-vrf:vrf-ref;
length "1..36";
}
description description
"Retrieve routes in a non-default vrf."; "Retrieve routes in a non-default vrf.";
} }
@ -815,9 +811,7 @@ module frr-zebra {
choice vrf-choice { choice vrf-choice {
case single { case single {
leaf vrf { leaf vrf {
type string { type frr-vrf:vrf-ref;
length "1..36";
}
description description
"Retrieve routes in a non-default vrf."; "Retrieve routes in a non-default vrf.";
} }
@ -853,9 +847,7 @@ module frr-zebra {
output { output {
list vrf-list { list vrf-list {
leaf name { leaf name {
type string { type frr-vrf:vrf-ref;
length "1..36";
}
description description
"The VRF name"; "The VRF name";
} }
@ -910,9 +902,7 @@ module frr-zebra {
output { output {
list vrf-vni-list { list vrf-vni-list {
leaf vrf-name { leaf vrf-name {
type string { type frr-vrf:vrf-ref;
length "1..36";
}
description description
"The VRF name."; "The VRF name.";
} }