Skip to content

Commit

Permalink
Updated the schema for switchport.vlan_translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Shivani-gslab committed Jul 5, 2024
1 parent 9608fac commit f34955b
Show file tree
Hide file tree
Showing 15 changed files with 1,877 additions and 404 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,16 @@ interface Ethernet1
switchport trunk group g2
no switchport
switchport source-interface tx
switchport vlan translation in 23-37 45
switchport vlan translation out 23-37 45
switchport vlan translation 12 20
switchport vlan translation 24 inner 78 network 46
switchport vlan translation 43 dot1q-tunnel 30
switchport vlan translation in required
switchport vlan translation in 37 inner 56 49
switchport vlan translation in 23 dot1q-tunnel 45
switchport vlan translation out 10 45 inner 34
switchport vlan translation out 23 dot1q-tunnel 22
switchport vlan translation out 34 50
switchport vlan translation out 45 dot1q-tunnel all
switchport trunk private-vlan secondary
switchport pvlan mapping 20-30
switchport backup-link Ethernet5 prefer vlan 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,16 @@ interface Port-Channel100
switchport trunk group g1
switchport trunk group g2
switchport source-interface tx multicast
switchport vlan translation in 23-37 45
switchport vlan translation out 23-37 45
switchport vlan translation 12 20
switchport vlan translation 24 inner 78 network 46
switchport vlan translation 43 dot1q-tunnel 30
switchport vlan translation in required
switchport vlan translation in 37 inner 56 49
switchport vlan translation in 23 dot1q-tunnel 45
switchport vlan translation out 10 45 inner 34
switchport vlan translation out 23 dot1q-tunnel 22
switchport vlan translation out 34 50
switchport vlan translation out 45 dot1q-tunnel all
switchport trunk private-vlan secondary
switchport pvlan mapping 20-30
switchport backup-link Ethernet5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,16 @@ interface Ethernet1
switchport trunk group g2
no switchport
switchport source-interface tx
switchport vlan translation in 23-37 45
switchport vlan translation out 23-37 45
switchport vlan translation 12 20
switchport vlan translation 24 inner 78 network 46
switchport vlan translation 43 dot1q-tunnel 30
switchport vlan translation in required
switchport vlan translation in 37 inner 56 49
switchport vlan translation in 23 dot1q-tunnel 45
switchport vlan translation out 10 45 inner 34
switchport vlan translation out 23 dot1q-tunnel 22
switchport vlan translation out 34 50
switchport vlan translation out 45 dot1q-tunnel all
switchport trunk private-vlan secondary
switchport pvlan mapping 20-30
switchport backup-link Ethernet5 prefer vlan 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,16 @@ interface Port-Channel100
switchport trunk group g1
switchport trunk group g2
switchport source-interface tx multicast
switchport vlan translation in 23-37 45
switchport vlan translation out 23-37 45
switchport vlan translation 12 20
switchport vlan translation 24 inner 78 network 46
switchport vlan translation 43 dot1q-tunnel 30
switchport vlan translation in required
switchport vlan translation in 37 inner 56 49
switchport vlan translation in 23 dot1q-tunnel 45
switchport vlan translation out 10 45 inner 34
switchport vlan translation out 23 dot1q-tunnel 22
switchport vlan translation out 34 50
switchport vlan translation out 45 dot1q-tunnel all
switchport trunk private-vlan secondary
switchport pvlan mapping 20-30
switchport backup-link Ethernet5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,36 @@ ethernet_interfaces:
dot1q:
ethertype: 1536
vlan_translations:
- from: 23-37
to: 45
direction: in
- from: 23-37
to: 45
direction: out
direction_in:
- required: true
- from: 37
to: 49
inner_from: 56
- from: 23
to: 45
dot1q_tunnel: true
direction_both:
- from: 24
inner_from: 78
network: true
to: 46
- from: 12
to: 20
- from: 43
to: 30
dot1q_tunnel: true
direction_out:
- from: 10
to: 45
inner_to: 34
- from: 34
to: 50
- from: 45
dot1q_tunnel:
all: true
- from: 23
dot1q_tunnel:
to: 22
vlan_forwarding_accept_all: true
source_interface: tx
backup_link:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,36 @@ port_channel_interfaces:
vlan_tag: required
source_interface: tx multicast
vlan_translations:
- from: 23-37
to: 45
direction: in
- from: 23-37
to: 45
direction: out
direction_in:
- required: true
- from: 37
to: 49
inner_from: 56
- from: 23
to: 45
dot1q_tunnel: true
direction_both:
- from: 24
inner_from: 78
network: true
to: 46
- from: 12
to: 20
- from: 43
to: 30
dot1q_tunnel: true
direction_out:
- from: 10
to: 45
inner_to: 34
- from: 34
to: 50
- from: 45
dot1q_tunnel:
all: true
- from: 23
dot1q_tunnel:
to: 22
vlan_forwarding_accept_all: true
backup_link:
interface: Ethernet5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -425,10 +425,26 @@
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;trunk</samp>](## "ethernet_interfaces.[].switchport.phone.trunk") | String | | | Valid Values:<br>- <code>tagged</code><br>- <code>tagged phone</code><br>- <code>untagged</code><br>- <code>untagged phone</code> | Warning: This should not be combined with `ethernet_interfaces[].phone.trunk` |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mode</samp>](## "ethernet_interfaces.[].switchport.mode") | String | | | Valid Values:<br>- <code>access</code><br>- <code>dot1q-tunnel</code><br>- <code>trunk</code><br>- <code>trunk phone</code> | Warning: This should not be combined with `ethernet_interfaces[].mode` |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pvlan_mapping</samp>](## "ethernet_interfaces.[].switchport.pvlan_mapping") | String | | | | Secondary VLAN IDs of the private VLAN mapping.<br>Warning: This should not be combined with `ethernet_interfaces[].pvlan_mapping`. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vlan_translations</samp>](## "ethernet_interfaces.[].switchport.vlan_translations") | List, items: Dictionary | | | | Warning: This should not be combined with `ethernet_interfaces[].vlan_translations`. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;from</samp>](## "ethernet_interfaces.[].switchport.vlan_translations.[].from") | String | Required | | | VLAN ID or range of VLAN IDs to map from. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to</samp>](## "ethernet_interfaces.[].switchport.vlan_translations.[].to") | Integer | Required | | | VLAN ID to map to. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;direction</samp>](## "ethernet_interfaces.[].switchport.vlan_translations.[].direction") | String | Required, Unique | `both` | Valid Values:<br>- <code>in</code><br>- <code>out</code><br>- <code>both</code> | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vlan_translations</samp>](## "ethernet_interfaces.[].switchport.vlan_translations") | Dictionary | | | | Warning: This should not be combined with `ethernet_interfaces[].vlan_translations`. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;direction_in</samp>](## "ethernet_interfaces.[].switchport.vlan_translations.direction_in") | List, items: Dictionary | | | | Map ingress packets only. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;required</samp>](## "ethernet_interfaces.[].switchport.vlan_translations.direction_in.[].required") | Boolean | | | | Drop the packets that do not match any VLAN mapping. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from</samp>](## "ethernet_interfaces.[].switchport.vlan_translations.direction_in.[].from") | Integer | | | | VLAN ID or range of VLAN IDs to map from. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to</samp>](## "ethernet_interfaces.[].switchport.vlan_translations.direction_in.[].to") | Integer | | | | VLAN ID to map to. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dot1q_tunnel</samp>](## "ethernet_interfaces.[].switchport.vlan_translations.direction_in.[].dot1q_tunnel") | Boolean | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inner_from</samp>](## "ethernet_interfaces.[].switchport.vlan_translations.direction_in.[].inner_from") | Integer | | | | Inner VLAN ID to map from. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;direction_out</samp>](## "ethernet_interfaces.[].switchport.vlan_translations.direction_out") | List, items: Dictionary | | | | Map egress packets only. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;from</samp>](## "ethernet_interfaces.[].switchport.vlan_translations.direction_out.[].from") | Integer | Required | | | VLAN ID or range of VLAN IDs to map from. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to</samp>](## "ethernet_interfaces.[].switchport.vlan_translations.direction_out.[].to") | Integer | | | | VLAN ID to map to. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dot1q_tunnel</samp>](## "ethernet_interfaces.[].switchport.vlan_translations.direction_out.[].dot1q_tunnel") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;all</samp>](## "ethernet_interfaces.[].switchport.vlan_translations.direction_out.[].dot1q_tunnel.all") | Boolean | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to</samp>](## "ethernet_interfaces.[].switchport.vlan_translations.direction_out.[].dot1q_tunnel.to") | Integer | | | | VLAN ID or range(s) of VLAN IDs to map to. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inner_to</samp>](## "ethernet_interfaces.[].switchport.vlan_translations.direction_out.[].inner_to") | Integer | | | | Inner VLAN ID to map to. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;direction_both</samp>](## "ethernet_interfaces.[].switchport.vlan_translations.direction_both") | List, items: Dictionary | | | | Map both egress and ingress packets. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;from</samp>](## "ethernet_interfaces.[].switchport.vlan_translations.direction_both.[].from") | Integer | Required | | | VLAN ID or range of VLAN IDs to map from. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to</samp>](## "ethernet_interfaces.[].switchport.vlan_translations.direction_both.[].to") | Integer | Required | | | VLAN ID to map to. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dot1q_tunnel</samp>](## "ethernet_interfaces.[].switchport.vlan_translations.direction_both.[].dot1q_tunnel") | Boolean | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inner_from</samp>](## "ethernet_interfaces.[].switchport.vlan_translations.direction_both.[].inner_from") | Integer | | | | Inner VLAN ID to map from. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;network</samp>](## "ethernet_interfaces.[].switchport.vlan_translations.direction_both.[].network") | Boolean | | | | Use network-side VLAN ID. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vlan_forwarding_accept_all</samp>](## "ethernet_interfaces.[].switchport.vlan_forwarding_accept_all") | Boolean | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;backup_link</samp>](## "ethernet_interfaces.[].switchport.backup_link") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;interface</samp>](## "ethernet_interfaces.[].switchport.backup_link.interface") | String | | | | Backup interface. Example - Ethernet4, Vlan10 etc. |
Expand Down Expand Up @@ -1246,12 +1262,54 @@
# Warning: This should not be combined with `ethernet_interfaces[].vlan_translations`.
vlan_translations:

# VLAN ID or range of VLAN IDs to map from.
- from: <str; required>
# Map ingress packets only.
direction_in:

# VLAN ID to map to.
to: <int; required>
direction: <str; "in" | "out" | "both"; default="both"; required; unique>
# Drop the packets that do not match any VLAN mapping.
- required: <bool>

# VLAN ID or range of VLAN IDs to map from.
from: <int>

# VLAN ID to map to.
to: <int>
dot1q_tunnel: <bool>

# Inner VLAN ID to map from.
inner_from: <int>

# Map egress packets only.
direction_out:

# VLAN ID or range of VLAN IDs to map from.
- from: <int; required>

# VLAN ID to map to.
to: <int>
dot1q_tunnel:
all: <bool>

# VLAN ID or range(s) of VLAN IDs to map to.
to: <int>

# Inner VLAN ID to map to.
inner_to: <int>

# Map both egress and ingress packets.
direction_both:

# VLAN ID or range of VLAN IDs to map from.
- from: <int; required>

# VLAN ID to map to.
to: <int; required>
dot1q_tunnel: <bool>

# Inner VLAN ID to map from.
inner_from: <int>

# Use network-side VLAN ID.
network: <bool>
vlan_forwarding_accept_all: <bool>
backup_link:

Expand Down
Loading

0 comments on commit f34955b

Please sign in to comment.