From 688c536fb3bd933f27324b68dfc756a0cccc9269 Mon Sep 17 00:00:00 2001 From: Ruslan Babayev Date: Sun, 17 Oct 2021 22:03:46 -0700 Subject: yang: confd: compile yang modules to fxs Signed-off-by: Ruslan Babayev --- yang/subdir.am | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'yang') diff --git a/yang/subdir.am b/yang/subdir.am index a2243fb8e..0f2bb0027 100644 --- a/yang/subdir.am +++ b/yang/subdir.am @@ -97,3 +97,29 @@ CLEANFILES += \ yang/ietf/*.c \ yang/confd/*.c \ # + +if CONFD + +SUBMODULES = $(shell cd $(top_srcdir); grep -l belongs-to $(dist_yangmodels_DATA)) +EXCLUDED_MODULES = $(SUBMODULES) yang/frr-module-translator.yang +YANG_MODULES = $(filter-out $(EXCLUDED_MODULES),$(dist_yangmodels_DATA)) + +fxsdir = $(sysconfdir)/confd +fxs_DATA = $(YANG_MODULES:.yang=.fxs) + +SUFFIXES += .fxs +CLEANFILES += $(fxs_DATA) + +AM_V_CONFDC = $(AM_V_CONFDC_@AM_V@) +AM_V_CONFDC_ = $(AM_V_CONFDC_@AM_DEFAULT_V@) +AM_V_CONFDC_0 = @echo " CONFDC " $@; + +CONFDC_FLAGS = --yangpath $(srcdir)/yang --yangpath $(srcdir)/yang/ietf + +yang/%.fxs: yang/%.yang yang/confd/confd.%.yang + $(AM_V_CONFDC)$(CONFDC) $(CONFDC_FLAGS) -c -o $@ -a $(srcdir)/yang/confd/confd.$*.yang -- $< + +yang/%.fxs: yang/%.yang + $(AM_V_CONFDC)$(CONFDC) $(CONFDC_FLAGS) -c -o $@ -- $< + +endif -- cgit v1.2.3 From 084dfdc03c379007630b6baddd02c7887df88d61 Mon Sep 17 00:00:00 2001 From: Ruslan Babayev Date: Sun, 17 Oct 2021 22:17:04 -0700 Subject: yang, ripd, ripngd: fix annotate statements Add missing annotate-statement for the 'instance' list. Signed-off-by: Ruslan Babayev --- yang/confd/confd.frr-ripd.yang | 6 ++++-- yang/confd/confd.frr-ripngd.yang | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'yang') diff --git a/yang/confd/confd.frr-ripd.yang b/yang/confd/confd.frr-ripd.yang index 9b21c0756..7bbe54cca 100644 --- a/yang/confd/confd.frr-ripd.yang +++ b/yang/confd/confd.frr-ripd.yang @@ -11,8 +11,10 @@ module confd.frr-ripd { tailf:annotate-module "frr-ripd" { tailf:annotate-statement "container[name='ripd']" { - tailf:annotate-statement "container[name='state']" { - tailf:callpoint "state"; + tailf:annotate-statement "list[name='instance']" { + tailf:annotate-statement "container[name='state']" { + tailf:callpoint "state"; + } } } tailf:annotate-statement "rpc[name='clear-rip-route']" { diff --git a/yang/confd/confd.frr-ripngd.yang b/yang/confd/confd.frr-ripngd.yang index 5d876ff4d..83383fb45 100644 --- a/yang/confd/confd.frr-ripngd.yang +++ b/yang/confd/confd.frr-ripngd.yang @@ -11,8 +11,10 @@ module confd.frr-ripngd { tailf:annotate-module "frr-ripngd" { tailf:annotate-statement "container[name='ripngd']" { - tailf:annotate-statement "container[name='state']" { - tailf:callpoint "state"; + tailf:annotate-statement "list[name='instance']" { + tailf:annotate-statement "container[name='state']" { + tailf:callpoint "state"; + } } } tailf:annotate-statement "rpc[name='clear-ripng-route']" { -- cgit v1.2.3 From 3f5af3d50be7ae17fbb35ca672bc5c47fbea4d69 Mon Sep 17 00:00:00 2001 From: Ruslan Babayev Date: Sun, 17 Oct 2021 22:19:34 -0700 Subject: yang, bgpd: add missing includes Signed-off-by: Ruslan Babayev --- yang/frr-bgp-bmp.yang | 2 ++ yang/frr-bgp-common-structure.yang | 2 ++ yang/frr-bgp-neighbor.yang | 4 ++++ yang/frr-bgp-peer-group.yang | 4 ++++ 4 files changed, 12 insertions(+) (limited to 'yang') diff --git a/yang/frr-bgp-bmp.yang b/yang/frr-bgp-bmp.yang index 2417874ea..cf945cabe 100644 --- a/yang/frr-bgp-bmp.yang +++ b/yang/frr-bgp-bmp.yang @@ -13,6 +13,8 @@ submodule frr-bgp-bmp { prefix frr-bt; } + include "frr-bgp-common-multiprotocol"; + organization "FRRouting"; contact diff --git a/yang/frr-bgp-common-structure.yang b/yang/frr-bgp-common-structure.yang index 2ad22a143..3378c10c0 100644 --- a/yang/frr-bgp-common-structure.yang +++ b/yang/frr-bgp-common-structure.yang @@ -25,6 +25,8 @@ submodule frr-bgp-common-structure { prefix frr-bt; } + include "frr-bgp-common"; + organization "FRRouting"; contact diff --git a/yang/frr-bgp-neighbor.yang b/yang/frr-bgp-neighbor.yang index 03af643ba..6d7358066 100644 --- a/yang/frr-bgp-neighbor.yang +++ b/yang/frr-bgp-neighbor.yang @@ -5,6 +5,10 @@ submodule frr-bgp-neighbor { prefix "bgp"; } + include "frr-bgp-common-multiprotocol"; + + include "frr-bgp-common-structure"; + organization "FRRouting"; contact diff --git a/yang/frr-bgp-peer-group.yang b/yang/frr-bgp-peer-group.yang index 80c9ecff2..15c31bf01 100644 --- a/yang/frr-bgp-peer-group.yang +++ b/yang/frr-bgp-peer-group.yang @@ -13,6 +13,10 @@ submodule frr-bgp-peer-group { prefix frr-bt; } + include "frr-bgp-common-structure"; + + include "frr-bgp-neighbor"; + organization "FRRouting"; contact -- cgit v1.2.3 From 56fd4d34602a2da6fc9514df819e2f8e510d619f Mon Sep 17 00:00:00 2001 From: Ruslan Babayev Date: Sun, 17 Oct 2021 22:20:06 -0700 Subject: yang, ospfd: build frr-ospfd.yang when ospfd is enabled Signed-off-by: Ruslan Babayev --- yang/subdir.am | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'yang') diff --git a/yang/subdir.am b/yang/subdir.am index 0f2bb0027..828ebd908 100644 --- a/yang/subdir.am +++ b/yang/subdir.am @@ -88,6 +88,10 @@ dist_yangmodels_DATA += yang/frr-bgp-types.yang dist_yangmodels_DATA += yang/frr-bgp.yang endif +if OSPFD +dist_yangmodels_DATA += yang/frr-ospfd.yang +endif + if PATHD dist_yangmodels_DATA += yang/frr-pathd.yang endif -- cgit v1.2.3 From 99d0e85479df6c310e99e1ddb603aa3097ef31cb Mon Sep 17 00:00:00 2001 From: Ruslan Babayev Date: Mon, 1 Nov 2021 19:41:59 -0700 Subject: yang: fix frr-routing prefix Signed-off-by: Ruslan Babayev --- yang/frr-routing.yang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'yang') diff --git a/yang/frr-routing.yang b/yang/frr-routing.yang index f8441669a..6a721b292 100644 --- a/yang/frr-routing.yang +++ b/yang/frr-routing.yang @@ -1,7 +1,7 @@ module frr-routing { yang-version "1.1"; namespace "http://frrouting.org/yang/routing"; - prefix "rt"; + prefix "frr-routing"; import ietf-yang-types { prefix "yang"; -- cgit v1.2.3