Skip to content

Commit

Permalink
interface: add configure_spanning_tree function for confiure STP
Browse files Browse the repository at this point in the history
Only support set admin_edge_port(_enable) for the moment
  • Loading branch information
alagoutte committed Nov 1, 2023
1 parent aa91f08 commit 984e96a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions pyaoscx/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -2389,3 +2389,23 @@ def configure_speed_duplex(
)
self.user_config.update(_user_config)
return self.apply()

@PyaoscxModule.materialized
def configure_spanning_tree(
self,
admin_edge_port_enable=None,
):
"""
Configure the Interface Spanning Tree Settings.
:param admin_edge_port_enable: Boolean to set admin type: admin-edge or admin-network (default)
:return: True if object changed.
"""

_stp_config = {}

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

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

0 comments on commit 984e96a

Please sign in to comment.