summaryrefslogtreecommitdiffstats
path: root/vtysh
diff options
context:
space:
mode:
authorChristian Franke <chris@opensourcerouting.org>2018-03-22 14:44:01 +0100
committerChristian Franke <chris@opensourcerouting.org>2018-09-05 11:38:12 +0200
commitef020087a502267607ee746c0ca2b2a0d92e4ec0 (patch)
treef2590232c8a87d2e5c177f325fde7399528d1dbf /vtysh
parentvtysh: support fabricd (diff)
downloadfrr-ef020087a502267607ee746c0ca2b2a0d92e4ec0.tar.xz
frr-ef020087a502267607ee746c0ca2b2a0d92e4ec0.zip
isis: Cleanup CLI, split into parts which are shared, fabricd and isisd
Remove isis_vty.c and create three new files isis_vty_common.c, isis_vty_fabricd.c and isis_vty_isisd.c which are built into both daemons, only fabricd and only isisd, respectively. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Diffstat (limited to 'vtysh')
-rw-r--r--vtysh/Makefile.am4
-rwxr-xr-xvtysh/extract.pl.in15
2 files changed, 16 insertions, 3 deletions
diff --git a/vtysh/Makefile.am b/vtysh/Makefile.am
index 936640c83..350b6fede 100644
--- a/vtysh/Makefile.am
+++ b/vtysh/Makefile.am
@@ -64,7 +64,9 @@ if ISISD
vtysh_scan += $(top_srcdir)/isisd/isis_redist.c
vtysh_scan += $(top_srcdir)/isisd/isis_spf.c
vtysh_scan += $(top_srcdir)/isisd/isis_te.c
-vtysh_scan += $(top_srcdir)/isisd/isis_vty.c
+vtysh_scan += $(top_srcdir)/isisd/isis_vty_common.c
+vtysh_scan += $(top_srcdir)/isisd/isis_vty_fabricd.c
+vtysh_scan += $(top_srcdir)/isisd/isis_vty_isisd.c
vtysh_scan += $(top_srcdir)/isisd/isisd.c
endif
diff --git a/vtysh/extract.pl.in b/vtysh/extract.pl.in
index 0eb5944ab..690e9a12c 100755
--- a/vtysh/extract.pl.in
+++ b/vtysh/extract.pl.in
@@ -201,9 +201,20 @@ sub scan_file {
}
foreach (@ARGV) {
- scan_file($_, 0);
if (/\/isisd\//) {
- scan_file($_, 1);
+ # We scan all the IS-IS files twice, once for isisd,
+ # once for fabricd. Exceptions are made for the files
+ # that are not shared between the two.
+ if (/isis_vty_isisd.c/) {
+ scan_file($_, 0);
+ } elsif (/isis_vty_fabricd.c/) {
+ scan_file($_, 1);
+ } else {
+ scan_file($_, 0);
+ scan_file($_, 1);
+ }
+ } else {
+ scan_file($_, 0);
}
}