Skip to content
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

Feat(eos_cli_config_gen): Add support for logging event storm-control and link-status in interfaces #3589

Merged
merged 4 commits into from
Feb 8, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@ interface Port-Channel100.101
interface Port-Channel100.102
description IFL for TENANT02
no logging event link-status
logging event storm-control discards
mtu 1500
encapsulation dot1q vlan 102
vrf C2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ interface Vlan1002
interface Vlan2001
description SVI Description
vrf Tenant_B
logging event link-status
ip address virtual 10.2.1.1/24
comment
Comment created from eos_cli under vlan_interfaces.Vlan2001
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ interface Port-Channel100.101
interface Port-Channel100.102
description IFL for TENANT02
no logging event link-status
logging event storm-control discards
mtu 1500
encapsulation dot1q vlan 102
vrf C2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ interface Vlan1002
interface Vlan2001
description SVI Description
vrf Tenant_B
logging event link-status
ip address virtual 10.2.1.1/24
comment
Comment created from eos_cli under vlan_interfaces.Vlan2001
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ port_channel_interfaces:
logging:
event:
link_status: false
storm_control_discards: true
description: IFL for TENANT02
mtu: 1500
ip_address: 10.1.2.3/31
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ vlan_interfaces:
description: SVI Description
vrf: Tenant_B
ip_address_virtual: 10.2.1.1/24
logging:
event:
link_status: true
eos_cli: |
comment
Comment created from eos_cli under vlan_interfaces.Vlan2001
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;link_status</samp>](## "ethernet_interfaces.[].logging.event.link_status") | Boolean | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;congestion_drops</samp>](## "ethernet_interfaces.[].logging.event.congestion_drops") | Boolean | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;spanning_tree</samp>](## "ethernet_interfaces.[].logging.event.spanning_tree") | Boolean | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;storm_control_discards</samp>](## "ethernet_interfaces.[].logging.event.storm_control_discards") | Boolean | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;storm_control_discards</samp>](## "ethernet_interfaces.[].logging.event.storm_control_discards") | Boolean | | | | Discards due to storm-control.<br> |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;lldp</samp>](## "ethernet_interfaces.[].lldp") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;transmit</samp>](## "ethernet_interfaces.[].lldp.transmit") | Boolean | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;receive</samp>](## "ethernet_interfaces.[].lldp.receive") | Boolean | | | | |
Expand Down Expand Up @@ -780,6 +780,8 @@
link_status: <bool>
congestion_drops: <bool>
spanning_tree: <bool>

# Discards due to storm-control.
storm_control_discards: <bool>
lldp:
transmit: <bool>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;logging</samp>](## "port_channel_interfaces.[].logging") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;event</samp>](## "port_channel_interfaces.[].logging.event") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;link_status</samp>](## "port_channel_interfaces.[].logging.event.link_status") | Boolean | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;storm_control_discards</samp>](## "port_channel_interfaces.[].logging.event.storm_control_discards") | Boolean | | | | Discards due to storm-control.<br> |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;shutdown</samp>](## "port_channel_interfaces.[].shutdown") | Boolean | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;l2_mtu</samp>](## "port_channel_interfaces.[].l2_mtu") | Integer | | | Min: 68<br>Max: 65535 | "l2_mtu" should only be defined for platforms supporting the "l2 mtu" CLI<br> |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;l2_mru</samp>](## "port_channel_interfaces.[].l2_mru") | Integer | | | Min: 68<br>Max: 65535 | "l2_mru" should only be defined for platforms supporting the "l2 mru" CLI<br> |
Expand Down Expand Up @@ -235,6 +236,9 @@
logging:
event:
link_status: <bool>

# Discards due to storm-control.
storm_control_discards: <bool>
shutdown: <bool>

# "l2_mtu" should only be defined for platforms supporting the "l2 mtu" CLI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
| [<samp>vlan_interfaces</samp>](## "vlan_interfaces") | List, items: Dictionary | | | | |
| [<samp>&nbsp;&nbsp;-&nbsp;name</samp>](## "vlan_interfaces.[].name") | String | Required, Unique | | | VLAN interface name like "Vlan123" |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;description</samp>](## "vlan_interfaces.[].description") | String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;logging</samp>](## "vlan_interfaces.[].logging") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;event</samp>](## "vlan_interfaces.[].logging.event") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;link_status</samp>](## "vlan_interfaces.[].logging.event.link_status") | Boolean | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;shutdown</samp>](## "vlan_interfaces.[].shutdown") | Boolean | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;vrf</samp>](## "vlan_interfaces.[].vrf") | String | | | | VRF name |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;arp_aging_timeout</samp>](## "vlan_interfaces.[].arp_aging_timeout") | Integer | | | Min: 1<br>Max: 65535 | In seconds |
Expand Down Expand Up @@ -190,6 +193,9 @@
# VLAN interface name like "Vlan123"
- name: <str; required; unique>
description: <str>
logging:
event:
link_status: <bool>
shutdown: <bool>

# VRF name
Expand Down

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

Binary file not shown.

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 @@ -688,6 +688,8 @@ keys:
type: bool
storm_control_discards:
type: bool
description: |
Discards due to storm-control.
lldp:
type: dict
keys:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ keys:
keys:
link_status:
type: bool
storm_control_discards:
type: bool
description: |
Discards due to storm-control.
shutdown:
type: bool
l2_mtu:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ keys:
description: VLAN interface name like "Vlan123"
description:
type: str
logging:
type: dict
keys:
event:
type: dict
keys:
link_status:
type: bool
shutdown:
type: bool
vrf:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ interface {{ port_channel_interface.name }}
{% elif port_channel_interface.logging.event.link_status is arista.avd.defined(false) %}
no logging event link-status
{% endif %}
{% if port_channel_interface.logging.event.storm_control_discards is arista.avd.defined(true) %}
logging event storm-control discards
{% elif port_channel_interface.logging.event.storm_control_discards is arista.avd.defined(false) %}
no logging event storm-control discards
{% endif %}
{% if port_channel_interface.shutdown is arista.avd.defined(true) %}
shutdown
{% elif port_channel_interface.shutdown is arista.avd.defined(false) %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ interface {{ vlan_interface.name }}
{% if vlan_interface.vrf is arista.avd.defined %}
vrf {{ vlan_interface.vrf }}
{% endif %}
{% if vlan_interface.logging.event.link_status is arista.avd.defined(true) %}
logging event link-status
{% elif vlan_interface.logging.event.link_status is arista.avd.defined(false) %}
no logging event link-status
{% endif %}
{% if vlan_interface.arp_aging_timeout is arista.avd.defined %}
arp aging timeout {{ vlan_interface.arp_aging_timeout }}
{% endif %}
Expand Down

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

Binary file not shown.
Loading