Chapter 8 Data Models and Dynamic Templates

For diagrams, tables, or exact code formatting, .

JOHN W. CAPOBIANCOPRINTED PAGE 142
11: 
    name: BLUE_Zone_Voice_First_Floor 
 
   12: 
    name: BLUE_Zone_Second_Floor 
 
   13: 
    name: BLUE_Zone_Video_Second_Floor 
 
   20: 
    name: RED_Zone 
   
   30: 
    name: GREEN_Zone 
 
   50: 
    name: SECURITY 
 
VRF 
 
{% if platform_defaults.type == 6000 or platform_defaults.type == 4000 %} 
{%     for host_vrf in host_vrfs %} 
{%         if host_vrf == "global" %} 
{%         else %} 
vrf definition {{ host_vrf }} 
{%         endif %} 
{%         if host_vrf == "global" %} 
{%         else %} 
 vnet tag {{ host_vrfs[host_vrf].tag }} 
 address-family ipv4 
 exit-address-family 
{%         endif %} 
{%         if host_vrfs[host_vrf].multicast is defined %} 
ip multicast-routing vrf {{ host_vrf }} 
{%         endif %} 
{%     endfor %}  
{% endif %} 
 
Data model – group_vars CAMPUS-DIST.YML and CAMPUS-CORE.YML

platform_defaults: type: 4000 platform_defaults: type: 6000 Data model – host_vars DIST01.YML Note: Below illustrates the data holistically and abstracted from the raw configuration. Not only is the VRF modeled, the matching OSPF information is also included, as every VRF equates to a routing table. This looks at the model as a service and an intent-based view of the device. host_vrfs: global: tag: 1