Specifying Device-Specific Values in Template Definitions
Template designers can use a comma-separated value (CSV) file to provide device-specific values for a template definition. A single CSV file can be used to supply as many values as you wish, because the same file can be used again. Once you have created a CSV file, you import it into Junos Space Network Management Platform , and manage it using the Manage CSV Files task in the Device Templates workspace.
Creating a CSV file with device-specific values
You create a CSV file to import the device-specific values into a template definition. Use one column for each value to be specified and use one row for each device.
To create a CSV file:
- Open an appropriate program such as Notepad or Microsoft Excel.
- Create a header row to name your columns.
It does not matter what you name your columns - you could call them anything, but each name must be unique, because Junos Space Network Management Platform uses them to identify the values for the template definition.
If you wanted the value sac-contact in your definition, you would need to specify the column Contact, while the key column would be Sacramento.
- If you wanted to specify interfaces and other values,
you would simply add a column for each type of value, which specifies
two interfaces on a single device, as well as MTU and traps for each.
You must correctly identify the column from which the value is to be taken and the key column when you select the CSV file during the template definition creation process. You do not necessarily need to note down this information, because you can view the contents of the CSV file in Junos Space Network Management Platform when you choose column and key column.
- Save the CSV file on your system.
Using a CSV file to set device-specific values
You use the CSV file to set device-specific values in a template definition.
To use a CSV file to set device-specific values in a template definition:
- On the Junos Space Network Management Platform user interface,
select Device Templates > Definitions.
The Definitions page is displayed.
- Click the Create Template Definition icon on
the Actions bar.
The Create Template Definition page is displayed.
- Add the configuration option for which you want to supply device-specific values using a CSV file that you have already created.
- Click the Advanced tab.
- Select the Device Specific check box.
- Click Next.
- Click the Device Specific Value link.
The Device Specific Value - Authorization pop-up window is displayed.
- Select the Resolve the value from a CSV file at deploy time checkbox.
- Click Please select a CSV file.
The Manage CSV files pop-up window is displayed.
Use the Manage CSV files workflow to either select a file already in the system, or to navigate and upload CSV files from the local file system. You can view the content of a CSV file already in the system by selecting it in the left pane. Its content displays in the right pane.
- To use a CSV file already in the system, select it and click OK.
- Specify the column and the key column in the CSV file.
- Select the Resolve the value from a CSV file at deploy
time check box.
You can now add rules. See Working with Rules in a Template Definition to know how to add, delete, and move rules.
- Click Finish.