Templates consist of the following sections, properties, variables and the template body. Each of these is stored together in a version. The following picture shows three different versions of a template, each with a different set of properties, variables and template body. An example of the template properties appears below. There are two mandatory properties • the device type, which can be as broad as a family (e.g. all switches) or as narrow as a particular model (e.g. Catalyst 9300). • The operating system E.g. IOS-XE.
Variables are defined in a template ($hostname) is an indication of a variable. A variable can have a type, a default value, or in some circumstances, be marked as not a variable.
This is useful for encrypted passwords, where “$” might appear as part of the configuration.
The final part of the template is the body. This is velocity syntax. The following extremely simple template sets the hostname of a device. A hostname is also a variable.
Templates are stored in projects, which you can think of like a folder in a directory structure. The template name inside a project is unique, while different projects can contain a template with the same name. Remember, although these templates share the same name, they are different instances as they are in different projects. You can see an example of projects below. “Onboarding Configuration” and “Cloud DayN Templates” are two projects that are always present.
Read more here: blogs.cisco.com
More resources:
pyATS | Genie APIs Unlock the Power of Cisco DNA Center
Get a Basic Understanding of Meraki APIs