diff options
Diffstat (limited to 'data/templates/frr/bgp.frr.tmpl')
-rw-r--r-- | data/templates/frr/bgp.frr.tmpl | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/data/templates/frr/bgp.frr.tmpl b/data/templates/frr/bgp.frr.tmpl index 6fe88151f..523fe75e3 100644 --- a/data/templates/frr/bgp.frr.tmpl +++ b/data/templates/frr/bgp.frr.tmpl @@ -52,6 +52,22 @@ {% if config.update_source is defined and config.update_source is not none %} neighbor {{ neighbor }} update-source {{ config.update_source }} {% endif %} +{% if config.interface is defined and config.interface is not none %} +{% if config.interface.peer_group is defined and config.interface.peer_group is not none %} + neighbor {{ neighbor }} interface peer-group {{ config.interface.peer_group }} +{% endif %} +{% if config.interface.remote_as is defined and config.interface.remote_as is not none %} + neighbor {{ neighbor }} interface remote-as {{ config.interface.remote_as }} +{% endif %} +{% if config.interface.v6only is defined and config.interface.v6only is not none %} +{% if config.interface.v6only.peer_group is defined and config.interface.v6only.peer_group is not none %} + neighbor {{ neighbor }} interface v6only peer-group {{ config.interface.v6only.peer_group }} +{% endif %} +{% if config.interface.v6only.remote_as is defined and config.interface.v6only.remote_as is not none %} + neighbor {{ neighbor }} interface v6only remote-as {{ config.interface.v6only.remote_as }} +{% endif %} +{% endif %} +{% endif %} ! {% if config.address_family is defined and config.address_family is not none %} {% for af in config.address_family %} @@ -84,14 +100,16 @@ {% if config.address_family[af].distribute_list is defined and config.address_family[af].distribute_list is not none %} {% if config.address_family[af].distribute_list.export is defined and config.address_family[af].distribute_list.export is not none %} neighbor {{ neighbor }} distribute-list {{ config.address_family[af].distribute_list.export }} out -{% elif config.address_family[af].distribute_list.import is defined and config.address_family[af].distribute_list.import is not none %} - neighbor {{ neighbor }} distribute-list {{ config.address_family[af].distribute_list.export }} in +{% endif %} +{% if config.address_family[af].distribute_list.import is defined and config.address_family[af].distribute_list.import is not none %} + neighbor {{ neighbor }} distribute-list {{ config.address_family[af].distribute_list.import }} in {% endif %} {% endif %} {% if config.address_family[af].filter_list is defined and config.address_family[af].filter_list is not none %} {% if config.address_family[af].filter_list.export is defined and config.address_family[af].filter_list.export is not none %} neighbor {{ neighbor }} filter-list {{ config.address_family[af].filter_list.export }} out -{% elif config.address_family[af].filter_list.import is defined and config.address_family[af].filter_list.import is not none %} +{% endif %} +{% if config.address_family[af].filter_list.import is defined and config.address_family[af].filter_list.import is not none %} neighbor {{ neighbor }} filter-list {{ config.address_family[af].filter_list.import }} in {% endif %} {% endif %} @@ -108,14 +126,16 @@ {% if config.address_family[af].route_map is defined and config.address_family[af].route_map is not none %} {% if config.address_family[af].route_map.export is defined and config.address_family[af].route_map.export is not none %} neighbor {{ neighbor }} route-map {{ config.address_family[af].route_map.export }} out -{% elif config.address_family[af].route_map.import is defined and config.address_family[af].route_map.import is not none %} +{% endif %} +{% if config.address_family[af].route_map.import is defined and config.address_family[af].route_map.import is not none %} neighbor {{ neighbor }} route-map {{ config.address_family[af].route_map.import }} in {% endif %} {% endif %} {% if config.address_family[af].prefix_list is defined and config.address_family[af].prefix_list is not none %} {% if config.address_family[af].prefix_list.export is defined and config.address_family[af].prefix_list.export is not none %} neighbor {{ neighbor }} prefix-list {{ config.address_family[af].prefix_list.export }} out -{% elif config.address_family[af].prefix_list.import is defined and config.address_family[af].prefix_list.import is not none %} +{% endif %} +{% if config.address_family[af].prefix_list.import is defined and config.address_family[af].prefix_list.import is not none %} neighbor {{ neighbor }} prefix-list {{ config.address_family[af].prefix_list.import }} in {% endif %} {% endif %} |