summaryrefslogtreecommitdiff
path: root/lib/command_py.c
AgeCommit message (Collapse)Author
2023-07-08lib: make cmd_element->attr a bitmask & clarifyDavid Lamparter
It already "looks" like a bitmask, but we currently can't flag a command both YANG and HIDDEN at the same time. It really should be a bitmask. Also clarify DEPRECATED behaviour (or the absence thereof.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-04-04build: first header *must* be zebra.h or config.hDavid Lamparter
This has already been a requirement for Solaris, it is still a requirement for some of the autoconf feature checks to work correctly, and it will be a requirement for `-fms-extensions`. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-08-26lib: fix indentation trainwreck in command_pyDavid Lamparter
Hooooo boooooyyyy... that `default` sure was in an "interesting" place. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-08-26lib: add `![...]` syntax for easy "no" formsDavid Lamparter
This allows defining a CLI command like this: `[no] some setting ![VALUE]` with VALUE being optional for the "no" form, but required for the positive form. It's just a `[...]` where the empty branch can only be taken for commands starting with `no`. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-02-23lib/clippy: add libelf wrapperDavid Lamparter
This adds _clippy.ELFFile, which provides a fast wrapper around libelf. The API is similar to / a subset of pyelfutils, which unfortunately is painfully slow (to the tune of minutes instead of seconds.) The idea is that xrefs can be read out of ELF files by reading out the "xref_array" section or "FRRouting/XREF" note. Signed-off-by: David Lamparter <equinox@diac24.net>
2019-06-13*: config.h or zebra.h is the first #includeDavid Lamparter
This is mostly relevant for Solaris, where config.h sets up some #define that affect overall header behaviour, so it needs to be before anything else. Signed-off-by: David Lamparter <equinox@diac24.net>
2019-06-13lib/clippy: ignore -Wstrict-aliasingDavid Lamparter
This warning is both meaningless and unfixable, just ignore it. Signed-off-by: David Lamparter <equinox@diac24.net>
2018-12-01Revert "isisd lib ospfd pbrd python: fix empty init"David Lamparter
This reverts commit 48944eb65e1d1ced03d46121d923d9d613a480d5. We're using GNU C, not ISO C - and this commit triggers new (real) warnings about {0} instead of bogus ones about {}. Signed-off-by: David Lamparter <equinox@diac24.net>
2018-11-21isisd lib ospfd pbrd python: fix empty initF. Aragon
ISO C forbids empty initializer braces. Empty initializers have been replaced with {0} Signed-off-by: F. Aragon <paco@voltanet.io>
2017-10-17lib: Fix small memory leak when using command_py.cDonald Sharp
When free'ing memory associated with the wgraph, also free memory malloced during the initialization. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-14lib, python: add M:A:C support for clippyQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-07-22Revert "*: reindent pt. 2"David Lamparter
This reverts commit c14777c6bfd0a446c85243d3a9835054a259c276. clang 5 is not widely available enough for people to indent with. This is particularly problematic when rebasing/adjusting branches. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-17*: reindent pt. 2whitespace / reindent
w/ clang 5 * reflow comments * struct members go 1 per line * binpack algo was adjusted
2017-07-17*: reindentreindent-master-afterwhitespace / reindent
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-06-14lib: clippy the assistantDavid Lamparter
Wraps the command parsing code for Python, so we can use it to do fancy preprocessing and replace extract.pl. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>