Templates
5 mins
V6 ProV6 MSPV6 Core
Overview
Device Connection templates are used to specify connection and CLI settings for device types, when rConfig attempts to connect to devices. Lets go over some rules for templates;
- Multiple devices can use the same template
- One device can only be configured to use a single template
- Templates are configured in yaml and the specific details for key/ value pairs are on the github link below
- You can have unlimited templates
- If you create a working template for a device not in the repo above, please email it to help@rconfig.com for inclusion in the repository so that others may use it.
- Templates are a common construct between all rConfig versions, therefore we are keeping the template repository open and on github rConfig v6 comes with 4 templates by default, which suit a lot of devices types. Though they are labeled Cisco. They frequently support other device manufacturers, but not always.
ℹ️ Visit https://github.com/rconfig/rConfig-templates for latest templates and documentation on template standards
Main View
A quick look at the templates table will give you a view of the templates available. You can add a template, and import the full template repository. Templates main view
Repository Import
We have made it really easy to import all rConfig templates from our repo in a single click. By clicking the Import button with the Github icon, rConfig will download the entire template repo for use when creating new templates.
Successful repo importCreate/Edit a template
Adding a template is pretty easy. Click New Template, change the file name and update the name:
and desc:
fields directly in the editor. You can then click the Save button to save the template. Just click the Edit icon in the main view to edit the template.
You may also click the 'Create from Template' link in the Add Template form to pre-populate the editor with a template as previously downloaded from the repo.
Notes on the YAML editor;
- All comments are prefixed with a '#' You can add as many comments as you like. You are advised to not remove default comments, but you can if you wish.
- Visit https://github.com/rconfig/rConfig-templates for detailed information on each key/value pairs.
- The username and password keys, must not contain your devices usernames/ passwords as values. The values for these are the username and password prompts
- This editor does not include a syntax checker, so be very careful for typos, extra spaces, and proper use quotations marks and indentation where required, and where they are not required. Formatting is important.
- You need enter a filename when creating a file. Recommended filename format should be as follows;
vendorName-ModelNumber-ConnectionType-isEnableModeOrNot.yml i.e. dell-6248-telnet-enable.yml
You can debug templates by assigning them to a test/dev device and running rConfig commands, per the CLI commands section later in these docs, to review if they require further development or tweaking.
Once a template is created, you can configure devices in the device management page to use these templates for connections.
ℹ️ Please note, as of V6.9.0 our recommendation for the timeout value for connections templates is between 5 and 30 seconds. This is to allow for devices that take a long time to respond to commands. If you are having issues with devices timing out, try adjusting the timeout value in the template. If you have a timeout of 60 seconds, which is our old default, you may need to adjust this to 30 seconds or less.