From 323c0c3b8c109394ec8caf3f105633b0691fdef7 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Fri, 29 Jan 2021 11:46:48 +0100 Subject: rpki: T3266: support deleting entire section from FRR config --- data/templates/frr/rpki.frr.tmpl | 1 + src/conf_mode/protocols_rpki.py | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/data/templates/frr/rpki.frr.tmpl b/data/templates/frr/rpki.frr.tmpl index bf72c7a9e..346a0caa9 100644 --- a/data/templates/frr/rpki.frr.tmpl +++ b/data/templates/frr/rpki.frr.tmpl @@ -1,4 +1,5 @@ ! +{# as FRR does not support deleting the entire rpki section we leave it in place even when it's empty #} rpki {% if cache is defined and cache is not none %} {% for peer, peer_config in cache.items() %} diff --git a/src/conf_mode/protocols_rpki.py b/src/conf_mode/protocols_rpki.py index a12e4f317..aa6f974ab 100755 --- a/src/conf_mode/protocols_rpki.py +++ b/src/conf_mode/protocols_rpki.py @@ -91,10 +91,6 @@ def verify(rpki): return None def generate(rpki): - if not rpki: - rpki['new_frr_config'] = '' - return None - # render(config) not needed, its only for debug render(config_file, 'frr/rpki.frr.tmpl', rpki) rpki['new_frr_config'] = render_to_string('frr/rpki.frr.tmpl', rpki) -- cgit v1.2.3