Skip to content

EOS Designs internal notes

Warning

Anything mentioned here is subject to change without notice. Use of avd_switch_facts in custom templates is not supported and should be avoided.

Overview

flowchart TD
  subgraph role[arista.avd.eos_designs role]
    eos_designs_facts[[arista.avd.eos_designs_facts action plugin]] -->
    eos_designs_structured_config[[arista.avd.eos_designs_structured_config action plugin]]-->
    RemoveAvdSwitchFacts(Remove AvdSwitchFacts)
  end

Ansible Action Plugins

arista.avd.eos_designs_facts

The arista.avd.eos_designs_facts module is an Ansible Action Plugin providing the following capabilities:

  • Set avd_switch_facts fact containing internal AVD facts per switch.

The plugin is designed to run_once. With this, Ansible will set the same facts on all devices, so all devices can lookup values of any other device without using the slower hostvars.

The module is used in arista.avd.eos_designs to set facts for devices, which are then used by Python modules loaded in arista.avd.eos_designs_structured_config to generate the structured_configuration.

Arguments

  template_output: <true | false | default -> false>
  cprofile_file: <Filename for storing cprofile data used to debug performance issues>

See the full argument spec here

Output data model

ansible_facts:
  avd_switch_facts:
    <switch_1>: < dict with internal AVD facts used within eos_designs >
    <switch_2>: ...

The facts for each device follows the schema described here.

The facts are stored in intended/tmp_eos_designs/eos_designs_facts.json and can be inspected by running the arista.avd.eos_designs role with -e eos_designs_keep_tmp_files="{{ true }}".

Internal structure

classDiagram
  direction LR
  class eos_designs_facts{
    - Verify devices are in one fabric group
    - Read and template default role_vars
    - Read and validate Hostvars for all devices
    - Instantiate SharedUtils and EosDesignsFacts classes per device
    - Set "avd_switch_facts" referencing all EosDesignsFacts instances
    - Run "render" method on all EosDesignsFacts instances
    - Build facts from data returned by "render"
  }
  class ActionBase{
  }
  class AvdSchemaTools{
  }
  class EosDesignsFacts{
    avd_switch_facts: dict[str, EosDesignsFacts]
    render(): dict
  }
  ActionBase <|-- eos_designs_facts : extends
  eos_designs_facts --* AvdSchemaTools
  eos_designs_facts --* "many" EosDesignsFacts : per device
  EosDesignsFacts ..> eos_designs_facts : pointer to instances for other devices

arista.avd.eos_designs_structured_config

TODO

Python packages

AvdFacts

The AvdFacts class serve as a base class for EosDesignsFacts as well as the many AvdStructuredConfig* classes.

The purpose of AvdFacts subclasses is to return a dictionary when the render method is called.

The class is also partially emulating a dict type by exposing keys() and get() methods and exposing all public attributes as cached_property. This allows for a class instance to be used as part of a deeper data model, where our utility tools can traverse deeper data models using dot-notation. It also allows for partial rendering of data, since only the accessed attributes/cached_properties will be rendered.

The base class has a few important methods:

  • keys() return a list of attributes not beginning with an underscore and where the attribute is decorated with cached_property. These attributes represent the keys in the emulated dict.
  • render() loop over every attribute returned by keys() and return a dict with all the returned cached_properties, except cached_property with a value of None which will be skipped.
  • get(key, default=None) returns the value of the requested “key” (cached_property) if the “key” is in the list returned by keys(). Otherwise the default value is returned.

See the source code here

get_structured_config

TODO

EosDesignsFacts

EosDesignsFacts is based on AvdFacts, so make sure to read the description there first.

The class is instantiated once per device. Methods may use references to other device instances using hostvars.avd_switch_facts, which is a dict of EosDesignsfacts instances covering all devices.

See the source code here

