diff options
| author | Christian Hopps <chopps@labn.net> | 2023-02-27 22:00:32 -0500 | 
|---|---|---|
| committer | Christian Hopps <chopps@labn.net> | 2023-03-21 22:08:32 -0400 | 
| commit | fc52ca1e18f5cabff96f2dca1004bd81cee0ecab (patch) | |
| tree | 0f39bc66ef8cc164c634a149ff01169da5108f79 /python | |
| parent | 74335ceb2753cc73afe2854b20640018431acc19 (diff) | |
mgmtd: nb library for client front-end code
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'python')
| -rw-r--r-- | python/xref2vtysh.py | 10 | 
1 files changed, 10 insertions, 0 deletions
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  | 
