fortinet-solutions-cse / sdwan-advpn-reference

Jinja Orchestrator for Fortinet SD-WAN/ADVPN
56 stars 12 forks source link

Need explicit pe_vrf variable in Regions #6

Closed ramakrishnanr89 closed 1 year ago

ramakrishnanr89 commented 1 year ago

In the BGP-On-Loopback MultiVRF, please add a "_pevrf=32". Currently the Underlay and Overlay templates check if it's defined if not sets it to 32. This is not so obvious. To make it obvious I suggest that the variable is explicitly defined under regions in project.j2

dmitryperets commented 1 year ago

Hi @ramakrishnanr89,

This is already the case. You can manually configure pe_vrf per region, and the default value is 32 (I wanted to set a default value, to minimize the number of parameters that users absolutely HAVE to configure). This parameter is documented here. By the way, that's the reference where I document all the currently supported parameters.

You are probably confused due to the fact that it doesn't appear in the example Project template, like other optional parameters. But that's because, unfortunately, I cannot add a comment in the middle of a dict... This would be wrong Jinja syntax. So e.g. I would do something like this:

{# Regions #}
{% set regions = {
    'West': {
      'as': '65001',
      'lo_summary': '10.200.1.0/24',
      'hubs': [ 'site1-H1', 'site1-H2' ],
      {# 'pe_vrf': 32, #}              <<<<<<<<<<<<<<< optional
      'vrfs': [
        {
          'id': 1,
          'lan_summary': '10.0.0.0/14'
        },
        {
          'id': 2,
          'lan_summary': '10.0.0.0/14'
        }
      ]
    },

But this is not allowed - you cannot define comments in the middle of a dict in Jinja.

In any case, the supplied Project template is just an example. The complete reference of all the currently supported parameters is in the file linked above.