classDiagram
  direction LR
  class AvdFacts{
    render(): dict
  }
  class EosDesignsFacts{
    shared_utils: SharedUtils
    _hostvars: dict
  }
  class MlagMixin
  class OverlayMixin
  class ShortEsiMixin
  class UplinksMixin
  class VlansMixin
  class SharedUtils
  AvdFacts <|-- EosDesignsFacts : extends
  MlagMixin <|-- EosDesignsFacts : extends
  OverlayMixin <|-- EosDesignsFacts : extends
  ShortEsiMixin <|-- EosDesignsFacts : extends
  UplinksMixin <|-- EosDesignsFacts : extends
  VlansMixin <|-- EosDesignsFacts : extends
  EosDesignsFacts --* SharedUtils
  SharedUtils ..> EosDesignsFacts

SharedUtils

See the source code here

classDiagram
  direction LR
  class InterfaceDescriptionsMixin
  class BgpPeerGroupsMixin
  class LinkTrackingGroupsMixin
  class MgmtMixin
  class MlagMixin
  class MiscMixin
  class NodeTypeKeyMixin
  class OverlayMixin
  class PlatformMixin
  class PtpMixin
  class SwitchDataMixin
  class RoutingMixin
  class UnderlayMixin
  class UtilsMixin
  class IpAddressingMixin
  InterfaceDescriptionsMixin --* AvdInterfaceDescriptions
  InterfaceDescriptionsMixin <|-- SharedUtils : extends
  BgpPeerGroupsMixin <|-- SharedUtils : extends
  LinkTrackingGroupsMixin <|-- SharedUtils : extends
  MgmtMixin <|-- SharedUtils : extends
  MlagMixin <|-- SharedUtils : extends
  MiscMixin <|-- SharedUtils : extends
  NodeTypeKeyMixin <|-- SharedUtils : extends
  OverlayMixin <|-- SharedUtils : extends
  PlatformMixin <|-- SharedUtils : extends
  PtpMixin <|-- SharedUtils : extends
  SwitchDataMixin <|-- SharedUtils : extends
  RoutingMixin <|-- SharedUtils : extends
  UnderlayMixin <|-- SharedUtils : extends
  UtilsMixin <|-- SharedUtils : extends
  IpAddressingMixin <|-- SharedUtils : extends
  IpAddressingMixin --* AvdIpAddressing

AvdStructuredConfig*

AvdStructuredConfig* classes are based on AvdFacts, so make sure to read the description there first.

The generation of the final structured_config is split into multiple python modules which are subclasses of AvdFacts. Each class is loaded in get_structured_config and rendered. All the results are deepmerged into the final structured_config.

The class is instantiated once per device. Methods may use references to other device instances using hostvars.avd_switch_facts, which at the time where eos_designs_structured_config run, is a nested dict. It contains the output from EosDesignsFacts’s render() method.

Subclasses are typically using Mixin classes to split all the attributes/cached_properties into manageable files.

See the source code here

classDiagram
  direction LR
  class AvdFacts{
    render(): dict
  }
  class AvdStructuredConfigBase
  class AvdStructuredConfigConnectedEndpoints
  class AvdStructuredConfigCoreInterfacesAndL3Edge
  class AvdStructuredConfigCustomStructuredConfiguration
  class AvdStructuredConfigInbandManagement
  class AvdStructuredConfigMlag
  class AvdStructuredConfigNetworkServices
  class AvdStructuredConfigOverlay
  class AvdStructuredConfigUnderlay
  AvdFacts <|-- AvdStructuredConfigBase : extends
  AvdFacts <|-- AvdStructuredConfigConnectedEndpoints : extends
  AvdFacts <|-- AvdStructuredConfigCoreInterfacesAndL3Edge : extends
  AvdFacts <|-- AvdStructuredConfigCustomStructuredConfiguration : extends
  AvdFacts <|-- AvdStructuredConfigInbandManagement : extends
  AvdFacts <|-- AvdStructuredConfigMlag : extends
  AvdFacts <|-- AvdStructuredConfigNetworkServices : extends
  AvdFacts <|-- AvdStructuredConfigOverlay : extends
  AvdFacts <|-- AvdStructuredConfigUnderlay : extends
  AvdStructuredConfigBase --* SharedUtils
  AvdStructuredConfigConnectedEndpoints --* SharedUtils
  AvdStructuredConfigCoreInterfacesAndL3Edge --* SharedUtils
  AvdStructuredConfigCustomStructuredConfiguration --* SharedUtils
  AvdStructuredConfigInbandManagement --* SharedUtils
  AvdStructuredConfigMlag --* SharedUtils
  AvdStructuredConfigNetworkServices --* SharedUtils
  AvdStructuredConfigOverlay --* SharedUtils
  AvdStructuredConfigUnderlay --* SharedUtils

