Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Creating a Parameter for a CLI Configlet

    From the Manage Configlets page, 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. The following fields are displayed on this page:

    Table 1: Attributes of a parameter

    Parameter

    Name of the parameter.

    Display Name

    Display name of the parameter.

    Configured Value XPATH

    This field is used to give the XPath of the configured values. The behavior of this field depends on the type of view. When the view type is form, the corresponding value present in the XPath is taken as the field value. In case XPath returns multiple values, first value returned is considered. In case the XPath returns multiple values, the first value returned is considered. When the view type is grid, the following behavior is followed. If more than one parameters defined then following rules should be met.

    • For independent index parameters, a join would be performed between the values returned by the XPath and the existing set of rows.

    • For dependent index parameters, join would be performed between the values returned by the XPath and the correspondent row.

    For non index parameters, if list of values returned then they are aggregated into comma separated values.

    Description

    Description of the parameter.

    Scope

    Scope of the parameter, such as device/entity specific or global.

    Default Value

    Default value of the parameter. The behavior is same as that of Configured value XPath except that the value is given explicitly. This field is considered only when Configured Value XPATH is not specified or if the XPath doesn't return any value.

    From the Manage Configlets page, if you click the Add Parameter button, you are navigated to the Manage Arguments page. The Manage Arguments panel displays a list of arguments for the adding script and a form to manage the properties for them. When you select an argument from the grid, the lower part of the page displays the properties applicable to the selected argument.

    To add a parameter to the CLI Configlet:

    1. From the Manage Configlets page, click the Add Parameter button.

      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.

    14. (Optional) Add multiple parameters.

    15. (Optional) To discard the changes and go back to the previous page, click Cancel.

      You are redirected to the previous page.

    16. Click Save.

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

    Modified: 2017-09-13