Merge pull request #10584 from donaldsharp/workflow_modification

This commit is contained in:
David Lamparter 2022-03-01 11:44:57 +01:00 committed by GitHub
commit 17dd5ca8f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 2 deletions

View File

@ -48,6 +48,16 @@ a node and returns the parent of the node. This interface causes all manner of
insidious problems, even for experienced developers, and needs to be fixed at
some point in the future.
Deprecation of old style of commands
------------------------------------
There are currently 2 styles of defining commands within a FRR source file.
``DEFUN`` and ``DEFPY``. ``DEFPY`` should be used for all new commands that
a developer is writing. This is because it allows for much better handling
of command line arguments as well as ensuring that input is correct. ``DEFUN``
is listed here for historical reasons as well as for ensuring that existing
code can be understood by new developers.
Defining Commands
-----------------
All definitions for the CLI system are exposed in ``lib/command.h``. In this

View File

@ -346,6 +346,13 @@ Pre-submission Checklist
the new feature within our existing CI infrastructure. Also the
addition of automated testing to cover any pull request is encouraged.
- All new code must use the current latest version of acceptable code.
- If a daemon is converted to YANG, then new code must use YANG.
- DEFPY's must be used for new cli
- Typesafe lists must be used
- printf formatting changes must be used
.. _signing-off:
Signing Off
@ -1250,8 +1257,8 @@ CLI changes
-----------
CLI's are a complicated ugly beast. Additions or changes to the CLI should use
a DEFUN to encapsulate one setting as much as is possible. Additionally as new
DEFUN's are added to the system, documentation should be provided for the new
a DEFPY to encapsulate one setting as much as is possible. Additionally as new
DEFPY's are added to the system, documentation should be provided for the new
commands.
Backwards Compatibility