Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/network/netvisor/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/network/netvisor/pn_stp_port.pyo

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddlm
Z
mZmZd
�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	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(tpn_clitrun_clitbooleanArgscC`s tdd�}tdtdtdtdd�dtdtddd	|j��d
tdtdddd�d
tdtdddd�dtdtdd�dtdtdd�dtdtdd�dtdtdd�dtdtdd�dtdtdd��
ddddggfdd
dddddgf�}|jd}|jd}|jd
}|jd
}|jd}|jd}|jd}|jd}	|jd}
|jd}||}t||�}
|dkr|
d|7}
|r/t|�ddkr/t|�dkr/|
d|7}
n|jdtdd�|rnt|�d krn|
d!|7}
n|jdtdd"�|
r�|
d#|
7}
n|
t	|d$d%�7}
|
t	|d&d'�7}
|
t	|d(d)�7}
|
t	|	d*d+�7}
|
t	|d,d-�7}
nt
||
|�d.S(/s' This section is for arguments parsing tupdatesstp-port-modifyt
argument_spectpn_cliswitchtrequiredttypetstrtstatetchoicestpn_prioritytdefaultt128tpn_costt2000t
pn_root_guardtboolt	pn_filtertpn_edget
pn_bpdu_guardtpn_porttpn_blocktrequired_iftrequired_one_ofs %s iii�s
 priority tfailedtmsgs<Priority must be increment of 16 and should be less that 240i��s cost s$cost must be between 1 and 200000000s port s
root-guards
no-root-guardtfilters	no-filtertedgesno-edges
bpdu-guards
no-bpdu-guardtblocksno-blockN(tdictRtFalsetTruetkeystparamsR	tintt	fail_jsonRR
(t	state_maptmodulet	cliswitchRtprioritytcostt
root_guardRR%t
bpdu_guardtportR&tcommandtcli((sP/usr/lib/python2.7/site-packages/ansible/modules/network/netvisor/pn_stp_port.pytmainxsd		










.		t__main__N(t
__future__RRRRt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRt-ansible.module_utils.network.netvisor.pn_nvosR	R
RR8t__name__(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/netvisor/pn_stp_port.pyt<module>s


9	K

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]