Skip to content

Commit

Permalink
Updated dot1q_tunnel_to in vlan_translations.direction_out
Browse files Browse the repository at this point in the history
  • Loading branch information
Shivani-gslab committed Aug 22, 2024
1 parent 2c4d2e8 commit 1c4acde
Show file tree
Hide file tree
Showing 13 changed files with 52 additions and 116 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ sFlow is disabled.
| Ethernet1 | in | 37 | 49 | 56 | - | - | - |
| Ethernet1 | out | 10 | 45 | - | 34 | - | - |
| Ethernet1 | out | 34 | 50 | - | - | - | - |
| Ethernet1 | out | 45 | True | - | - | - | True |
| Ethernet1 | out | 45 | all | - | - | - | True |
| Ethernet1 | out | 55 | - | - | - | - | - |
| Ethernet3 | out | 23 | 50 | - | - | - | True |
| Ethernet16 | out | 111-112 | 110 | - | - | - | - |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ interface Ethernet50
| Port-Channel100 | in | 37 | 49 | - | 56 | - | - |
| Port-Channel100 | out | 10 | 45 | - | 34 | - | - |
| Port-Channel100 | out | 34 | 50 | - | - | - | - |
| Port-Channel100 | out | 45 | True | - | - | - | True |
| Port-Channel100 | out | 45 | all | - | - | - | True |
| Port-Channel100 | out | 55 | - | - | - | - | - |
| Port-Channel102 | out | 111-112 | 110 | - | - | - | - |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ ethernet_interfaces:
to: 45
inner_vlan_to: 34
- from: 45
dot1q_tunnel:
all: true
dot1q_tunnel_to: all
- from: 55
vlan_forwarding_accept_all: true
source_interface: tx
Expand Down Expand Up @@ -231,8 +230,7 @@ ethernet_interfaces:
out_required: false
direction_out:
- from: 23
dot1q_tunnel:
to: 50
dot1q_tunnel_to: 50
backup_link:
interface: Ethernet4

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ port_channel_interfaces:
vlan_translations:
direction_out:
- from: 23
dot1q_tunnel:
to: 22
dot1q_tunnel_to: 22
backup_link:
interface: Port-Channel100.102
prefer_vlan: 20
Expand Down Expand Up @@ -217,8 +216,7 @@ port_channel_interfaces:
to: 45
inner_vlan_to: 34
- from: 45
dot1q_tunnel:
all: true
dot1q_tunnel_to: all
- from: 55
vlan_forwarding_accept_all: true
backup_link:
Expand Down

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

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 @@ -201,9 +201,8 @@
| {{ ethernet_interface.name }} | in | {{ vlan_translation.from }} | {{ vlan_translation.to }} | {{ vlan_translation.inner_vlan_from | arista.avd.default('-') }} | - | {{ vlan_translation.network | arista.avd.default('-') }} | {{ vlan_translation.dot1q_tunnel | arista.avd.default('-') }} |
{% endfor %}
{% for vlan_translation in ethernet_interface.switchport.vlan_translations.direction_out | arista.avd.natural_sort('from') %}
{% set to_vlan_id = vlan_translation.dot1q_tunnel.all | arista.avd.default( vlan_translation.dot1q_tunnel.to, vlan_translation.to, "-") %}
{% if vlan_translation.dot1q_tunnel.all is arista.avd.defined or
vlan_translation.dot1q_tunnel.to is arista.avd.defined %}
{% set to_vlan_id = vlan_translation.dot1q_tunnel_to | arista.avd.default(vlan_translation.to, "-") %}
{% if vlan_translation.dot1q_tunnel_to is arista.avd.defined %}
{% set dot1q_tunnel = "True" %}
{% endif %}
| {{ ethernet_interface.name }} | out | {{ vlan_translation.from }} | {{ to_vlan_id }} | - | {{ vlan_translation.inner_vlan_to | arista.avd.default('-') }} | {{ vlan_translation.network | arista.avd.default('-') }} | {{ dot1q_tunnel | arista.avd.default(vlan_translation.dot1q_tunnel, '-') }} |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,8 @@
| {{ port_channel_interface.name }} | in | {{ vlan_translation.from }} | {{ vlan_translation.to }} | - | {{ vlan_translation.inner_vlan_from | arista.avd.default('-') }} | {{ vlan_translation.network | arista.avd.default('-') }} | {{ vlan_translation.dot1q_tunnel | arista.avd.default('-') }} |
{% endfor %}
{% for vlan_translation in port_channel_interface.switchport.vlan_translations.direction_out | arista.avd.natural_sort('from') %}
{% set to_vlan_id = vlan_translation.dot1q_tunnel.all | arista.avd.default( vlan_translation.dot1q_tunnel.to, vlan_translation.to, "-") %}
{% if vlan_translation.dot1q_tunnel.all is arista.avd.defined or
vlan_translation.dot1q_tunnel.to is arista.avd.defined %}
{% set to_vlan_id = vlan_translation.dot1q_tunnel_to | arista.avd.default(vlan_translation.to, "-") %}
{% if vlan_translation.dot1q_tunnel_to is arista.avd.defined %}
{% set dot1q_tunnel = "True" %}
{% endif %}
| {{ port_channel_interface.name }} | out | {{ vlan_translation.from }} | {{ to_vlan_id }} | - | {{ vlan_translation.inner_vlan_to | arista.avd.default('-') }} | {{ vlan_translation.network | arista.avd.default('-') }} | {{ dot1q_tunnel | arista.avd.default(vlan_translation.dot1q_tunnel, '-') }} |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,18 +234,13 @@ interface {{ ethernet_interface.name }}
{% endif %}
{% if ethernet_interface.switchport.vlan_translations.direction_out is arista.avd.defined %}
{% for vlan_translation in ethernet_interface.switchport.vlan_translations.direction_out %}
{% if vlan_translation.to is arista.avd.defined %}
{% if vlan_translation.dot1q_tunnel_to is arista.avd.defined %}
{% set vlan_translation_out_cli = 'switchport vlan translation out ' ~ vlan_translation.from ~ ' dot1q-tunnel ' ~ vlan_translation.dot1q_tunnel_to %}
{% elif vlan_translation.to is arista.avd.defined %}
{% set vlan_translation_out_cli = 'switchport vlan translation out ' ~ vlan_translation.from ~ ' ' ~ vlan_translation.to %}
{% if vlan_translation.inner_vlan_to is arista.avd.defined %}
{% set vlan_translation_out_cli = vlan_translation_out_cli ~ ' inner ' ~ vlan_translation.inner_vlan_to %}
{% endif %}
{% elif vlan_translation.dot1q_tunnel is arista.avd.defined %}
{% set vlan_translation_out_cli = 'switchport vlan translation out ' ~ vlan_translation.from %}
{% if vlan_translation.dot1q_tunnel.all is arista.avd.defined(true) %}
{% set vlan_translation_out_cli = vlan_translation_out_cli ~ ' dot1q-tunnel all' %}
{% elif vlan_translation.dot1q_tunnel.to is arista.avd.defined %}
{% set vlan_translation_out_cli = vlan_translation_out_cli ~ ' dot1q-tunnel ' ~ vlan_translation.dot1q_tunnel.to %}
{% endif %}
{% endif %}
{% if vlan_translation_out_cli is arista.avd.defined %}
{{ vlan_translation_out_cli }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,18 +181,13 @@ interface {{ port_channel_interface.name }}
{% endif %}
{% if port_channel_interface.switchport.vlan_translations.direction_out is arista.avd.defined %}
{% for vlan_translation in port_channel_interface.switchport.vlan_translations.direction_out %}
{% if vlan_translation.to is arista.avd.defined %}
{% if vlan_translation.dot1q_tunnel_to is arista.avd.defined %}
{% set vlan_translation_out_cli = 'switchport vlan translation out ' ~ vlan_translation.from ~ ' dot1q-tunnel ' ~ vlan_translation.dot1q_tunnel_to %}
{% elif vlan_translation.to is arista.avd.defined %}
{% set vlan_translation_out_cli = 'switchport vlan translation out ' ~ vlan_translation.from ~ ' ' ~ vlan_translation.to %}
{% if vlan_translation.inner_vlan_to is arista.avd.defined %}
{% set vlan_translation_out_cli = vlan_translation_out_cli ~ ' inner ' ~ vlan_translation.inner_vlan_to %}
{% endif %}
{% elif vlan_translation.dot1q_tunnel is arista.avd.defined %}
{% set vlan_translation_out_cli = 'switchport vlan translation out ' ~ vlan_translation.from %}
{% if vlan_translation.dot1q_tunnel.all is arista.avd.defined(true) %}
{% set vlan_translation_out_cli = vlan_translation_out_cli ~ ' dot1q-tunnel all' %}
{% elif vlan_translation.dot1q_tunnel.to is arista.avd.defined %}
{% set vlan_translation_out_cli = vlan_translation_out_cli ~ ' dot1q-tunnel ' ~ vlan_translation.dot1q_tunnel.to %}
{% endif %}
{% endif %}
{% if vlan_translation_out_cli is arista.avd.defined %}
{{ vlan_translation_out_cli }}
Expand Down

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 @@ -1609,21 +1609,13 @@ keys:
min: 1
max: 4094
description: VLAN ID to map to.
dot1q_tunnel:
type: dict
keys:
all:
type: bool
description: The `dot1q_tunnel.all` and `dot1q_tunnel.to` are mutually exclusive, `dot1q_tunnel.all` takes precedence.
to:
type: int
convert_types:
- str
min: 1
max: 4094
description: |-
VLAN ID or range(s) of VLAN IDs to map to.
The `dot1q_tunnel.all` and `dot1q_tunnel.to` are mutually exclusive, `dot1q_tunnel.all` takes precedence.
dot1q_tunnel_to:
type: str
convert_types:
- int
description: |-
VLAN ID or range of VLAN IDs or "all". Range 1-4094.
This takes precedence over `to` and `inner_vlan_to`.
inner_vlan_to:
type: int
min: 1
Expand Down
Loading

0 comments on commit 1c4acde

Please sign in to comment.