Facts set at runtime

avd_switch_facts

The following model is set as eos_designs_facts. Most keys are optional depending on the use case and configuration.

Variable Type Required Default Value Restrictions Description
id Integer
type String Required
platform String
is_deployed Boolean Required
serial_number String
mgmt_interface String
mgmt_ip String
mpls_lsr Boolean Required
evpn_multicast Boolean
loopback_ipv4_pool String
loopback_ipv6_pool String
uplink_ipv4_pool String
uplink_ipv6_pool String
downlink_pools List, items: Dictionary IPv4 pools used for links to downlink switches. Set this on the parent switch. Cannot be combined with uplink_ipv4_pool set on the downlink switch.
  - ipv4_pool String Format: ipv4_pool Comma separated list of prefixes (IPv4 address/Mask) or ranges (IPv4_address-IPv4_address).
IPv4 subnets used for links to downlink switches will be derived from this pool based on index the peer’s uplink interface’s index in ‘downlink_interfaces’.
    ipv6_pool String Format: ipv6_pool Comma separated list of prefixes (IPv6 address/Mask) or ranges (IPv6_address-IPv6_address).
IPv6 subnets used for links to downlink switches will be derived from this pool based on index the peer’s uplink interface’s index in ‘downlink_interfaces’.
    downlink_interfaces List, items: String List of downlink interfaces or ranges of interfaces to use this pool. The index of the interface in this list will determine which subnet will be taken from the pool.
      - <str> String
bgp_as String
underlay_routing_protocol String Required
vtep_loopback_ipv4_pool String
inband_mgmt_subnet String
inband_mgmt_ipv6_subnet String
inband_mgmt_vlan Integer
inband_ztp Boolean
inband_ztp_vlan Integer
inband_ztp_lacp_fallback_delay Integer
dc_name String
group String
router_id String
inband_mgmt_ip String Used for fabric docs.
inband_mgmt_interface String Used for fabric docs.
pod String Required Used for fabric docs.
connected_endpoints_keys List, items: Dictionary Required List of connected_endpoints_keys in use on this device.
Used for fabric docs.
  - key String Required, Unique
    type String Type used for documentation.
    description String Description used for documentation.
port_profile_names List, items: Dictionary List of port_profiles configured - including the ones not in use.
Used for fabric docs.
  - profile String Required
    parent_profile String
mlag_peer String
mlag_port_channel_id Integer
mlag_interfaces List, items: String
  - <str> String
mlag_ip String
mlag_l3_ip String
mlag_switch_ids Dictionary The switch ids of both primary and secondary switches for a this node group.
  primary Integer Required
  secondary Integer Required
mlag_underlay_multicast Dictionary Should multicast be enabled on the mlag peer-l3-vlan.
  pim_sm Boolean Required
  static Boolean Required
evpn_role String
mpls_overlay_role String
evpn_route_servers List, items: String For evpn clients the default value for EVPN Route Servers is the content of the uplink_switches variable set elsewhere.
For all other evpn roles there is no default.
  - <str> String
mpls_route_reflectors List, items: String List of inventory hostname acting as MPLS route-reflectors.
  - <str> String Inventory_hostname_of_mpls_route_reflectors.
overlay Dictionary
  peering_address String
  evpn_mpls Boolean Required
vtep_ip String
vtep_ipv6 String
max_parallel_uplinks Integer 1 Number of parallel links towards uplink switches.
Changing this value may change interface naming on uplinks (and corresponding downlinks).
Can be used to reserve interfaces for future parallel uplinks.
max_uplink_switches Integer Required
uplinks List, items: Dictionary Required List of uplinks with all parameters
These facts are leveraged by templates for this device when rendering uplinks
and by templates for peer devices when rendering downlinks
  - interface String Required
    peer String Required
    peer_interface String Required
    peer_type String Required
    peer_is_deployed Boolean Required
    peer_bgp_as String
    type String Required Valid Values:
