Applying a CLI Configlet to Devices
You apply a CLI Configlet to devices when you want to push a configuration from the CLI Configlet to the devices. You cannot validate a CLI Configlet or apply a CLI Configlet to more than 200 devices if the CLI Configlet requires XPath processing. However, you can apply CLI Configlets to more than 200 devices if the CLI Configlets do not require XPath processing. CLI Configlets that do not require XPath processing include CLI Configlets with context /, //, or /device and without device-specific or entity-specific parameters.
At the time of creating a CLI Configlet:
If you selected the Single execution type, the CLI Configlet can be applied to only one device.
If you selected the Grouped execution type, the CLI Configlet can be applied to multiple devices simultaneously.
To apply a CLI Configlet to devices:
- On the Junos Space Network Management Platform user interface,
select CLI Configlets > Configlets.
The Configlets page is displayed.
- Select the CLI Configlet that you want to apply to the
devices and select Apply CLI Configlet from the Actions
The Apply CLI Configlet page is displayed.
- You can select the devices manually, by using tags, or
by providing a CSV file with filter criteria:
To select the devices manually, enter the search criteria in the Search field and click the Search icon.
The list of devices are filtered by the search criteria.
To select devices by using tags, select an appropriate tag from the Tag Filter drop-down list.
From Junos Space Platform Release 17.2R1 onward, when you select devices by CSV, you can choose to select all managed devices. Select the Include All Managed Devices check box to list all managed devices for selection.
To provide filter criteria using a CSV file, click the CSV Filter icon and upload the CSV file with the filter criteria through the Upload a CSV pop-up window.
The Apply CLI Configlet page displays parameters. Only text field and selection field type parameters are displayed.
From Junos Space Platform Release 17.2R1 onward, you can use CSV files to input parameter values when you need to apply configlets on multiple devices. You can upload the parameter values in the specified format as a CSV file.
You can access a sample CSV file by clicking the Download Configlet Parameters link. The
SampleParameterCSVfile is downloaded with the parameters already present in an editable grid. Refer to the instructions in the
SampleParametersCSVfile for entering the parameter values. If needed, you can rename the
SampleParameterCSVfile. Add or delete parameters present in the
SampleParametersCSVfile and enter a value for the parameters that you retain in the file. Upload the edited CSV file.
To upload the edited CSV file, click the Browse button, select the file, and then click the Upload button. The values of parameters in the CSV file are populated to the editable grid. The parameters of CLI Configlet are listed in the grid with pagination support.
- Double-click the Value column for each parameter
and enter a value.
All values are accepted for the text field type parameter. For a selection field type parameter, you should select from one of the values you provided for the parameter. The set of values present and the default value selected were defined when the template was created.
- (Optional) If you want to apply the CLI Configlet later:
Select the Schedule at a later time check box.
Enter the date in the Date field in the MM/DD/YYYY or MM/DD/YY format.
Enter the time in the Time field in the hh:mm format.
- Click Next.
The parameter value is validated against the regular expression (if given). If the parameter value violates the regular expression, then a validation error is displayed.
The Preview area of the Apply CLI Configlet page displays the preview of the CLI Configlet. If you selected to view the parameters and the configuration when previewing the CLI Configlet, the parameters and the configuration are displayed.
The top of the Preview area displays the parameters with the values that are applied to devices. The bottom left of the Preview area displays the devices you have selected. The bottom right of the Preview area displays the configuration that will be applied to the device selected on the left.
- Click on a device to view the configuration that will be applied to the device.
The preview options selected in the CLI Configlet determine the contents of the Preview area.
Before applying the CLI Configlet, you can validate the configuration in the CLI Configlet on the devices.
- (Optional) To validate the CLI Configlet on the device,
The Validate Results page is displayed.
A job is triggered. The Progress column displays the progress of validation against each device. When the validation is complete, the results of the validation are displayed. The Status column indicates the results of the validation. If the validation is unsuccessful, the details of the error are displayed on the page.
You can also view the validation results from the Job Management page. To view the validation results, double-click the row corresponding to the job ID and click the View Results link corresponding to the device. The Validate CLI Configlet Job Remarks pop-up window is displayed. Navigate back to the Validate Results page.
- Click Close.
You are redirected to the Apply CLI Configlet page.
- (Optional) To validate the CLI Configlet on the device, click Validate.
- (Optional) To select a different set of devices or reschedule
the workflow, click Back.
You are redirected to the previous page.
- You can apply
the CLI Configlet to the devices or submit the configuration changes
included in the CLI Configlet to the change requests of the selected
- To apply the CLI Configlet to the device, click Apply.
If you selected to apply the CLI Configlet now, the Configlets Results page is displayed.
A job is triggered. The Progress column displays the progress of applying the CLI Configlet against each device. When the job is complete, the results of the job are displayed. The Status column indicates the results of the job. If there is an error, the View Job Details page displays an error message. For more information about the error messages, see Common Error Messages in Device-Related Operations.
You can also view the results from the Job Management page. To view the results, double-click the row corresponding to the job ID and click the View Results link corresponding to the device. The Apply CLI Configlet Job Remarks pop-up window is displayed. Navigate back to the Configlet Results page.
- If you scheduled this task for a later time, the Job Information page that appears displays the schedule information. Click OK.
- To apply the CLI Configlet to the device, click Apply.
- To submit the configuration changes to the change requests,
The configuration changes are included in the list of changes on the Review/Deploy Configuration page in the Devices workspace.
- To submit the configuration changes to the change requests, click Submit.
- To cancel the task, click Cancel. You are returned to the CLI Configlets page.