diff options
Diffstat (limited to 'python/xref2vtysh.py')
| -rw-r--r-- | python/xref2vtysh.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/python/xref2vtysh.py b/python/xref2vtysh.py index a4f8560bb0..c325979d24 100644 --- a/python/xref2vtysh.py +++ b/python/xref2vtysh.py @@ -44,7 +44,7 @@ daemon_flags = { "lib/routemap.c": "VTYSH_RMAP", "lib/routemap_cli.c": "VTYSH_RMAP", "lib/spf_backoff.c": "VTYSH_ISISD", - "lib/thread.c": "VTYSH_ALL", + "lib/event.c": "VTYSH_ALL", "lib/vrf.c": "VTYSH_VRF", "lib/vty.c": "VTYSH_ALL", } @@ -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 |
