diff --git a/debian/frr.install b/debian/frr.install index 044b484984..02912d448d 100644 --- a/debian/frr.install +++ b/debian/frr.install @@ -8,6 +8,7 @@ usr/bin/vtysh usr/lib/*/frr/libfrr.* usr/lib/*/frr/libfrrcares.* usr/lib/*/frr/libfrrospfapiclient.* +usr/lib/*/frr/libmgmt_be_nb.* usr/lib/*/frr/modules/bgpd_bmp.so usr/lib/*/frr/modules/dplane_fpm_nl.so usr/lib/*/frr/modules/zebra_cumulus_mlag.so diff --git a/mgmtd/subdir.am b/mgmtd/subdir.am index 2387917f99..d56fd93450 100644 --- a/mgmtd/subdir.am +++ b/mgmtd/subdir.am @@ -14,6 +14,13 @@ clippy_scan += \ mgmtd/mgmt_vty.c \ # end +lib_LTLIBRARIES += mgmtd/libmgmt_be_nb.la +nodist_mgmtd_libmgmt_be_nb_la_SOURCES = \ + # end +mgmtd_libmgmt_be_nb_la_CFLAGS = $(AM_CFLAGS) -DINCLUDE_MGMTD_CMDDEFS_ONLY +mgmtd_libmgmt_be_nb_la_CPPFLAGS = $(AM_CPPFLAGS) -DINCLUDE_MGMTD_CMDDEFS_ONLY +mgmtd_libmgmt_be_nb_la_LDFLAGS = -version-info 0:0:0 + noinst_LIBRARIES += mgmtd/libmgmtd.a mgmtd_libmgmtd_a_SOURCES = \ mgmtd/mgmt.c \ @@ -52,3 +59,4 @@ mgmtd_mgmtd_SOURCES = \ # end mgmtd_mgmtd_CFLAGS = $(AM_CFLAGS) -I ./ mgmtd_mgmtd_LDADD = mgmtd/libmgmtd.a lib/libfrr.la $(LIBCAP) $(LIBM) $(LIBYANG_LIBS) $(UST_LIBS) +mgmtd_mgmtd_LDADD += mgmtd/libmgmt_be_nb.la diff --git a/python/xref2vtysh.py b/python/xref2vtysh.py index a4f8560bb0..b5873a3aac 100644 --- a/python/xref2vtysh.py +++ b/python/xref2vtysh.py @@ -325,7 +325,17 @@ class CommandEntry: def load(cls, xref): nodes = NodeDict() + mgmtname = "mgmtd/libmgmt_be_nb.la" for cmd_name, origins in xref.get("cli", {}).items(): + # If mgmtd has a yang version of a CLI command, make it the only daemon + # to handle it. For now, daemons can still be compiling their cmds into the + # binaries to allow for running standalone with CLI config files. When they + # do this they will also be present in the xref file, but we want to ignore + # those in vtysh. + if "yang" in origins.get(mgmtname, {}).get("attrs", []): + CommandEntry.process(nodes, cmd_name, mgmtname, origins[mgmtname]) + continue + for origin, spec in origins.items(): CommandEntry.process(nodes, cmd_name, origin, spec) return nodes