diff options
| author | Christian Breunig <christian@breunig.cc> | 2024-12-08 15:41:53 +0100 |
|---|---|---|
| committer | Christian Breunig <christian@breunig.cc> | 2024-12-16 22:24:50 +0100 |
| commit | 1666e3d99b8de700c880f09ce6ad5ea8bc7f4568 (patch) | |
| tree | 84e5cf392f8c2c03d5edcb194a50151d99cf9d19 /python/vyos/configdict.py | |
| parent | e11a6b7abb719b0e698ae2e02647f450671c6fb1 (diff) | |
| download | veeos-1x-1666e3d99b8de700c880f09ce6ad5ea8bc7f4568.tar.gz veeos-1x-1666e3d99b8de700c880f09ce6ad5ea8bc7f4568.zip | |
frr: T6746: add default entry for config debug file
A lot of services have dynamic debug capabilities which will be turned on by
creating a file in /tmp. These scripts have the path hardcoded and sometimes
accross multiple places (bad).
This commit introduces vyos.defaults.frr_debug_enable to get the path for the
debug file from a single location.
Diffstat (limited to 'python/vyos/configdict.py')
| -rw-r--r-- | python/vyos/configdict.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py index 88d131573..c7384f71d 100644 --- a/python/vyos/configdict.py +++ b/python/vyos/configdict.py @@ -19,6 +19,7 @@ A library for retrieving value dicts from VyOS configs in a declarative fashion. import os import json +from vyos.defaults import frr_debug_enable from vyos.utils.dict import dict_search from vyos.utils.process import cmd @@ -1124,8 +1125,9 @@ def get_frrender_dict(conf) -> dict: dict.update({'vrf' : vrf}) - print('======== < > ==========') - import pprint - pprint.pprint(dict) - print('======== < > ==========') + if os.path.exists(frr_debug_enable): + print('======== < BEGIN > ==========') + import pprint + pprint.pprint(dict) + print('========= < END > ===========') return dict |
