CLI Configlets are configuration tools provided by Junos
OS to help you configure a device more easily. A CLI Configlet is
a configuration template that is transformed into a CLI configuration
string before being applied to a device. You apply a CLI Configlet
to the logical interface of a device to push the configuration in
the CLI Configlet to the device.
Note: 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 // and without device-specific or entity-specific parameters.
To apply a CLI Configlet to logical interfaces:
- On the Junos Space Network Management Platform user interface,
select Devices > Device Management.
The Device Management page is displayed.
- Select the required devices and select Device Inventory
> View Logical Interfaces from the Actions menu.
The View Logical Interfaces page is displayed with logical interfaces
of all the selected devices.
- Right-click the logical interfaces for which the CLI Configlet
must be applied and select Apply CLI Configlet.
The Apply CLI Configlet page is displayed. This page displays
a list of CLI Configlets that are categorized by context and device
family.
- (Optional) To view the context:
Click the View Context link.
The Context dialog box is displayed.
Click OK.
- You can filter the list of CLI Configlets that you want
to apply to the logical interface manually or by using tags.
To filter CLI Configlets manually, enter the search criteria
in the Search field and click the Search icon.
The list of CLI Configlets is further filtered by the search
criteria.
To filter the CLI Configlets by using tags:
Click the Select by tags option button.
The Search field disappears.
From the Select by tags drop-down list, select
an appropriate tag.
Click OK.
The list of CLI Configlets is further filtered by the tag you
selected.
Note: This filtered view is retained even when you navigate
to other inventory landing pages.
- Select a CLI Configlet from the filtered list.
The parameters of the CLI Configlet 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.
To download a sample CSV file, click the Download Configlet
Parameters link. The SampleParameterCSV file is downloaded
with the parameters already present in the editable grid. You can
enter or edit the required parameter values in the CSV file easily
in addition to manually editing the parameter value field in the grid.
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.
- (Optional) To enter the values for the parameters of the
CLI Configlet, click the appropriate cell in the Value column.
If you enter a value for a parameter that is a Password
field, the value you enter is hidden.
If you enter a value for a parameter that is a Confirm
Password field, a pop-up window is displayed. Enter the password again
and click OK.
- (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.
You can preview the configuration in the CLI Configlet in the
Preview area.
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.
- Before applying the CLI Configlet to the logical interface
of the device, you can validate the configuration in the CLI Configlet
on the device.
- (Optional) To validate the CLI Configlet on the logical
interface, click Validate.
The Validate Results page is displayed.
A job is triggered. The Progress column displays the progress
of validation. 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.
Note: You can also view the validation results from the Job
Management page. To view the validation results, double-click the
job ID and click the View Results link. The Validate CLI
Configlet Job Remarks pop-up window is displayed. Navigate back to
the Validate Results page.
- Click Close to return to the Apply CLI Configlet
page.
- (Optional) To select a different CLI Configlet or reschedule
the workflow, click Back.
You are redirected to the previous page.
- You can apply the CLI Configlet to the logical interface
of multiple devices or submit the configuration changes included in
the CLI Configlet to the change requests.
- To apply the CLI Configlet to the logical interface of
devices, click Apply.
If you selected to apply the CLI Configlet, the Configlets
Results page is displayed.
A job is triggered. The Progress column displays the progress
of applying the CLI Configlet. When the job is complete, the results
of the job are displayed. The Status column indicates the result of
the job.
Note: You can also view the results from the Job Management
page. To view the results, double-click the job ID and click the View Results link. The Apply CLI Configlet Job Remarks pop-up
window is displayed. Navigate back to the Configlet Results page.
If you scheduled the apply the CLI Configlet task for
later, the Job Information dialog box displays the schedule information.
Click OK.
- To submit the configuration changes to the change requests,
click Submit.
The configuration changes are included in the list of changes
on the Review/Deploy Configuration page in the Devices workspace.
An audit log is generated when you apply or submit the CLI Configlet.
- To cancel the task, click Cancel. You are returned
to the View Logical Interfaces page.