Skip to content

Bridge L2PT Model Definition #303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions models/enterprise_sonic/br_l2pt/deleted_example_01.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Using "deleted" state
#
# Before state:
# -------------
# sonic# show running-configuration interface Ethernet 0
# !
# interface Ethernet0
# mtu 9100
# speed 400000
# fec RS
# unreliable-los auto
# no shutdown
# switchport l2proto-tunnel lacp Vlan 10-12
# switchport l2proto-tunnel cdp Vlan 20,40-60
# switchport l2proto-tunnel stp Vlan 25-26

- name: Delete interface L2PT configurations
dellemc.enterprise_sonic.sonic_br_l2pt:
config:
- name: Ethernet0
bridge_l2pt_params:
- protocol: 'LACP'
vlan_ids:
- 10-12
state: deleted

# After state:
# ------------
# sonic# show running-configuration interface Ethernet0
# !
# interface Ethernet0
# mtu 9100
# speed 400000
# fec RS
# unreliable-los auto
# no shutdown
# switchport l2proto-tunnel cdp Vlan 20,40-60
# switchport l2proto-tunnel stp Vlan 25-26
49 changes: 49 additions & 0 deletions models/enterprise_sonic/br_l2pt/deleted_example_02.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Using "deleted" state
#
# Before state:
# -------------
# sonic# show running-configuration interface Ethernet 0
# !
# interface Ethernet0
# mtu 9100
# speed 400000
# fec RS
# unreliable-los auto
# no shutdown
# switchport l2proto-tunnel lacp Vlan 10-12
# switchport l2proto-tunnel cdp Vlan 20,40-60
# switchport l2proto-tunnel stp Vlan 25-26
# sonic# show running-configuration interface Ethernet 8
# !
# interface Ethernet8
# mtu 9100
# speed 400000
# fec RS
# unreliable-los auto
# no shutdown
# switchport l2proto-tunnel lldp Vlan 100
# switchport l2proto-tunnel stp Vlan 100-150

- name: Delete all interface L2PT configurations
dellemc.enterprise_sonic.sonic_br_l2pt:
config:
state: deleted

# After state:
# ------------
# sonic# show running-configuration interface Ethernet0
# !
# interface Ethernet0
# mtu 9100
# speed 400000
# fec RS
# unreliable-los auto
# no shutdown
# sonic# show running-configuration interface Ethernet 8
# !
# interface Ethernet8
# mtu 9100
# speed 400000
# fec RS
# unreliable-los auto
# no shutdown
37 changes: 37 additions & 0 deletions models/enterprise_sonic/br_l2pt/deleted_example_03.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Using "deleted" state
#
# Before state:
# -------------
# sonic# show running-configuration interface Ethernet 0
# !
# interface Ethernet0
# mtu 9100
# speed 400000
# fec RS
# unreliable-los auto
# no shutdown
# switchport l2proto-tunnel lacp Vlan 10-12
# switchport l2proto-tunnel cdp Vlan 20,40-60
# switchport l2proto-tunnel stp Vlan 25-26

- name: Delete L2PT configurations for protocol
dellemc.enterprise_sonic.sonic_br_l2pt:
config:
- name: Ethernet0
bridge_l2pt_params:
- protocol: 'LACP'
- protocol: 'CDP'
vlan_ids: []
state: deleted

# After state:
# ------------
# sonic# show running-configuration interface Ethernet0
# !
# interface Ethernet0
# mtu 9100
# speed 400000
# fec RS
# unreliable-los auto
# no shutdown
# switchport l2proto-tunnel stp Vlan 25-26
42 changes: 42 additions & 0 deletions models/enterprise_sonic/br_l2pt/deleted_example_04.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Using "deleted" state
#
# Before state:
# -------------
# sonic# show running-configuration interface Ethernet 0
# !
# interface Ethernet0
# mtu 9100
# speed 400000
# fec RS
# unreliable-los auto
# no shutdown
# switchport l2proto-tunnel lacp Vlan 10-12
# switchport l2proto-tunnel cdp Vlan 20,40-60
# switchport l2proto-tunnel stp Vlan 25-26

- name: Delete interface L2PT configurations
dellemc.enterprise_sonic.sonic_br_l2pt:
config:
- name: Ethernet0
bridge_l2pt_params:
- protocol: 'LACP'
vlan_ids:
- 11
- protocol: 'CDP'
vlan_ids:
- 40-50
state: deleted

# After state:
# ------------
# sonic# show running-configuration interface Ethernet0
# !
# interface Ethernet0
# mtu 9100
# speed 400000
# fec RS
# unreliable-los auto
# no shutdown
# switchport l2proto-tunnel lacp Vlan 10,12
# switchport l2proto-tunnel cdp Vlan 20,51-60
# switchport l2proto-tunnel stp Vlan 25-26
53 changes: 53 additions & 0 deletions models/enterprise_sonic/br_l2pt/deleted_example_05.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Using "deleted" state
#
# Before state:
# -------------
# sonic# show running-configuration interface Ethernet 0
# !
# interface Ethernet0
# mtu 9100
# speed 400000
# fec RS
# unreliable-los auto
# no shutdown
# switchport l2proto-tunnel lacp Vlan 10-12
# switchport l2proto-tunnel cdp Vlan 20,40-60
# switchport l2proto-tunnel stp Vlan 25-26
# sonic# show running-configuration interface Ethernet 8
# !
# interface Ethernet8
# mtu 9100
# speed 400000
# fec RS
# unreliable-los auto
# no shutdown
# switchport l2proto-tunnel lacp Vlan 10-12
# switchport l2proto-tunnel cdp Vlan 20,40-60
# switchport l2proto-tunnel stp Vlan 25-26

