Chapter 8 Data Models and Dynamic Templates

For diagrams, tables, or exact code formatting, .

JOHN W. CAPOBIANCOPRINTED PAGE 126

CAMPUS.YML

--- 
 
global_campus_defaults: 
  enable_secret: $1$pdQG$0WzLBXX2$voWhxEdsiLm11 
 
  domain: ayn.com 
  snmp_communities: 
    readonly: 
      type: "RO 1" 
    rewrite: 
      type: "RW 1" 
 
  native_vlan: "99" 
 
  snmp_hosts: 
     10.10.100.25: 
       communities: 
         - RO 
         - RW 
 
     10.10.100.26: 
       communities: 
         - RW 
 
  logging_hosts: 
    - 10.10.100.30 
    - 10.10.100.31 
 
global_campus_dhcp_servers: 
 
  prod: 
    - 10.10.100.2 
    - 10.10.100.3 
 
  dev: 
    - 10.10.200.2 
    - 10.10.200.3 
 
global_campus_access_lists: 
    1: 
      permit: 
        - 10.10.100.50 
        - 10.10.100.51 
      deny:  
       - "any log" 
 
    10: 
      permit: 
        - any 
 
For templating purposes, if global_campus_defaults.domain is called, the value “ayn.com” is 
returned. For a dynamic template this means coverage for the domain name in all network device 
configurations across the campus. This becomes standardized in the builds. In this example we have 
global_campus_defaults, global_campus_dhcp_servers, and global_campus_access_lists. Since these