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_prefix_list.pyo

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddlm
Z
mZdd
lmZd�Zd�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys 
---
module: pn_prefix_list
author: "Pluribus Networks (@rajaspachipulusu17)"
version_added: "2.9"
short_description: CLI command to create/delete prefix-list
description:
  - This module can be used to create or delete prefix list.
options:
  pn_cliswitch:
    description:
      - Target switch to run the CLI on.
    required: false
    type: str
  state:
    description:
      - State the action to perform. Use C(present) to create prefix-list and
        C(absent) to delete prefix-list.
    required: false
    type: str
    choices: ['present', 'absent']
    default: 'present'
  pn_name:
    description:
      - Prefix List Name.
    required: true
    type: str
  pn_scope:
    description:
      - scope of prefix-list.
    required: false
    type: str
    choices: ['local', 'fabric']
s�
- name: Create prefix list
  pn_prefix_list:
    pn_cliswitch: "sw01"
    pn_name: "foo"
    pn_scope: "local"
    state: "present"

- name: Delete prefix list
  pn_prefix_list:
    pn_cliswitch: "sw01"
    pn_name: "foo"
    state: "absent"
s�
command:
  description: the CLI command run on the target node.
  returned: always
  type: str
stdout:
  description: set of responses from the prefix-list command.
  returned: always
  type: list
stderr:
  description: set of error responses from the prefix-list 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_cli(trun_commandscC`sS|jd}|d7}t||�d}|r?|j�}n||krOtStS(s�
    This method checks for idempotency using the prefix-list-show command.
    If a name exists, return True if name exists else False.
    :param module: The Ansible module to fetch input parameters
    :param cli: The CLI string
    tpn_names- prefix-list-show format name no-show-headersi(tparamsRtsplittTruetFalse(tmoduletclitnametout((sS/usr/lib/python2.7/site-packages/ansible/modules/network/netvisor/pn_prefix_list.pyt	check_cliXs

c
C`s�tdddd�}tdtdtdd�d	tdtddd
|j�dd�dtdtdd�d
tdtddd
ddg��}td|dd	ddd
ggd	ddggf�}|jd}|jd	}|jd}|jd
}||}t||�}t||�}	|d||f7}|dkrn|	tkr�|jdtdd|�q�nF|dkr�|	tkr�|jdtdd|�q�n|d|7}t	|||�dS(s' This section is for arguments parsing tpresentsprefix-list-createtabsentsprefix-list-deletetpn_cliswitchtrequiredttypetstrtstatetchoicestdefaultRtpn_scopetlocaltfabrict
argument_spectrequired_ifs %s name %s tskippedtmsgs'prefix-list with name %s does not exists'prefix list with name %s already existss
 scope %s N(
tdictRtkeysRRR
R	Rt	exit_jsonR
(
t	state_mapR"Rt	cliswitchRRtscopetcommandRtNAME_EXISTS((sS/usr/lib/python2.7/site-packages/ansible/modules/network/netvisor/pn_prefix_list.pytmainjsD	




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


$		:

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