Catalyst Center Templates
Day-N Template Structure
! ============================================
! Catalyst Center Day-N Template
! Template: Access Switch Baseline
! ============================================
{% if enable_dot1x %}
! 802.1X Configuration
aaa new-model
dot1x system-auth-control
{% endif %}
{% if enable_sgt %}
! TrustSec Configuration
cts credentials id $hostname password {{ trustsec_password }}
cts role-based enforcement
{% endif %}
! Management Configuration
hostname {{ hostname }}
ip domain name {{ domain_name | default('inside.domusdigitalis.dev') }}
! NTP
{% for ntp_server in ntp_servers %}
ntp server {{ ntp_server }}
{% endfor %}
! Logging
{% for syslog_server in syslog_servers %}
logging host {{ syslog_server }}
{% endfor %}
logging buffered 64000 informational
Template Variables
Catalyst Center binds these variables at provisioning time:
| Variable | Description | Source |
|---|---|---|
|
Device hostname |
Inventory |
|
Management IP |
Inventory |
|
Site identifier |
Hierarchy |
Custom variables |
User-defined |
Template form |
Deployment Workflow
-
Upload template to Catalyst Center
-
Bind to network profile
-
Associate with site hierarchy
-
Provision devices
API Integration
# Upload template via API
import requests
url = "https://catalyst-center/dna/intent/api/v1/template-programmer/project"
headers = {"X-Auth-Token": token}
template_payload = {
"name": "Access-Switch-Baseline",
"templateContent": template_content,
"deviceTypes": [{"productFamily": "Switches and Hubs"}]
}
response = requests.post(url, json=template_payload, headers=headers)