Skip to content

Commit

Permalink
Refactor(eos_cli_config_gen): Rearrange the CLI for platform (#4578)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClausHolbechArista authored Oct 10, 2024
1 parent 2d07882 commit 3bf67f2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ interface Management1
!
platform trident l3 routing mac-address per-vlan
platform trident forwarding-table partition 2
platform sand forwarding mode arad
platform sand lag mode 512x32
platform sand lag hardware-only
platform sand qos map traffic-class 0 to network-qos 0
platform sand qos map traffic-class 1 to network-qos 7
platform sand qos map traffic-class 2 to network-qos 15
platform sand lag hardware-only
platform sand lag mode 512x32
platform sand forwarding mode arad
platform sand multicast replication default ingress
platform sand mdb profile l3-xxl
platform sfe data-plane cpu allocation maximum 42
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ platform trident mmu queue profile unused_profile
!
platform trident l3 routing mac-address per-vlan
platform trident forwarding-table partition 2
platform sand forwarding mode arad
platform sand lag mode 512x32
platform sand lag hardware-only
platform sand qos map traffic-class 0 to network-qos 0
platform sand qos map traffic-class 1 to network-qos 7
platform sand qos map traffic-class 2 to network-qos 15
platform sand lag hardware-only
platform sand lag mode 512x32
platform sand forwarding mode arad
platform sand multicast replication default ingress
platform sand mdb profile l3-xxl
platform sfe data-plane cpu allocation maximum 42
Expand Down
18 changes: 9 additions & 9 deletions python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/platform.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ platform trident l3 routing mac-address per-vlan
platform trident forwarding-table partition {{ platform.trident.forwarding_table_partition }}
{% endif %}
{% if platform.sand is arista.avd.defined %}
{% for qos_map in platform.sand.qos_maps | arista.avd.natural_sort('traffic_class') %}
{% if qos_map.traffic_class is arista.avd.defined and qos_map.to_network_qos is arista.avd.defined %}
platform sand qos map traffic-class {{ qos_map.traffic_class }} to network-qos {{ qos_map.to_network_qos }}
{% endif %}
{% endfor %}
{% if platform.sand.lag.hardware_only is arista.avd.defined(true) %}
platform sand lag hardware-only
{% if platform.sand.forwarding_mode is arista.avd.defined %}
platform sand forwarding mode {{ platform.sand.forwarding_mode }}
{% endif %}
{% if platform.sand.lag.mode is arista.avd.defined %}
platform sand lag mode {{ platform.sand.lag.mode }}
{% endif %}
{% if platform.sand.forwarding_mode is arista.avd.defined %}
platform sand forwarding mode {{ platform.sand.forwarding_mode }}
{% if platform.sand.lag.hardware_only is arista.avd.defined(true) %}
platform sand lag hardware-only
{% endif %}
{% for qos_map in platform.sand.qos_maps | arista.avd.natural_sort('traffic_class') %}
{% if qos_map.traffic_class is arista.avd.defined and qos_map.to_network_qos is arista.avd.defined %}
platform sand qos map traffic-class {{ qos_map.traffic_class }} to network-qos {{ qos_map.to_network_qos }}
{% endif %}
{% endfor %}
{% if platform.sand.multicast_replication.default is arista.avd.defined %}
platform sand multicast replication default {{ platform.sand.multicast_replication.default }}
{% endif %}
Expand Down

0 comments on commit 3bf67f2

Please sign in to comment.