Skip to content

Commit

Permalink
Updated the template
Browse files Browse the repository at this point in the history
  • Loading branch information
Shivani-gslab committed Aug 23, 2024
1 parent fdee560 commit 820cd0a
Showing 1 changed file with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,26 +174,21 @@ interface {{ ethernet_interface.name }}
{% elif ethernet_interface.encapsulation_vlan.client.outer is arista.avd.defined and ethernet_interface.encapsulation_vlan.client.inner is arista.avd.defined %}
{% set encapsulation_cli = "client " ~ protocol ~ " outer " ~ ethernet_interface.encapsulation_vlan.client.outer ~ " inner " ~ ethernet_interface.encapsulation_vlan.client.inner %}
{% endif %}
{% if ethernet_interface.encapsulation_vlan.network.vlan is arista.avd.defined %}
{% set encapsulation_cli = encapsulation_cli ~ " network " ~ ethernet_interface.encapsulation_vlan.network.protocol ~ " " ~ ethernet_interface.encapsulation_vlan.network.vlan %}
{% elif ethernet_interface.encapsulation_vlan.network.inner is arista.avd.defined and ethernet_interface.encapsulation_vlan.network.outer is arista.avd.defined %}
{% set encapsulation_cli = encapsulation_cli ~ " network " ~ ethernet_interface.encapsulation_vlan.network.protocol ~ " outer " ~ ethernet_interface.encapsulation_vlan.network.outer ~ " inner " ~ ethernet_interface.encapsulation_vlan.network.inner %}
{% elif ethernet_interface.encapsulation_vlan.network.protocol == "client" %}
{% set encapsulation_cli = encapsulation_cli ~ " network client" %}
{% endif %}
{% elif ethernet_interface.encapsulation_vlan.client.protocol in ["untagged", "unmatched"] %}
{% set encapsulation_cli = "client " ~ ethernet_interface.encapsulation_vlan.client.protocol %}
{% if ethernet_interface.encapsulation_vlan.client.protocol == "untagged" %}
{% endif %}
{% if encapsulation_cli is arista.avd.defined %}
{% if protocol in ['dot1q', 'dot1ad', 'untagged'] %}
{% if ethernet_interface.encapsulation_vlan.network.vlan is arista.avd.defined %}
{% set encapsulation_cli = encapsulation_cli ~ " network " ~ ethernet_interface.encapsulation_vlan.network.protocol ~ " " ~ ethernet_interface.encapsulation_vlan.network.vlan %}
{% elif ethernet_interface.encapsulation_vlan.network.inner is arista.avd.defined and ethernet_interface.encapsulation_vlan.network.outer is arista.avd.defined %}
{% set encapsulation_cli = encapsulation_cli ~ " network " ~ ethernet_interface.encapsulation_vlan.network.protocol ~ " outer " ~ ethernet_interface.encapsulation_vlan.network.outer ~ " inner " ~ ethernet_interface.encapsulation_vlan.network.inner %}
{% elif ethernet_interface.encapsulation_vlan.network.protocol == "untagged" %}
{% elif ethernet_interface.encapsulation_vlan.network.protocol == "untagged" and protocol == "untagged" %}
{% set encapsulation_cli = encapsulation_cli ~ " network untagged" %}
{% elif ethernet_interface.encapsulation_vlan.network.protocol == "client" and protocol != "untagged" %}
{% set encapsulation_cli = encapsulation_cli ~ " network client" %}
{% endif %}
{% endif %}
{% endif %}
{% if encapsulation_cli is arista.avd.defined %}
encapsulation vlan
{{ encapsulation_cli }}
{% endif %}
Expand Down

0 comments on commit 820cd0a

Please sign in to comment.