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_fabric_local.pyc

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddlm
Z
mZdd
lmZd�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bysY
---
module: pn_fabric_local
author: "Pluribus Networks (@rajaspachipulusu17)"
version_added: "2.9"
short_description: CLI command to modify fabric-local
description:
  - This module can be used to modify fabric local information.
options:
  pn_cliswitch:
    description:
      - Target switch to run the CLI on.
    required: true
    type: str
  state:
    description:
      - State the action to perform. Use C(update) to modify the fabric-local.
    required: false
    type: str
    choices: ['update']
    default: 'update'
  pn_fabric_network:
    description:
      - fabric administration network.
    required: false
    choices: ['in-band', 'mgmt', 'vmgmt']
    default: 'mgmt'
  pn_vlan:
    description:
      - VLAN assigned to fabric.
    required: false
    type: str
  pn_control_network:
    description:
      - control plane network.
    required: false
    choices: ['in-band', 'mgmt', 'vmgmt']
  pn_fabric_advertisement_network:
    description:
      - network to send fabric advertisements on.
    required: false
    choices: ['inband-mgmt', 'inband-only', 'inband-vmgmt', 'mgmt-only']
s�
- name: Fabric local module
  pn_fabric_local:
    pn_cliswitch: "sw01"
    pn_vlan: "500"

- name: Fabric local module
  pn_fabric_local:
    pn_cliswitch: "sw01"
    pn_fabric_advertisement_network: "mgmt-only"
s�
command:
  description: the CLI command run on the target node.
  returned: always
  type: str
stdout:
  description: set of responses from the fabric-local command.
  returned: always
  type: list
stderr:
  description: set of error responses from the fabric-local 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_commandscC`s�tdd�}tdtdtdd�dtdtddd|j�d	d�d
tdtdddddd
gd	d�dtdtdd�dtdtdddddd
g�dtdtdddddddg��}td|dd
dddgg�}|jd}|jd}|jd
}|jd}|jd}|jd}||}	|rt|�dks�t|�dkr�|jdtdd�nt||�}
|
d7}
t	||
�dj
�}||kr|dkr|jdtdd|�qnt||�}
|	dkr�|
d|	7}
|rG|
d |7}
n|r^|
d!|7}
n|ru|
d"|7}
n|r�|
d#|7}
q�nt||
|�d$S(%s' This section is for arguments parsing tupdatesfabric-local-modifytpn_cliswitchtrequiredttypetstrtstatetchoicestdefaulttpn_fabric_networktmgmtsin-bandtvmgmttpn_vlantpn_control_networktpn_fabric_advertisement_networksinband-mgmtsinband-onlysinband-vmgmts	mgmt-onlyt
argument_spectrequired_one_ofii�tfailedtmsgsValid vlan range is 1 to 4092s$ vlan-show format id no-show-headerst1s/vlan %s is already in used. Specify unused vlans %s s fabric-network s vlan s control-network s fabric-advertisement-network N(tdicttTruetFalsetkeysRtparamstintt	fail_jsonR	RtsplitR
(t	state_mapRtmodulet	cliswitchRtfabric_networktvlantcontrol_networktfabric_adv_networktcommandtclitout((sT/usr/lib/python2.7/site-packages/ansible/modules/network/netvisor/pn_fabric_local.pytmain^s`	'






$	

	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.netvisorRR1t__name__(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/netvisor/pn_fabric_local.pyt<module>s


-	I

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