- name: Delete L2PT configurations for entire interface
dellemc.enterprise_sonic.sonic_br_l2pt:
config:
- name: Ethernet0
bridge_l2pt_params: []
- name: Ethernet8
state: deleted

# After state:
# ------------
# sonic# show running-configuration interface Ethernet 0
# !
# interface Ethernet0
# mtu 9100
# speed 400000
# fec RS
# unreliable-los auto
# no shutdown
# sonic# show running-configuration interface Ethernet 8
# !
# interface Ethernet8
# mtu 9100
# speed 400000
# fec RS
# unreliable-los auto
# no shutdown
45 changes: 45 additions & 0 deletions models/enterprise_sonic/br_l2pt/merged_example_01.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Using "merged" state
#
# Before state:
# -------------
# sonic# show running-configuration interface Ethernet 0
# !
# interface Ethernet0
# mtu 9100
# speed 400000
# fec RS
# unreliable-los auto
# no shutdown
# switchport l2proto-tunnel lldp Vlan 10

- name: Modify interface L2PT configurations
dellemc.enterprise_sonic.sonic_br_l2pt:
config:
- name: Ethernet0
bridge_l2pt_params:
- protocol: 'LACP'
vlan_ids:
- 10-12
- protocol: 'CDP'
vlan_ids:
- 20
- 40-60
- protocol: 'STP'
vlan_ids:
- 25-26
state: merged

# After state:
# ------------
# sonic# show running-configuration interface Ethernet0
# !
# interface Ethernet0
# mtu 9100
# speed 400000
# fec RS
# unreliable-los auto
# no shutdown
# switchport l2proto-tunnel cdp Vlan 20,40-60
# switchport l2proto-tunnel lacp Vlan 10-12
# switchport l2proto-tunnel lldp Vlan 10
# switchport l2proto-tunnel stp Vlan 25-26
51 changes: 51 additions & 0 deletions models/enterprise_sonic/br_l2pt/merged_example_02.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Using "merged" state
#
# Before state:
# -------------
# sonic# show running-configuration interface Ethernet 0
# !
# interface Ethernet0
# mtu 9100
# speed 400000
# fec RS
# unreliable-los auto
# no shutdown
# switchport l2proto-tunnel cdp Vlan 20, 40-50
# switchport l2proto-tunnel lacp Vlan 10-11
# switchport l2proto-tunnel lldp Vlan 10
# switchport l2proto-tunnel stp Vlan 25-26

- name: Modify interface L2PT configurations
dellemc.enterprise_sonic.sonic_br_l2pt:
config:
- name: Ethernet0
bridge_l2pt_params:
- protocol: 'LLDP'
vlan_ids:
- 12
- protocol: 'LACP'
vlan_ids:
- 12
- protocol: 'CDP'
vlan_ids:
- 20
- 45-60
- protocol: 'STP'
vlan_ids:
- 20-21
state: merged

# After state:
# ------------
# sonic# show running-configuration interface Ethernet0
# !
# interface Ethernet0
# mtu 9100
# speed 400000
# fec RS
# unreliable-los auto
# no shutdown
# switchport l2proto-tunnel cdp Vlan 20,40-60
# switchport l2proto-tunnel lacp Vlan 10-12
# switchport l2proto-tunnel lldp Vlan 10,12
# switchport l2proto-tunnel stp Vlan 20-21,25-26
57 changes: 57 additions & 0 deletions models/enterprise_sonic/br_l2pt/overridden_example_01.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Using "overridden" state
#
# Before state:
# -------------
# sonic# show running-configuration interface Ethernet 0
# !
# interface Ethernet0
# mtu 9100
# speed 400000
# fec RS
# unreliable-los auto
# no shutdown
# switchport l2proto-tunnel lldp Vlan 10
# switchport l2proto-tunnel lacp Vlan 15-50
# switchport l2proto-tunnel cdp 20
# switchport l2proto-tunnel stp 25-26
# sonic# show running-configuration interface Ethernet 8
# !
# interface Ethernet8
# mtu 9100
# speed 400000
# fec RS
# unreliable-los auto
# no shutdown
# switchport l2proto-tunnel lldp Vlan 100
# switchport l2proto-tunnel stp Vlan 100-150

- name: Override interface L2PT configurations
dellemc.enterprise_sonic.sonic_br_l2pt:
config:
- name: Ethernet0
bridge_l2pt_params:
- protocol: 'LACP'
vlan_ids:
- 10-12
- protocol: 'CDP'
vlan_ids:
- 20
- 40-60
- protocol: 'STP'
vlan_ids:
- 25-26
state: overridden

# After state:
# ------------
# sonic# show running-configuration interface Ethernet0
# !
# interface Ethernet0
# mtu 9100
# speed 400000
# fec RS
# unreliable-los auto
# no shutdown
# switchport l2proto-tunnel cdp Vlan 20,40-60
# switchport l2proto-tunnel lacp Vlan 10-12
# switchport l2proto-tunnel stp Vlan 25-26
Loading