�
�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_port
author: "Pluribus Networks (@rajaspachipulusu17)"
version_added: "2.8"
short_description: CLI command to modify stp-port.
description:
- This module can be used modify Spanning Tree Protocol (STP) parameters on ports.
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 update stp-port.
type: str
required: true
choices: ['update']
pn_priority:
description:
- STP port priority from 0 to 240.
type: str
default: '128'
pn_cost:
description:
- STP port cost from 1 to 200000000.
type: str
default: '2000'
pn_root_guard:
description:
- STP port Root guard.
type: bool
pn_filter:
description:
- STP port filters BPDUs.
type: bool
pn_edge:
description:
- STP port is an edge port.
type: bool
pn_bpdu_guard:
description:
- STP port BPDU guard.
type: bool
pn_port:
description:
- STP port.
type: str
pn_block:
description:
- Specify if a STP port blocks BPDUs.
type: bool
s�
- name: Modify stp port
pn_stp_port:
pn_cliswitch: "sw01"
state: "update"
pn_port: "1"
pn_filter: True
pn_priority: '144'
- name: Modify stp port
pn_stp_port:
pn_cliswitch: "sw01"
state: "update"
pn_port: "1"
pn_cost: "200"
- name: Modify stp port
pn_stp_port:
pn_cliswitch: "sw01"
state: "update"
pn_port: "1"
pn_edge: True
pn_cost: "200"
s�
command:
description: the CLI command run on the target node.
returned: always
type: str
stdout:
description: set of responses from the stp-port command.
returned: always
type: list
stderr:
description: set of error responses from the stp-port 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 d � d t d t d d � d t d t d d � d t d t d d � d t d t d d � d t d t d d � d t d t d d � �
d d d d g g f d d
d d d d d g f � } | j d } | j d } | j d
} | j d
} | j d } | j d } | j d } | j d } | j d }
| j d } | | } t | | � }
| d k r|
d | 7}
| r/t | � d d k r/t | � d k r/|
d | 7}
n | j d t d d � | rnt | � d k rn|
d! | 7}
n | j d t d d"