From f88ce976ead487e730b021707c34311b72dcac78 Mon Sep 17 00:00:00 2001 From: Marek Isalski Date: Fri, 27 Sep 2019 22:32:33 +0100 Subject: [PATCH] add ability to originate default on OSPF --- vyos.conf.j2 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/vyos.conf.j2 b/vyos.conf.j2 index 23050ec..99acfb3 100644 --- a/vyos.conf.j2 +++ b/vyos.conf.j2 @@ -121,6 +121,17 @@ protocols { abr-type {{ salt['pillar.get']('protocols:ospf:parameters:abr-type','cisco') }} } + {% if 'default-information' in salt['pillar.get']('protocols:ospf') %} + default-information { + {% if 'originate' in salt['pillar.get']('protocols:ospf:default-information') %} + originate { + {% if salt['pillar.get']('protocols:ospf:default-information:originate:metric',None) %}metric {{ salt['pillar.get']('protocols:ospf:default-information:originate:metric') }}{% endif %} + {% if salt['pillar.get']('protocols:ospf:default-information:originate:metric-type',None) %}metric-type {{ salt['pillar.get']('protocols:ospf:default-information:originate:metric-type') }}{% endif %} + } + {% endif %} + } + {% endif %} + {% for iface_name, iface_data in pillar['netbox']['interfaces'].items() %}{% if salt['pillar.get']('interfaces:'+iface_name+':ip:ospf:passive') %} passive-interface {{ iface_name }} {% endif %}{% endfor %}