Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Creating a CLI Configlet

You create a CLI Configlet to push a configuration to devices. You can also add parameters to a CLI Configlet. Parameters are the variables defined in the CLI Configlet whose values are either obtained from the environment or given by the user during execution.

To create a CLI Configlet:

  1. On the Junos Space Network Management Platform user interface, select CLI Configlets > Configlets.

    The Configlets page is displayed.

  2. Click the Create CLI Configlet icon on the toolbar.

    The Create CLI Configlet page is displayed.

  3. In the Name field, enter a name for the CLI Configlet.

    The name cannot exceed 255 characters. Allowable characters include the hyphen (-), underscore (_), letters, numbers, and the period (.). You cannot have two CLI Configlets with the same name.

  4. In the Category field, enter a name for the category of the CLI Configlet.

    The name of the category cannot exceed 255 characters. Allowable characters include the hyphen (-), underscore (_), letters, numbers, and the period (.).

  5. From the Device Family Series drop-down list, select the device family for the CLI Configlet.
  6. (Optional) From the Context drop-down list, select the appropriate context for the CLI Configlet.
  7. In the Reference Number field, enter a reference number for the CLI Configlet.

    The range is 1 through 216–1.

  8. (Optional) In the Description field, enter a description.

    The description cannot exceed 2500 characters.

  9. For Execution Type, select the type of execution.

    The option buttons available are Single Execution and Grouped Execution.

    By default, the Single Execution option button is selected.

    • If you select Single Execution, you can apply the CLI Configlet only to one device at a time.

    • If you select Grouped Execution, you can apply the CLI Configlet to multiple devices at a time.

  10. For Preview options, select the check boxes if you want to view the parameters and the configuration in the CLI Configlet before applying the configuration to devices.

    The check boxes available are Show Parameters and Show Configuration. By default, both check boxes are selected.

  11. For Postview options, select the check boxes if you want to view the parameters and the configuration in the CLI Configlet in the Apply CLI Configlet job results.

    The check boxes available are Show Parameters and Show Configuration. By default, both check boxes are selected.

  12. In the Configlet Editor area, enter the configuration for the CLI Configlet. You can type or manually paste the configuration in the Configlet Editor.
    Note:

    You cannot create a CLI Configlet if you do not enter the configuration in the Configlet Editor.

    Note:

    You can also create a CLI Configlet to erase specific configuration from the devices. To do so, include the delete: statement above the hierarchy level that should be deleted from the devices. When you apply the CLI Configlet to a device, the physical interface of a device, the logical interface of a device, or the physical inventory element of a device, the configuration at the hierarchy level is erased from the device.

    For more information about the protocol and syntax used for creating, modifying, and deleting the configuration by using CLI Configlets, see the Junos XML Management Protocol Guide.

    Note:

    When you define a configuration of the CLI Configlet, you should specify variables that accept special characters as input within double quotation marks.

  13. Click Next.

    You can add the parameters for the CLI Configlet on this page.

  14. To add a parameter to the CLI Configlet:
    1. Click the Add Parameter icon.

      The Add Configlet Parameter pop-up window is displayed.

    2. In the Parameter field, enter the name of the parameter.

      The name of the parameter cannot exceed 255 characters. Allowable characters include the hyphen (-), underscore (_), letters, numbers, and the period (.).

    3. In the Display Name field, enter a display name for the parameter.

      The display name cannot exceed 255 characters. Allowable characters include the hyphen (-), underscore (_), letters, numbers, and the period (.).

    4. In the Description field, enter a description for the parameter.

    5. From the Parameter Scope drop-down list, select an appropriate scope for the parameter.

      The options available are Global, Device Specific, and Entity Specific.

    6. From the Parameter Type drop-down list, select an appropriate type of parameter. The options available are:

      • Text Field – You can enter any value.

      • Selection Field – You can select a value from a set of options.

      • Invisible Field – The field displays a value that is explicitly defined by the user or an XPath.

      • Password Field – Enter a password to apply the CLI Configlet.

      • Password Confirm Field – Enter the password again to confirm the password.

    7. From the Regex Value drop-down list, select an appropriate regular expression value.

      This field is enabled if you choose the type of parameter as Text Field, Password Field, or Confirm Password Field.

    8. From the Configured Value Xpath drop-down list, select an appropriate XPath value.

      This field is enabled if you choose the type of parameter as Text Field, Selection Field, or Invisible Field. This is the XPath (with reference to the device XML) to fetch the set of values.

    9. In the Default Value field, enter a default value.

      This field is enabled if you choose the type of parameter as Text Field, Selection Field, or Invisible Field. This field is considered only when the XPath is not specified.

    10. From the Selection Values Xpath drop-down list, select an appropriate XPath value.

      This field is enabled if you choose the type of parameter as Selection Field. This is the XPath (with reference to the device XML) to fetch the set of values.

    11. In the Selection Values field, enter an appropriate selection value.

      This field is enabled if you choose the type of parameter as Selection Field.

    12. In the Order field, enter the order in which the parameters should be listed while applying the CLI Configlet.

    13. Click Add.

  15. (Optional) Add multiple parameters.
  16. (Optional) To go back to the previous page, click Back.

    You are redirected to the previous page.

  17. Click Create.

    The CLI Configlet is created. You are redirected to the Configlets page.