Age | Commit message (Collapse) | Author |
|
|
|
frr.py debugging is set True if the file '/tmp/vyos.frr.debug' exists;
this check needs to be called within an init function, as frr.py will
have already been loaded by vyos-configd before the /tmp/*.debug files
are created by vyos-router, or by call to 'touch'.
|
|
|
|
|
|
As a result to some frr-reload bugs workarounded in commit 3800ea91 or fe0038c2
this commit adds the workaround in general.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This will enable more debugging on the frr reload library, changes:
* Adds a /tmp/vyos.frr.debug hook to enable system wide vyos.frr debugging
* Log the initial imported configs
* Log the FRR config submitted to frr-reload
* redirecting frr-reload output to the debug log.
|
|
|
|
using multiline regexes are quite hard to "read" and are really
easy to mess up, this commit adds a new more pythonic
implementation of the library that do not need any multiline regexes.
|
|
because of a bug in frr.py the default before_re will not be working.
it is by default without a group, but will be used in a match that needs a group.
The whole string could be matched in the group, so the fix is easy to implement.
|
|
This commit adds the python module vyos.frr that support reading and modifying the frr cofiguration.
Functions
get_configuration() :
Collects the configuration from FRR and returns it as a string
reload_configuration() :
uses frr-reload.py to activate a new configuration.
The configuration applied will overwrite the current configuration.
mark_configuration() :
Does syntax check/validation and add "end" tags to the configuration
The marked configuration will be returned as a string
A syntax fault will render an Exception
execute() :
Execute a command inside vtysh
configure() :
Executes a command in vtysh config mode
replace_section() / _replace_section() :
Adds the ability to replace a section of frr code
remove_section() :
Removes the specified configuration block from the config
For now this supports replacing complete config sub-blocks of configuration and selecting the daemon
to replace inside. This should work for most daemons, but static routing will still be an issue because
this is not a separate sub-config mode
|