Skip to content

Commit

Permalink
interface: add bpdu_guard_enable to configure_spanning_tree function
Browse files Browse the repository at this point in the history
  • Loading branch information
alagoutte committed Nov 11, 2023
1 parent d8840dd commit c43f2ea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pyaoscx/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -2395,12 +2395,14 @@ def configure_spanning_tree(
self,
admin_edge_port_enable=None,
bpdu_filter_enable=None,
bpdu_guard_enable=None,
):
"""
Configure the Interface Spanning Tree Settings.
:param admin_edge_port_enable: Boolean to set admin type: admin-edge or admin-network (default)
:param bpdu_filter_enable: Boolean to set BPDU filter (disable by default)
:param bpdu_guard_enable: Boolean to set BPDU guard (disable by default)
:return: True if object changed.
"""

Expand All @@ -2417,5 +2419,8 @@ def configure_spanning_tree(
if bpdu_filter_enable is not None:
_stp_config["bpdu_filter_enable"] = bpdu_filter_enable

if bpdu_guard_enable is not None:
_stp_config["bpdu_guard_enable"] = bpdu_guard_enable

self.stp_config.update(_stp_config)
return self.apply()

0 comments on commit c43f2ea

Please sign in to comment.