- underlay_p2p
- underlay_l2
    speed String Valid Values:
- 100full
- 100g
- 100g-1
- 100g-2
- 100g-4
- 100half
- 10full
- 10g
- 10half
- 1g
- 200g
- 200g-2
- 200g-4
- 25g
- 400g
- 400g-4
- 400g-8
- 40g
- 50g
- 50g-1
- 50g-2
- 800g-8
- sfp-1000baset auto 100full
- 1.6t-8
- 100mfull
- 100mhalf
- 10mfull
- 10mhalf
- 200g-1
- 400g-2
- 40g-4
- 800g-4
- auto
- auto 10000full
- auto 1000full
- auto 100full
- auto 100g-1
- auto 100g-2
- auto 100g-4
- auto 100gfull
- auto 100half
- auto 10full
- auto 10gfull
- auto 10half
- auto 1gfull
- auto 2.5gfull
- auto 200g-2
- auto 200g-4
- auto 25gfull
- auto 400g-4
- auto 400g-8
- auto 40gfull
- auto 50g-1
- auto 50g-2
- auto 50gfull
- auto 5gfull
- auto 800g-8
- auto 1.6t-8
- auto 100mfull
- auto 100mhalf
- auto 10g
- auto 10mfull
- auto 10mhalf
- auto 1g
- auto 2.5g
- auto 200g-1
- auto 25g
- auto 400g-2
- auto 40g-4
- auto 5g
- auto 800g-4
- forced 10000full
- forced 1000full
- forced 1000half
- forced 100full
- forced 100gfull
- forced 100half
- forced 10full
- forced 10half
- forced 25gfull
- forced 40gfull
- forced 50gfull
Interface Speed.
    bfd Boolean
    peer_speed String Valid Values:
- 100full
- 100g
- 100g-1
- 100g-2
- 100g-4
- 100half
- 10full
- 10g
- 10half
- 1g
- 200g
- 200g-2
- 200g-4
- 25g
- 400g
- 400g-4
- 400g-8
- 40g
- 50g
- 50g-1
- 50g-2
- 800g-8
- sfp-1000baset auto 100full
- 1.6t-8
- 100mfull
- 100mhalf
- 10mfull
- 10mhalf
- 200g-1
- 400g-2
- 40g-4
- 800g-4
- auto
- auto 10000full
- auto 1000full
- auto 100full
- auto 100g-1
- auto 100g-2
- auto 100g-4
- auto 100gfull
- auto 100half
- auto 10full
- auto 10gfull
- auto 10half
- auto 1gfull
- auto 2.5gfull
- auto 200g-2
- auto 200g-4
- auto 25gfull
- auto 400g-4
- auto 400g-8
- auto 40gfull
- auto 50g-1
- auto 50g-2
- auto 50gfull
- auto 5gfull
- auto 800g-8
- auto 1.6t-8
- auto 100mfull
- auto 100mhalf
- auto 10g
- auto 10mfull
- auto 10mhalf
- auto 1g
- auto 2.5g
- auto 200g-1
- auto 25g
- auto 400g-2
- auto 40g-4
- auto 5g
- auto 800g-4
- forced 10000full
- forced 1000full
- forced 1000half
- forced 100full
- forced 100gfull
- forced 100half
- forced 10full
- forced 10half
- forced 25gfull
- forced 40gfull
- forced 50gfull
Interface Speed.
    ptp Dictionary Enable PTP on all infrastructure links.
      enable Boolean False
    mac_security Dictionary
      profile String Required
    underlay_multicast_pim_sm Boolean
    underlay_multicast_static Boolean
    ipv6_enable Boolean
    prefix_length Integer
    ip_address String
    peer_ip_address String
    link_tracking_groups List, items: Dictionary
      - name String Required, Unique
        direction String Required Valid Values:
- upstream
- downstream
    peer_node_group String
    node_group String
    mlag Boolean
    peer_mlag Boolean
    channel_group_id Integer
    peer_channel_group_id Integer
    trunk_groups List, items: String
      - <str> String
    peer_trunk_groups List, items: String
      - <str> String
    vlans String
    native_vlan Integer
    short_esi String
    peer_short_esi String
    spanning_tree_portfast String Valid Values:
- edge
- network
    peer_spanning_tree_portfast String Valid Values:
- edge
- network
    sflow_enabled Boolean
    flow_tracking Dictionary Enable flow-tracking on all fabric uplinks.
      enabled Boolean False
      name String FLOW-TRACKER Flow tracker name as defined in flow_tracking_settings.
    inband_ztp_vlan Integer
    inband_ztp_lacp_fallback_delay Integer
    dhcp_server Boolean
    ethernet_structured_config Dictionary Custom structured config applied to uplink_interfaces.
    port_channel_structured_config Dictionary Custom structured config applied to the uplink Port-Channel when using port-channel uplinks.
    peer_ethernet_structured_config Dictionary Custom structured config applied to uplink_interfaces.
    peer_port_channel_structured_config Dictionary Custom structured config applied to the uplink Port-Channel when using port-channel uplinks.
    subinterfaces List, items: Dictionary
      - interface String Required, Unique
        peer_interface String Required
        vrf String Required
        encapsulation_dot1q_vlan Integer Required
        ipv6_enable Boolean
        prefix_length Integer
        ipv6_prefix_length Integer
        ip_address String
        ipv6_address String
        peer_ip_address String
        peer_ipv6_address String
        ethernet_structured_config Dictionary Custom structured config applied to uplink_interfaces.
uplink_peers List, items: String
  - <str> String
uplink_switch_vrfs List, items: String
  - <str> String
vlans String Required Compressed list of VLANs to be defined on this switch.
These are the available VLANs after local network-service filtering and VLAN availability filtering from uplink switches.

Ex. “1-100, 201-202”

This excludes the optional “uplink_native_vlan” if that vlan is not used for anything else.
This is to ensure that native vlan is not necessarily permitted on the uplink trunk.
endpoint_vlans String Compressed list of vlans in use by endpoints connected to this switch, downstream switches or MLAG peer and its downstream switches.
local_endpoint_trunk_groups List, items: String List of trunk_groups in use by endpoints connected to this switch.
  - <str> String
endpoint_trunk_groups List, items: String List of trunk_groups in use by endpoints connected to this switch, downstream switches or MLAG peer and its downstream switches.
  - <str> String
wan_path_groups List, items: Dictionary List of path-groups used for the WAN configuration.
  - interfaces List, items: Dictionary
      - name String Required
        public_ip String
        connected_to_pathfinder Boolean Required
        wan_circuit_id String
    name String Required, Unique Path-group name.
    id Integer Required Path-group id.
Required until an auto ID algorithm is implemented.
    description String Additional information about the path-group for documentation purposes.
    ipsec Dictionary Configuration of IPSec at the path-group level.
      dynamic_peers Boolean True Enable IPSec for dynamic peers.
      static_peers Boolean True Enable IPSec for static peers.
    import_path_groups List, items: Dictionary List of path-groups to import in this path-group.
      - remote String Remote path-group to import.
        local String Optional, if not set, the path-group name is used as local.
    default_preference String preferred Preference value used when a preference is not given for a path-group in the wan_virtual_topologies.policies input or when
the path-group is used in an auto generated policy except if excluded_from_default_policy is set to true.<br><br>Valid values are 1-65535 | "preferred" | "alternate".<br><br>preferredis converted to priority 1.<br>alternate` is converted to priority 2.
    excluded_from_default_policy Boolean False When set to true, the path-group is excluded from AVD auto generated policies.
    dps_keepalive Dictionary Period between the transmission of consecutive keepalive messages, and failure threshold.
      interval String Interval in milliseconds. Valid values are 50-60000
      failure_threshold Integer 5 Min: 2
Max: 100
Failure threshold in number of lost keep-alive messages.
uplink_switch_interfaces List, items: String
  - <str> String
downlink_switches List, items: String
  - <str> String
evpn_route_server_clients List, items: String
  - <str> String
mpls_route_reflector_clients List, items: String
  - <str> String
id: <int>
type: <str; required>
platform: <str>
is_deployed: <bool; required>
serial_number: <str>
mgmt_interface: <str>
mgmt_ip: <str>
mpls_lsr: <bool; required>
evpn_multicast: <bool>
loopback_ipv4_pool: <str>
loopback_ipv6_pool: <str>
uplink_ipv4_pool: <str>
uplink_ipv6_pool: <str>

# IPv4 pools used for links to downlink switches. Set this on the parent switch. Cannot be combined with `uplink_ipv4_pool` set on the downlink switch.
downlink_pools:

    # Comma separated list of prefixes (IPv4 address/Mask) or ranges (IPv4_address-IPv4_address).
    # IPv4 subnets used for links to downlink switches will be derived from this pool based on index the peer's uplink interface's index in 'downlink_interfaces'.
  - ipv4_pool: <str>

    # Comma separated list of prefixes (IPv6 address/Mask) or ranges (IPv6_address-IPv6_address).
    # IPv6 subnets used for links to downlink switches will be derived from this pool based on index the peer's uplink interface's index in 'downlink_interfaces'.
    ipv6_pool: <str>

    # List of downlink interfaces or ranges of interfaces to use this pool. The index of the interface in this list will determine which subnet will be taken from the pool.
    downlink_interfaces:
      - <str>
bgp_as: <str>
underlay_routing_protocol: <str; required>
vtep_loopback_ipv4_pool: <str>
inband_mgmt_subnet: <str>
inband_mgmt_ipv6_subnet: <str>
inband_mgmt_vlan: <int>
inband_ztp: <bool>
inband_ztp_vlan: <int>
inband_ztp_lacp_fallback_delay: <int>
dc_name: <str>
group: <str>
router_id: <str>

# Used for fabric docs.
inband_mgmt_ip: <str>

# Used for fabric docs.
inband_mgmt_interface: <str>

# Used for fabric docs.
pod: <str; required>

# List of connected_endpoints_keys in use on this device.
# Used for fabric docs.
connected_endpoints_keys: # required
  - key: <str; required; unique>

    # Type used for documentation.
    type: <str>

    # Description used for documentation.
    description: <str>

# List of port_profiles configured - including the ones not in use.
# Used for fabric docs.
port_profile_names:
  - profile: <str; required>
    parent_profile: <str>
mlag_peer: <str>
mlag_port_channel_id: <int>
mlag_interfaces:
  - <str>
mlag_ip: <str>
mlag_l3_ip: <str>

# The switch ids of both primary and secondary switches for a this node group.
mlag_switch_ids:
  primary: <int; required>
  secondary: <int; required>

# Should multicast be enabled on the mlag peer-l3-vlan.
mlag_underlay_multicast:
  pim_sm: <bool; required>
  static: <bool; required>
evpn_role: <str>
mpls_overlay_role: <str>

# For evpn clients the default value for EVPN Route Servers is the content of the uplink_switches variable set elsewhere.
# For all other evpn roles there is no default.
evpn_route_servers:
  - <str>

# List of inventory hostname acting as MPLS route-reflectors.
mpls_route_reflectors:

    # Inventory_hostname_of_mpls_route_reflectors.
  - <str>
overlay:
  peering_address: <str>
  evpn_mpls: <bool; required>
vtep_ip: <str>
vtep_ipv6: <str>

# Number of parallel links towards uplink switches.
# Changing this value may change interface naming on uplinks (and corresponding downlinks).
# Can be used to reserve interfaces for future parallel uplinks.
max_parallel_uplinks: <int; default=1>
max_uplink_switches: <int; required>

# List of uplinks with all parameters
# These facts are leveraged by templates for this device when rendering uplinks
# and by templates for peer devices when rendering downlinks
uplinks: # required
  - interface: <str; required>
    peer: <str; required>
    peer_interface: <str; required>
    peer_type: <str; required>
    peer_is_deployed: <bool; required>
    peer_bgp_as: <str>
    type: <str; "underlay_p2p" | "underlay_l2"; required>

    # Interface Speed.
    speed: <str; "100full" | "100g" | "100g-1" | "100g-2" | "100g-4" | "100half" | "10full" | "10g" | "10half" | "1g" | "200g" | "200g-2" | "200g-4" | "25g" | "400g" | "400g-4" | "400g-8" | "40g" | "50g" | "50g-1" | "50g-2" | "800g-8" | "sfp-1000baset auto 100full" | "1.6t-8" | "100mfull" | "100mhalf" | "10mfull" | "10mhalf" | "200g-1" | "400g-2" | "40g-4" | "800g-4" | "auto" | "auto 10000full" | "auto 1000full" | "auto 100full" | "auto 100g-1" | "auto 100g-2" | "auto 100g-4" | "auto 100gfull" | "auto 100half" | "auto 10full" | "auto 10gfull" | "auto 10half" | "auto 1gfull" | "auto 2.5gfull" | "auto 200g-2" | "auto 200g-4" | "auto 25gfull" | "auto 400g-4" | "auto 400g-8" | "auto 40gfull" | "auto 50g-1" | "auto 50g-2" | "auto 50gfull" | "auto 5gfull" | "auto 800g-8" | "auto 1.6t-8" | "auto 100mfull" | "auto 100mhalf" | "auto 10g" | "auto 10mfull" | "auto 10mhalf" | "auto 1g" | "auto 2.5g" | "auto 200g-1" | "auto 25g" | "auto 400g-2" | "auto 40g-4" | "auto 5g" | "auto 800g-4" | "forced 10000full" | "forced 1000full" | "forced 1000half" | "forced 100full" | "forced 100gfull" | "forced 100half" | "forced 10full" | "forced 10half" | "forced 25gfull" | "forced 40gfull" | "forced 50gfull">
    bfd: <bool>

    # Interface Speed.
    peer_speed: <str; "100full" | "100g" | "100g-1" | "100g-2" | "100g-4" | "100half" | "10full" | "10g" | "10half" | "1g" | "200g" | "200g-2" | "200g-4" | "25g" | "400g" | "400g-4" | "400g-8" | "40g" | "50g" | "50g-1" | "50g-2" | "800g-8" | "sfp-1000baset auto 100full" | "1.6t-8" | "100mfull" | "100mhalf" | "10mfull" | "10mhalf" | "200g-1" | "400g-2" | "40g-4" | "800g-4" | "auto" | "auto 10000full" | "auto 1000full" | "auto 100full" | "auto 100g-1" | "auto 100g-2" | "auto 100g-4" | "auto 100gfull" | "auto 100half" | "auto 10full" | "auto 10gfull" | "auto 10half" | "auto 1gfull" | "auto 2.5gfull" | "auto 200g-2" | "auto 200g-4" | "auto 25gfull" | "auto 400g-4" | "auto 400g-8" | "auto 40gfull" | "auto 50g-1" | "auto 50g-2" | "auto 50gfull" | "auto 5gfull" | "auto 800g-8" | "auto 1.6t-8" | "auto 100mfull" | "auto 100mhalf" | "auto 10g" | "auto 10mfull" | "auto 10mhalf" | "auto 1g" | "auto 2.5g" | "auto 200g-1" | "auto 25g" | "auto 400g-2" | "auto 40g-4" | "auto 5g" | "auto 800g-4" | "forced 10000full" | "forced 1000full" | "forced 1000half" | "forced 100full" | "forced 100gfull" | "forced 100half" | "forced 10full" | "forced 10half" | "forced 25gfull" | "forced 40gfull" | "forced 50gfull">

    # Enable PTP on all infrastructure links.
    ptp:
      enable: <bool; default=False>
    mac_security:
      profile: <str; required>
    underlay_multicast_pim_sm: <bool>
    underlay_multicast_static: <bool>
    ipv6_enable: <bool>
    prefix_length: <int>
    ip_address: <str>
    peer_ip_address: <str>
    link_tracking_groups:
      - name: <str; required; unique>
        direction: <str; "upstream" | "downstream"; required>
    peer_node_group: <str>
    node_group: <str>
    mlag: <bool>
    peer_mlag: <bool>
    channel_group_id: <int>
    peer_channel_group_id: <int>
    trunk_groups:
      - <str>
    peer_trunk_groups:
      - <str>
    vlans: <str>
    native_vlan: <int>
    short_esi: <str>
    peer_short_esi: <str>
    spanning_tree_portfast: <str; "edge" | "network">
    peer_spanning_tree_portfast: <str; "edge" | "network">
    sflow_enabled: <bool>

    # Enable flow-tracking on all fabric uplinks.
    flow_tracking:
      enabled: <bool; default=False>

      # Flow tracker name as defined in flow_tracking_settings.
      name: <str; default="FLOW-TRACKER">
    inband_ztp_vlan: <int>
    inband_ztp_lacp_fallback_delay: <int>
    dhcp_server: <bool>

    # Custom structured config applied to `uplink_interfaces`.
    ethernet_structured_config: <dict>

    # Custom structured config applied to the uplink Port-Channel when using port-channel uplinks.
    port_channel_structured_config: <dict>

    # Custom structured config applied to `uplink_interfaces`.
    peer_ethernet_structured_config: <dict>

    # Custom structured config applied to the uplink Port-Channel when using port-channel uplinks.
    peer_port_channel_structured_config: <dict>
    subinterfaces:
      - interface: <str; required; unique>
        peer_interface: <str; required>
        vrf: <str; required>
        encapsulation_dot1q_vlan: <int; required>
        ipv6_enable: <bool>
        prefix_length: <int>
        ipv6_prefix_length: <int>
        ip_address: <str>
        ipv6_address: <str>
        peer_ip_address: <str>
        peer_ipv6_address: <str>

        # Custom structured config applied to `uplink_interfaces`.
        ethernet_structured_config: <dict>
uplink_peers:
  - <str>
uplink_switch_vrfs:
  - <str>

# Compressed list of VLANs to be defined on this switch.
# These are the available VLANs after local network-service filtering and VLAN availability filtering from uplink switches.
#
# Ex. "1-100, 201-202"
#
# This excludes the optional "uplink_native_vlan" if that vlan is not used for anything else.
# This is to ensure that native vlan is not necessarily permitted on the uplink trunk.
vlans: <str; required>

# Compressed list of vlans in use by endpoints connected to this switch, downstream switches or MLAG peer and its downstream switches.
endpoint_vlans: <str>

# List of trunk_groups in use by endpoints connected to this switch.
local_endpoint_trunk_groups:
  - <str>

# List of trunk_groups in use by endpoints connected to this switch, downstream switches or MLAG peer and its downstream switches.
endpoint_trunk_groups:
  - <str>

# List of path-groups used for the WAN configuration.
wan_path_groups:
  - interfaces:
      - name: <str; required>
        public_ip: <str>
        connected_to_pathfinder: <bool; required>
        wan_circuit_id: <str>

    # Path-group name.
    name: <str; required; unique>

    # Path-group id.
    # Required until an auto ID algorithm is implemented.
    id: <int; required>

    # Additional information about the path-group for documentation purposes.
    description: <str>

    # Configuration of IPSec at the path-group level.
    ipsec:

      # Enable IPSec for dynamic peers.
      dynamic_peers: <bool; default=True>

      # Enable IPSec for static peers.
      static_peers: <bool; default=True>

    # List of path-groups to import in this path-group.
    import_path_groups:

        # Remote path-group to import.
      - remote: <str>

        # Optional, if not set, the path-group `name` is used as local.
        local: <str>

    # Preference value used when a preference is not given for a path-group in the `wan_virtual_topologies.policies` input or when
    # the path-group is used in an auto generated policy except if `excluded_from_default_policy` is set to `true.
    #
    # Valid values are 1-65535 | "preferred" | "alternate".
    #
    # `preferred` is converted to priority 1.
    # `alternate` is converted to priority 2.
    default_preference: <str; default="preferred">

    # When set to `true`, the path-group is excluded from AVD auto generated policies.
    excluded_from_default_policy: <bool; default=False>

    # Period between the transmission of consecutive keepalive messages, and failure threshold.
    dps_keepalive:

      # Interval in milliseconds. Valid values are 50-60000 | "auto".
      #
      # When auto, the interval and failure_threshold are automatically determined based on
      # path state.
      interval: <str>

      # Failure threshold in number of lost keep-alive messages.
      failure_threshold: <int; 2-100; default=5>
uplink_switch_interfaces:
  - <str>
downlink_switches:
  - <str>
evpn_route_server_clients:
  - <str>
mpls_route_reflector_clients:
  - <str>