Catalyst Center Templates

Overview

Catalyst Center (formerly DNA Center) Day-N templates for automated network provisioning.

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

$hostname

Device hostname

Inventory

$managementIpAddress

Management IP

Inventory

$siteId

Site identifier

Hierarchy

Custom variables

User-defined

Template form

Deployment Workflow

  1. Upload template to Catalyst Center

  2. Bind to network profile

  3. Associate with site hierarchy

  4. 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)