Template
Location in GUI: Design
» CLI Templates
Diagram
Classes
projects (catalyst_center.templates)
Name | Type | Constraint | Mandatory | Default Value |
---|---|---|---|---|
dayn_templates | List | [dayn_templates] | No |
dayn_templates (catalyst_center.templates.projects)
Name | Type | Constraint | Mandatory | Default Value |
---|---|---|---|---|
name | String | Yes | ||
version | String | No | ||
description | String | No | ||
language | Choice | JINJA , VELOCITY | No | |
device_types | List | [device_types] | No | |
software_type | String | No | ||
software_version | String | No | ||
variables | List | [variables] | No | |
tags | List | String | No | |
management_device_ips | List | String | No | |
containing_templates | List | String | No | |
composite | Boolean | true , false | No |
device_types (catalyst_center.templates.projects.dayn_templates)
Name | Type | Constraint | Mandatory | Default Value |
---|---|---|---|---|
product_family | String | Yes | ||
product_series | String | No | ||
product_type | String | No |
variables (catalyst_center.templates.projects.dayn_templates)
Name | Type | Constraint | Mandatory | Default Value |
---|---|---|---|---|
name | String | Yes | ||
field_name | String | No | ||
required | Boolean | true , false | No | |
data_type | Choice | STRING , INTEGER , IPADDRESS , MACADDRESS , SECTIONDIVIDER | Yes | |
hint_text | String | No | ||
additional_info | String | No |
Examples
DayN template example:
catalyst_center: templates: projects: - name: Project_DayN description: Project_DayN dayn_templates: - name: access_list_template description: Access List Template language: JINJA composite: false device_types: - product_family: "Switches and Hubs" product_series: "Cisco Catalyst 9300 Series Switches" software_type: IOS-XE
The content of the template must be stored in the templates/ directory inside a JINJA file, with the file name matching the template name:
access_list_template.j2
## Access Listip access-list standard 2010 permit 10.0.0.0 0.0.0.25520 permit 20.0.0.0 0.0.0.255
Onboarding template example:
catalyst_center: templates: projects: - name: Project_Onboarding description: Project_Onboarding onboarding_templates: - name: onboarding_template description: Onboarding Template language: JINJA composite: false device_types: - product_family: "Switches and Hubs" product_series: "Cisco Catalyst 9300 Series Switches" software_type: IOS-XE
Composite templates example:
catalyst_center: templates: projects: - name: Project_DayN description: Project_DayN dayn_templates: - name: ACL_COMPOSITE description: ACL COMPOSITE language: JINJA composite: true device_types: - product_family: "Switches and Hubs" product_series: "Cisco Catalyst 9300 Series Switches" software_type: IOS-XE containing_templates: - ACL_41 - ACL_42
Templates content:
ACL_41
ip access-list standard 4110 permit {{acl_ip_address}} 0.0.0.255
ACL_42
ip access-list standard 4210 permit {{acl_ip_address}} 0.0.0.255
Example of Assigning DayN Template to Network Profile:
catalyst_center: network_profiles: switching: - name: SDA SWITCH PROFILE dayn_templates: - ACL_COMPOSITE sites: - Global/United States/Golden Hills Campus/Sunset Tower - Global/United States/Lakefront Tower/Windy City Plaza - Global/United States/Oceanfront Mansion/Art Deco Mansion - Global/United States/Desert Oasis Branch/Desert Oasis Tower
Example of Deploying DayN Template on Device:
catalyst_center: inventory: devices: - name: EDGE01.cisco.com hostname: EDGE01.cisco.com device_ip: 192.168.30.64 serial_number: FOC2644021A pid: C9300-24P state: PROVISION dayn_templates: composite: - name: ACL_COMPOSITE state: DEPLOY variables: - name: acl_ip_address value: 21.21.21.0 template_name: ACL_41 - name: acl_ip_address value: 22.22.22.0 template_name: ACL_42