9.0.0 8.3.0 8.2.0-8.2.1 8.1.0-8.1.1 8.0.0-8.0.3 7.4.0-7.4.6 7.3.0-7.3.2 7.2.0-7.2.1 7.1.0-7.1.2 7.0.0-7.0.2 6.1.0-6.1.2 View All PV Cloud PV Local Installs
Auto Light Dark
Auto Light Dark
9.0.0 8.3.0 8.2.0-8.2.1 8.1.0-8.1.1 8.0.0-8.0.3 7.4.0-7.4.6 7.3.0-7.3.2 7.2.0-7.2.1 7.1.0-7.1.2 7.0.0-7.0.2 6.1.0-6.1.2 View All PV Cloud PV Local Installs

Peering Templates

Peering Templates

8.0.0 Peering templates list.jpg


Peering Templates allow users to create their own reusable session configuration files. When the default ProVision session configuration template doesn't do everything required for your specific use case, you can create your own template that does. Revisions to Peering Templates are tracked, and a template may be reverted to a previous version at any time. 


Peering Templates are accessible to Admin users from the Admin Preferences → Peering page, under Peering Settings. 



Viewing Templates

View the Template List by navigating to the Admin Preferences page, in the Admin area of ProVision. From there, click the "Peering" sub-tab button top view Peering Settings.

Next to "Templates", click "Manage Custom Templates". 

8.0.0 Peering admin settings templates.jpg

The Template List will open, displaying all existing Peering Templates. 

7.4.0 Peering Templates.png

Click on any template to open Template Details, where you can edit, delete, or preview the template.

7.3.0 Peering Template ASN Template.png

To return to the Template List, click the "Template List" button at the top right of the page. 

Add a Template

From any page in the Peering Templates area, click the "Add Template" button on the right side of the page header to start a new template.

7.3.0 Peering Templates Add Template Button.png

In the Add Template form, enter a name for the template and the template body. When complete, click "Add". 

Peering Template Add New Filled.png

The "Template Details" view displays for the newly created template, here you can update, preview, or delete the template. 

7.3.0 Peering Template ASN Template.png

The "Revision History" section is available at the bottom of the page in this view, but will only display data if previous updates have been made to the template. 


Delete a Template

From the Template Details view for the desired template, click the "Delete Button".  Note: The deletion is immediate and permanent - use with care!

7.3.0 Peering Template ASN Template Delete.png

Edit a Template

From the Template Details view, edit the template by clicking inside the template body and typing the desired changes - if you need a reminder as to syntax or variables, click the help icon (Question Mark button) at top right to open the template editing guide.  

7.3.0 Peering Template Update Existing.png

Click "Update" when done. 

Syntax

Templates use the Mustache format https://mustache.github.io/mustache.5.html

Click here for syntax examples...

Template Syntax

Basic Variables

Values on the session object are inserted when referenced by double curly braces {{ }}

The router name is {{router_name}}

When given a session object with {router_name:'TheName'} the line becomes

The router name is TheName


If / If-Not statements

To only include a block (or part of a line) if a variable exists, enclose that part of the template starting with {{#variable}} and ending with {{/variable}}

{{#color}}The color is {{color}}.{{/color}} {{#city}} The city is {{city}}. {{/city}}

When given {color:'blue'} the output will be

The color is blue.

To only include a block if a variable does not exist, start with {{^variable}} and end with {{/variable}}


Common Variables

  • source_asn

  • vrf

  • type_ipv6

  • peer_ipaddr

  • peer_asn

  • peer_group

  • peer_name

  • ttl

  • prfx_max

  • prfx_alert_threshold

Preview Template

While editing or viewing a template, you may preview the template's output against a specific session by clicking the "Preview" button. A "Preview Template" section appears.

7.3.0 Peering Template Preview Button.png

Select an existing Router/Session from the dropdown list to use to generate the preview. Once selected, the template output will display directly underneath the selected session. 

7.3.0 Peering Template Preview Session Selected w result.png

Template Revisions

The Revision History area will display on the Template Details page after an update has been made to the template, with each update displaying as a separate revision item. 

7.3.0 Peering Template with Revision History.png

Click "View" under the "Actions" columns for a revision to see the template contents at that revision snapshot. 

7.3.0 Peering Template View Revision.png

To restore the template back to that revision number, click the "Restore" button for the revision preview.


Additional Information:

For additional information on Peering, see the following areas: