Skip to content

Commit

Permalink
Refactor(eos_cli_config_gen): Deprecate Upper case letter Vxlan1 to v…
Browse files Browse the repository at this point in the history
…xlan1 for vxlan_interface schema (aristanetworks#4250)
  • Loading branch information
MaheshGSLAB authored and jrecchia1029 committed Aug 14, 2024
1 parent bf520e9 commit 3cf45c1
Show file tree
Hide file tree
Showing 8 changed files with 206 additions and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## Test values that are set to false and generate configuration e.g -> "no vxlan qos ecn propagation"

vxlan_interface:
Vxlan1:
vxlan1:
vxlan:
qos:
dscp_propagation_encapsulation: false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### VxLAN interface ###

vxlan_interface:
Vxlan1:
vxlan1:
description: DC1-LEAF2A_VTEP
vxlan:
source_interface: Loopback0
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
### VxLAN interface ###
## Test values that are set to false and generate configuration e.g -> "no vxlan qos ecn propagation"

vxlan_interface:
# Testing Vxlan1 as key
# Vxlan1 key is deprecated in 5.0.0. To be removed in 6.0.0
Vxlan1:
vxlan:
qos:
dscp_propagation_encapsulation: false
map_dscp_to_traffic_class_decapsulation: false
ecn_propagation: false

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -5,76 +5,77 @@
#}
{# j2lint: disable=V1 #}
{# doc - vxlan interface #}
{% if vxlan_interface.Vxlan1 is arista.avd.defined %}
{% set vxlan_config = vxlan_interface.vxlan1 | arista.avd.default(vxlan_interface.Vxlan1) %}
{% if vxlan_config is arista.avd.defined %}

### VXLAN Interface

#### VXLAN Interface Summary

| Setting | Value |
| ------- | ----- |
{% if vxlan_interface.Vxlan1.vxlan.source_interface is arista.avd.defined %}
| Source Interface | {{ vxlan_interface.Vxlan1.vxlan.source_interface }} |
{% if vxlan_config.vxlan.source_interface is arista.avd.defined %}
| Source Interface | {{ vxlan_config.vxlan.source_interface }} |
{% endif %}
{% if vxlan_interface.Vxlan1.vxlan.controller_client.enabled is arista.avd.defined %}
| Controller Client | {{ vxlan_interface.Vxlan1.vxlan.controller_client.enabled }} |
{% if vxlan_config.vxlan.controller_client.enabled is arista.avd.defined %}
| Controller Client | {{ vxlan_config.vxlan.controller_client.enabled }} |
{% endif %}
{% if vxlan_interface.Vxlan1.vxlan.mlag_source_interface is arista.avd.defined %}
| MLAG Source Interface | {{ vxlan_interface.Vxlan1.vxlan.mlag_source_interface }} |
{% if vxlan_config.vxlan.mlag_source_interface is arista.avd.defined %}
| MLAG Source Interface | {{ vxlan_config.vxlan.mlag_source_interface }} |
{% endif %}
| UDP port | {{ vxlan_interface.Vxlan1.vxlan.udp_port | arista.avd.default('4789') }} |
{% if vxlan_interface.Vxlan1.vxlan.vtep_to_vtep_bridging is arista.avd.defined(true) %}
| Vtep-to-Vtep Bridging | {{ vxlan_interface.Vxlan1.vxlan.vtep_to_vtep_bridging }} |
| UDP port | {{ vxlan_config.vxlan.udp_port | arista.avd.default('4789') }} |
{% if vxlan_config.vxlan.vtep_to_vtep_bridging is arista.avd.defined(true) %}
| Vtep-to-Vtep Bridging | {{ vxlan_config.vxlan.vtep_to_vtep_bridging }} |
{% endif %}
{% if vxlan_interface.Vxlan1.vxlan.virtual_router_encapsulation_mac_address is arista.avd.defined %}
| EVPN MLAG Shared Router MAC | {{ vxlan_interface.Vxlan1.vxlan.virtual_router_encapsulation_mac_address }} |
{% if vxlan_config.vxlan.virtual_router_encapsulation_mac_address is arista.avd.defined %}
| EVPN MLAG Shared Router MAC | {{ vxlan_config.vxlan.virtual_router_encapsulation_mac_address }} |
{% endif %}
{% if vxlan_interface.Vxlan1.vxlan.flood_vtep_learned_data_plane is arista.avd.defined(true) %}
{% if vxlan_config.vxlan.flood_vtep_learned_data_plane is arista.avd.defined(true) %}
| VXLAN flood-lists learning from data-plane | Enabled |
{% elif vxlan_interface.Vxlan1.vxlan.flood_vtep_learned_data_plane is arista.avd.defined(false) %}
{% elif vxlan_config.vxlan.flood_vtep_learned_data_plane is arista.avd.defined(false) %}
| VXLAN flood-lists learning from data-plane | Disabled |
{% endif %}
{% if vxlan_interface.Vxlan1.vxlan.qos.dscp_propagation_encapsulation is arista.avd.defined(true) %}
{% if vxlan_config.vxlan.qos.dscp_propagation_encapsulation is arista.avd.defined(true) %}
| Qos dscp propagation encapsulation | Enabled |
{% elif vxlan_interface.Vxlan1.vxlan.qos.dscp_propagation_encapsulation is arista.avd.defined(false) %}
{% elif vxlan_config.vxlan.qos.dscp_propagation_encapsulation is arista.avd.defined(false) %}
| Qos dscp propagation encapsulation | Disabled |
{% endif %}
{% if vxlan_interface.Vxlan1.vxlan.qos.ecn_propagation is arista.avd.defined(true) %}
{% if vxlan_config.vxlan.qos.ecn_propagation is arista.avd.defined(true) %}
| Qos ECN propagation | Enabled |
{% elif vxlan_interface.Vxlan1.vxlan.qos.ecn_propagation is arista.avd.defined(false) %}
{% elif vxlan_config.vxlan.qos.ecn_propagation is arista.avd.defined(false) %}
| Qos ECN propagation | Disabled |
{% endif %}
{% if vxlan_interface.Vxlan1.vxlan.qos.map_dscp_to_traffic_class_decapsulation is arista.avd.defined(true) %}
{% if vxlan_config.vxlan.qos.map_dscp_to_traffic_class_decapsulation is arista.avd.defined(true) %}
| Qos map dscp to traffic-class decapsulation | Enabled |
{% elif vxlan_interface.Vxlan1.vxlan.qos.map_dscp_to_traffic_class_decapsulation is arista.avd.defined(false) %}
{% elif vxlan_config.vxlan.qos.map_dscp_to_traffic_class_decapsulation is arista.avd.defined(false) %}
| Qos map dscp to traffic-class decapsulation | Disabled |
{% endif %}
{% if vxlan_interface.Vxlan1.vxlan.bfd_vtep_evpn is arista.avd.defined %}
{% if vxlan_interface.Vxlan1.vxlan.bfd_vtep_evpn.interval is arista.avd.defined %}
| Remote VTEPs EVPN BFD transmission rate | {{ vxlan_interface.Vxlan1.vxlan.bfd_vtep_evpn.interval }}ms |
{% if vxlan_config.vxlan.bfd_vtep_evpn is arista.avd.defined %}
{% if vxlan_config.vxlan.bfd_vtep_evpn.interval is arista.avd.defined %}
| Remote VTEPs EVPN BFD transmission rate | {{ vxlan_config.vxlan.bfd_vtep_evpn.interval }}ms |
{% endif %}
{% if vxlan_interface.Vxlan1.vxlan.bfd_vtep_evpn.min_rx is arista.avd.defined %}
| Remote VTEPs EVPN BFD expected minimum incoming rate (min-rx) | {{ vxlan_interface.Vxlan1.vxlan.bfd_vtep_evpn.min_rx }}ms |
{% if vxlan_config.vxlan.bfd_vtep_evpn.min_rx is arista.avd.defined %}
| Remote VTEPs EVPN BFD expected minimum incoming rate (min-rx) | {{ vxlan_config.vxlan.bfd_vtep_evpn.min_rx }}ms |
{% endif %}
{% if vxlan_interface.Vxlan1.vxlan.bfd_vtep_evpn.multiplier is arista.avd.defined %}
| Remote VTEPs EVPN BFD multiplier | {{ vxlan_interface.Vxlan1.vxlan.bfd_vtep_evpn.multiplier }} |
{% if vxlan_config.vxlan.bfd_vtep_evpn.multiplier is arista.avd.defined %}
| Remote VTEPs EVPN BFD multiplier | {{ vxlan_config.vxlan.bfd_vtep_evpn.multiplier }} |
{% endif %}
{% if vxlan_interface.Vxlan1.vxlan.bfd_vtep_evpn.prefix_list is arista.avd.defined %}
| Remote VTEPs EVPN BFD prefix-list | {{ vxlan_interface.Vxlan1.vxlan.bfd_vtep_evpn.prefix_list }} |
{% if vxlan_config.vxlan.bfd_vtep_evpn.prefix_list is arista.avd.defined %}
| Remote VTEPs EVPN BFD prefix-list | {{ vxlan_config.vxlan.bfd_vtep_evpn.prefix_list }} |
{% endif %}
{% endif %}
{% if vxlan_interface.Vxlan1.vxlan.multicast.headend_replication is arista.avd.defined(true) %}
{% if vxlan_config.vxlan.multicast.headend_replication is arista.avd.defined(true) %}
| Multicast headend-replication | Enabled |
{% elif vxlan_interface.Vxlan1.vxlan.multicast.headend_replication is arista.avd.defined(false) %}
{% elif vxlan_config.vxlan.multicast.headend_replication is arista.avd.defined(false) %}
| Multicast headend-replication | Disabled |
{% endif %}
{% if vxlan_interface.Vxlan1.vxlan.vlans is arista.avd.defined %}
{% if vxlan_config.vxlan.vlans is arista.avd.defined %}

##### VLAN to VNI, Flood List and Multicast Group Mappings

| VLAN | VNI | Flood List | Multicast Group |
| ---- | --- | ---------- | --------------- |
{% for vlan in vxlan_interface.Vxlan1.vxlan.vlans | arista.avd.natural_sort('id') %}
{% for vlan in vxlan_config.vxlan.vlans | arista.avd.natural_sort('id') %}
{% set vlan_vni = vlan.vni | arista.avd.default('-') %}
{% set multicast_group = vlan.multicast_group | arista.avd.default('-') %}
{% if vlan.flood_vteps is arista.avd.defined %}
Expand All @@ -85,25 +86,25 @@
| {{ vlan.id }} | {{ vlan_vni }} | {{ flood_list }} | {{ multicast_group }} |
{% endfor %}
{% endif %}
{% if vxlan_interface.Vxlan1.vxlan.vrfs is arista.avd.defined %}
{% if vxlan_config.vxlan.vrfs is arista.avd.defined %}

##### VRF to VNI and Multicast Group Mappings

| VRF | VNI | Multicast Group |
| ---- | --- | --------------- |
{% for vrf in vxlan_interface.Vxlan1.vxlan.vrfs | arista.avd.natural_sort('name') %}
{% for vrf in vxlan_config.vxlan.vrfs | arista.avd.natural_sort('name') %}
{% set vrf_vni = vrf.vni | arista.avd.default('-') %}
{% set multicast_group = vrf.multicast_group | arista.avd.default('-') %}
| {{ vrf.name }} | {{ vrf_vni }} | {{ multicast_group }} |
{% endfor %}
{% endif %}
{% if vxlan_interface.Vxlan1.vxlan.flood_vteps is arista.avd.defined %}
{% if vxlan_config.vxlan.flood_vteps is arista.avd.defined %}

##### Default Flood List

| Default Flood List |
| ------------------ |
| {{ vxlan_interface.Vxlan1.vxlan.flood_vteps | join('<br/>') }} |
| {{ vxlan_config.vxlan.flood_vteps | join('<br/>') }} |
{% endif %}

#### VXLAN Interface Device Configuration
Expand Down
Loading

0 comments on commit 3cf45c1

Please sign in to comment.