�
�Udac @` s� d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d
Z d d l
m Z d d l m
Z
m Z m Z d
� Z e d k r� e � n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust communityt supported_bys[
---
module: pn_stp
author: "Pluribus Networks (@rajaspachipulusu17)"
version_added: "2.8"
short_description: CLI command to modify stp
description:
- This module can be used to modify Spanning Tree Protocol parameters.
options:
pn_cliswitch:
description:
- Target switch to run the CLI on.
type: str
required: false
state:
description:
- State the action to perform. Use C(update) to stp.
type: str
required: true
choices: ['update']
pn_hello_time:
description:
- STP hello time between 1 and 10 secs.
type: str
default: '2'
pn_enable:
description:
- enable or disable STP
type: bool
pn_root_guard_wait_time:
description:
- root guard wait time between 0 and 300 secs. 0 to disable wait.
type: str
default: '20'
pn_bpdus_bridge_ports:
description:
- BPDU packets to bridge specific port.
type: bool
pn_mst_max_hops:
description:
- maximum hop count for mstp bpdu.
type: str
default: '20'
pn_bridge_id:
description:
- STP bridge id.
type: str
pn_max_age:
description:
- maximum age time between 6 and 40 secs.
type: str
default: '20'
pn_stp_mode:
description:
- STP mode.
type: str
choices: ['rstp', 'mstp']
pn_mst_config_name:
description:
- Name for MST Configuration Instance.
type: str
pn_forwarding_delay:
description:
- STP forwarding delay between 4 and 30 secs.
type: str
default: '15'
pn_bridge_priority:
description:
- STP bridge priority.
type: str
default: '32768'
sz
- name: Modify stp
pn_stp:
pn_cliswitch: "sw01"
state: "update"
pn_hello_time: "3"
pn_stp_mode: "rstp"
s�
command:
description: the CLI command run on the target node.
returned: always
type: str
stdout:
description: set of responses from the stp command.
returned: always
type: list
stderr:
description: set of error responses from the stp command.
returned: on error
type: list
changed:
description: indicates whether the CLI caused changes on the target.
returned: always
type: bool
( t
AnsibleModule( t pn_clit run_clit booleanArgsc # C` s� t d d � } t d t d t d t d d � d t d t d d d | j � � d
t d t d d d d � d
t d t d d � d t d t d d d d � d t d t d d � d t d t d d d d � d t d t d d � d t d t d d d d � d t d t d d d d d g � d t d t d d � d t d t d d d d � d t d t d d d d � �
d d
d
d d d d d d d d d g g � } | j d } | j d } | j d
} | j d
} | j d } | j d } | j d } | j d } | j d }
| j d } | j d } | j d }
| j d } | | } t | | � } | d k rr| d | 7} | r�| d | 7} n | r�| d | 7} n | r�| d! | 7} n | r�| d"