summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-12-18 19:17:33 +0100
committerChristian Breunig <christian@breunig.cc>2024-12-18 19:17:33 +0100
commit75de2fa91c7d727eef9d38d045e0e04fba218695 (patch)
treef31d0915c680e0b6096751810b8c46a8130558ba /python
parent0b46e61379d2aa74f8b6e87dc94e801d0863e1ab (diff)
downloadvyos-1x-75de2fa91c7d727eef9d38d045e0e04fba218695.tar.gz
vyos-1x-75de2fa91c7d727eef9d38d045e0e04fba218695.zip
vyos-configd: T6746: render resulting FRR configuration only once
Previously the FRR configuration was rendered via Jinja2 on every call to get_frrendet_dict() - but it was used/applied only once. We save the CPU cycles and render the FRR configuration only once prior to applying it in FRR.
Diffstat (limited to 'python')
-rw-r--r--python/vyos/configdict.py13
1 files changed, 0 insertions, 13 deletions
diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py
index cbcbf9f72..17a5fd7bb 100644
--- a/python/vyos/configdict.py
+++ b/python/vyos/configdict.py
@@ -19,7 +19,6 @@ 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
@@ -1146,16 +1145,4 @@ def get_frrender_dict(conf, argv=None) -> dict:
dict.update({'vrf' : vrf})
- if os.path.exists(frr_debug_enable):
- print('======== < BEGIN > ==========')
- import pprint
- pprint.pprint(dict)
- print('========= < END > ===========')
-
- # Use singleton instance of the FRR render class
- if hasattr(conf, 'frrender_cls'):
- frrender = getattr(conf, 'frrender_cls')
- dict.update({'frrender_cls' : frrender})
- frrender.generate(dict)
-
return dict