Templates
The CLI Based Provisioning Templates screen displays information about Provisioning Templates that you can use to push a configuration to the Switch. The Provisioning Template contains CLI commands that are applied during the onboarding process before the Switch becomes managed. This screen is also used to create, edit, and delete Provisioning Templates.
![image-20240214-193856.png](../__attachments/812285956/image-20240214-193856.png?inst-v=6ef7d778-2e59-416c-b000-0656d7e2d419)
Creating a Provisioning Template
To create a Provisioning Template, click on Create Template to bring up the Create Template screen. Complete the fields as described below, then click on Save.
![image-20240215-190326.png](../__attachments/812285956/image-20240215-190326.png?inst-v=6ef7d778-2e59-416c-b000-0656d7e2d419)
Type Selection - Select the type of Provisioning Template that you want to create (Initial or Incremental):
Initial - An Initial template is assigned to a Switch when the Switch is added to the Device Catalog or when editing device settings for an existing Switch. The CLI commands in the template are applied during the onboarding process before the Switch becomes managed.
Incremental - An Incremental template is assigned to one or more managed Switches. The CLI commands in the template are applied when the template is assigned.
Name - Enter a name to assign to the Provisioning Template.
Template Details
Instructions for configuring a Static IP address for a specific switch (using a Serial Number Rule or MAC Address Rule) are displayed when you bring up the Provisioning Template. Follow the instructions if you want to configure a Static IP Address in the template. The instructions are commented out. You can delete them or just configure the template below them.
You cannot configure a Static IP address that is assigned to a device in the Device Catalog List. You must first delete that device from the Device Catalog List before using that IP address. If a device serial number (or a device with same IP address) already exists in the Device Catalog List, it must first be deleted from the Device Catalog List before it can be onboarded again.
The Provisioning Template is created using CLI syntax. A Provisioning Template is a set of commands that are read by the switch on reloading. A template can be static or dynamic. A Static Template (see sample below) is a template without variables. It is useful for deployments where all switches can work with exactly the same configurations. The IP address is typically given by a DHCP server in such a deployment.
![image-20240214-205653.png](../__attachments/812285956/image-20240214-205653.png?inst-v=6ef7d778-2e59-416c-b000-0656d7e2d419)
Certain commands that are handled by the Provisioning Manager in AOS cannot be included in a Provisioning Template (e.g., user admin password, write memory, configuration apply). If these commands are included in a Provisioning Template, provisioning will fail. If provisioning fails for any reason, go to the Resultsscreen and check the "Last Provision Message" column for more information. If the Provisioning Template is the problem, make any necessary updates to the Provisioning Template, and save it. The next time the switch contacts the OmniVista Cirrus Server, provisioning should be successful.
A Dynamic Template (see sample below) is a template with variables. It allows you to reuse the same Provisioning Template even though different switches might need different values for some configurations. For example, different branches of an enterprise might use a different subnet range or VLAN.
![image-20240214-212837.png](../__attachments/812285956/image-20240214-212837.png?inst-v=6ef7d778-2e59-416c-b000-0656d7e2d419)
Special characters cannot be used when creating mapping variables (e.g., @ # +). OmniVista Cirrus will ignore special characters. For example, "$test" is a correct mapping variable format. "$test@#+" will also be read as "$test" by OmniVista Cirrus. Also note that mapping variables cannot have spaces. If required, multi-word variables must be separated by an underscore (e.g., $test_1, not $test 1 or $test-1).
If you are using a Dynamic Template, a Value Mapping is required to define the variables used in the Dynamic Template. At the time you select a Dynamic Template for a Switch, you are prompted to select an existing Value Mapping or create a new mapping. Use the Value Mappings screen to view existing and/or create new variable mappings.
Editing a Provisioning Template
You can edit the Provisioning Template to modify the CLI commands. For example, if the Resultsscreen indicates provisioning failed due to a problem with the Provisioning Template, you can edit the template file to correct the problem.
To modify Provisioning Template commands, select an existing template and click on the Edit icon under the “Actions” column or select Edit from the Actions drop-down menu to bring up the Edit Template screen. Edit the CLI commands as needed, then click on Save.
You cannot change the type of template or the template name. For example, if the template was created as an “Initial” template, you cannot change the template type to “Incremental”. You can change the CLI commands in “Template Details”.
![image-20240216-185914.png](../__attachments/812285956/image-20240216-185914.png?inst-v=6ef7d778-2e59-416c-b000-0656d7e2d419)
![image-20240215-214550.png](../__attachments/812285956/image-20240215-214550.png?inst-v=6ef7d778-2e59-416c-b000-0656d7e2d419)
Deleting a Provisioning Template
You can delete one or more Provisioning Templates from the templates list using one of the following methods:
To delete one or more Provisioning Templates, select the template(s) that you want to delete, then click on Actions and select Delete from the drop-down menu.
To delete a single Provisioning Template, click on the Delete icon under the “Actions” column next to the template that you want to delete.
![image-20240216-185744.png](../__attachments/812285956/image-20240216-185744.png?inst-v=6ef7d778-2e59-416c-b000-0656d7e2d419)
When you select one or more templates to delete, you are prompted with a Warning message to confirm your delete request.
![image-20240215-223747.png](../__attachments/812285956/image-20240215-223747.png?inst-v=6ef7d778-2e59-416c-b000-0656d7e2d419)
Click on Delete to confirm that you want to delete the Provisioning Templates listed in the Warning message.
Deleting a Provisioning Template will not affect any Switches that were successfully provisioned with the deleted template.
Display Provisioning Template Information
Click the Additional Information icon next to a Provisioning Template entry to display the Provisioning Template Information screen. The information displayed on this screen is defined below.
![image-20240216-185651.png](../__attachments/812285956/image-20240216-185651.png?inst-v=6ef7d778-2e59-416c-b000-0656d7e2d419)
![image-20240216-183727.png](../__attachments/812285956/image-20240216-183727.png?inst-v=6ef7d778-2e59-416c-b000-0656d7e2d419)
Name - The name assigned to the template.
Type - The type of template (Initial or Incremental)
Template Details - The CLI commands that are pushed to the switch and appended to the switch configuration.