Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

Add Configuration Templates

 

To add a configuration template, you should either be a user with administrative privileges or have the privilege to add configuration templates.

Note
  • Before you add the configuration template, ensure that you have the device configuration ready.

  • We recommend that you use a working device configuration to add the configuration template.

To add a configuration template:

  1. Select Configuration > Templates > Config Templates on the left navigation menu.

    The Configuration Templates page appears.

  2. Click the Add icon (+).

    The Add Configuration Template page (wizard) appears.

    Note

    Fields marked with an asterisk (*) are mandatory.

  3. Configure the fields on the Basic Information tab according to the guidelines provided inTable 1.
  4. Click Next to go to the Template Configuration tab.
  5. Add the configuration on the Template Configuration tab.

    You can view a sample configuration by clicking the Sample Configuration link.

    You can do the following in the editor provided for entering the configuration:

    • Copy the required configuration stanza from a device and create a template from parameters in the configuration.

    • Refer to the sample configuration file for adding the configuration.

    • Parameterize variables by using double curly braces {{}}.

  6. Click Next to go to the Generated UI tab, where you can view the UI for the parameters that you entered.
  7. Perform one or more actions on the Generated UI tab, as explained inTable 2.
  8. Click Save.

    The configuration template is added and you are returned to the Configuration Templates page, where a confirmation message appears.

Table 1 lists fields to be entered on the Basic Information tab of the Add Configuration Templates page.

Table 1: Fields on the Basic Information Tab of the Add Configuration Templates Page

Field

Description

Template Name

Enter a unique name for the configuration template. The name can only contain alphanumeric characters and hyphens; 64-characters maximum.

Description

Enter a description for the configuration template; 255-characters maximum.

Configuration Format

Select the output format for the configuration template:

  • CLI (default)

  • XML

Device Family

Select a device family for which you are adding the template.

  • Cisco-IOS-XR

  • Juniper-ACX

  • Juniper-ANY (the configuration can be pushed to any Juniper Networks’ devices)

  • Juniper-EX

  • Juniper-MX

  • Juniper-PTX

  • Juniper-QFX

  • Juniper-SRX

Table 2 lists the actions that you can perform on the Generated UI tab of the Add Configuration Templates page.

Table 2: Generated UI Actions (Add Configuration Template Page)

Action

Description

Reorder the UI

Drag and drop individual fields, grids, or sections to change the order in which the parameters appear on the UI.

Modify the settings for a field, section, or grid

To modify the settings for a field, section, or grid:

  1. Click the Settings (gear) icon next to the field, section, or grid.

    The Form Settings pane appears on the right side of the page, displaying the Basic Settings and Advanced Settings tabs.

  2. Modify the fields on these tabs, as needed. See Table 3 for an explanation of the fields on these tabs.
  3. Click Save Settings for each field to save your changes.

    The modifications that you made are displayed on the UI.

Reset the generated UI

Click Undo all Edits to discard the changes that you made and undo the changes made on the UI.

Preview configuration

Preview the configuration defined in the configuration template.

To preview a configuration template:

  1. Click Preview Configuration.

    The Preview Configuration page appears, displaying the configuration that was rendered based on the values that you entered.

  2. Check if the configuration was rendered correctly.
    • If the configuration was not rendered correctly, click the close (X) icon to go back and make modifications as needed.

    • If the configuration was rendered correctly, click OK.

    You are returned to the Generated UI page.

Table 3 lists the fields on the Form Settings pane.

Table 3: Form Settings (Add Configuration Template Page)

Setting

Guideline

Basic Settings Tab

Fields populated in this tab are based on the input type that you select.

Input Type

Select the input type for the parameter in the configuration template:

  • Text (default): If the input value for the parameter is a string of characters.

  • Number: If the input value for the parameter is a number.

  • Email: If the input value for the parameter is an e-mail address.

  • IPv4: If the input value for the parameter is an IPv4 address.

  • IPv4 Prefix: If the input value for the parameter is an IPv4 prefix.

  • IPv6: If the input value for the parameter is an IPv6 address.

  • IPv6 Prefix: If the input value for the parameter is an IPv6 prefix.

  • Toggle Button (Boolean): If the input value for the parameter is a boolean value (true or false).

  • Dropdown: If the input value for the parameter is selected from a list.

  • Password: If the input value for the parameter is a password.

    The value that you enter is masked (default).

    (Optional) Click the Show Password (eye) icon to unmask the password.

  • Confirm Password: If the input value for the parameter is to confirm the password.

    If you select this option, a Confirm Password field appears on the UI. The value that you enter is masked (default).

    (Optional) Click the Show Password (eye) icon to unmask the password.

Label

Enter the label that you want displayed (on the UI) for the parameter.

Default Value

Specify a default value for the parameter.

Validate

For Text input type, select one or more validation criteria against which the input value will be checked:

  • No Space

  • Alpha and Numeric

  • Alpha, Numeric, and Dash

  • Alpha, Numeric, and Underscore

If the value that you entered for the parameter on the UI does not meet the selected validation criteria, an error message appears.

Note: For greater control of input values, you can use the regular expression option in the Advanced Settings tab.

Description

Enter an explanation for the parameter, which will appear when you hover over the Help (?) icon for the parameter; the maximum length allowed is 256 characters.

Global Scope

Click the toggle button to make the parameter common across all devices to which the configuration template is being deployed. If you disable the toggle button, which is default, the parameter must be specified for each device.

Hidden

Click the toggle button to hide the parameter on the UI when you preview and deploy the template.

Typically, this option is used to hide a parameter and display it in the template only when an event is triggered. By default, the toggle button is disabled, which means that the parameter is displayed.

Required

Click the toggle button to make the parameter mandatory; parameters that are mandatory are marked with an asterisk (*) on the UI.

Maximum Value

For parameters that are numbers, enter the maximum value (up to 16 digits) for the input.

Minimum Value

For parameters that are numbers, enter the minimum value (up to 16 digits) for the input.

Visibility for Disabled

For Boolean parameters, select one or more parameters that must appear on the UI when the toggle button is disabled (boolean value is FALSE).

Visibility for Enabled

For Boolean parameters, select one or more parameters that must appear on the UI when the toggle button is enabled (boolean value is TRUE).

Resource Type

For Dropdown input type, select the type of resource from which you want to retrieve data:

  • Static Resource—Resources in the list on the UI are mapped to the values that you specify.

    • To add a static resource:

      1. Click the Add (+) icon.

        Cells appear in the List Values table.

      2. Click inside the cells to specify values for the Label (name for the option in the list), Value (value for the option in the list), and Visibility (conditional visibility based on the option selected from the list) fields.
      3. Click (check mark) to save your changes.

        The values that you specified are displayed in the List Values table.

    • To edit a static resource, select the resource and click the Edit (pencil) icon.

    • To delete a static resource, select the resource and click the Delete (X) icon.

Advanced Settings Tab

Regexp

Enter a regular expression (regex pattern) to validate the input value.

A regular expression defines a search pattern that is used to match characters in a string.

For example, the regular expression [A-Z] matches the input with the characters A through Z.

If the input consists of characters other than A through Z, an error message (as specified in the Invalid Message field) appears.

Invalid Message

Enter an error message that you want displayed on the UI when the input value does not match the specified regular expression.

Event List

Event Name

Select an event from the list based on which the parameter is conditionally displayed.

Event Handler

Enter a JavaScript function that specifies the actions that the event handler takes in response to an event.

WHAT'S NEXT

You can assign the configuration template to device templates or deploy the template on devices.