Fortinet white logo
Fortinet white logo

Administration Guide

Validating CLI templates

Validating CLI templates

FortiManager will suggest commands as you type text into the editor. Select a command from the suggestion menu to auto-complete the command. FortiManager may suggest additional commands to use based on the previously entered command. For example, if you type conf, FortiManager will suggest the config command. When config is selected, FortiManager may present additional options related to the config command that can be added (for example, firewall address).

You can click the Validate option at the bottom of the editor to review for syntax errors.

A FortiManager warning message will appear if there are errors detected, and an error icon will indicate the line(s) in the editor that include the error. Hover your mouse over the error icon to review the warning details. FortiManager will present suggested corrections where applicable, and you can click Use Corrected Suggestion to update the command in line. Once corrections have been made in the editor, you can click Validate again to confirm that there are no longer any syntax issues.

Selecting the validation platform

In order to ensure the validated results align with the device platform the commands will be run on, you must choose the correct platform from the Validation device platform dropdown in the editor. Validation will use the syntax from the selected device platform.

Performing validation on change

You can enable the Validate on change field to automatically validate the syntax when making changes in the editor

Validate results of metadata variables used in the template

Template validation can be used to determine if your template is producing the correct output based on the metadata variables used in the template. For more information, see Validate metadata variables in provisioning templates

Validating CLI templates

Validating CLI templates

FortiManager will suggest commands as you type text into the editor. Select a command from the suggestion menu to auto-complete the command. FortiManager may suggest additional commands to use based on the previously entered command. For example, if you type conf, FortiManager will suggest the config command. When config is selected, FortiManager may present additional options related to the config command that can be added (for example, firewall address).

You can click the Validate option at the bottom of the editor to review for syntax errors.

A FortiManager warning message will appear if there are errors detected, and an error icon will indicate the line(s) in the editor that include the error. Hover your mouse over the error icon to review the warning details. FortiManager will present suggested corrections where applicable, and you can click Use Corrected Suggestion to update the command in line. Once corrections have been made in the editor, you can click Validate again to confirm that there are no longer any syntax issues.

Selecting the validation platform

In order to ensure the validated results align with the device platform the commands will be run on, you must choose the correct platform from the Validation device platform dropdown in the editor. Validation will use the syntax from the selected device platform.

Performing validation on change

You can enable the Validate on change field to automatically validate the syntax when making changes in the editor

Validate results of metadata variables used in the template

Template validation can be used to determine if your template is producing the correct output based on the metadata variables used in the template. For more information, see Validate metadata variables in provisioning templates