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

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddlm
Z
mZmZdd
lmZd�Zd�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys�

---
module: pn_port_config
author: "Pluribus Networks (@rajaspachipulusu17)"
version_added: 2.8
short_description: CLI command to modify port-config
description:
  - This module can be used to modify a port configuration.
options:
  pn_cliswitch:
    description:
      - Target switch to run the CLI on.
    required: False
    type: str
  state:
    description:
      - State the action to perform. Use C(update) to modify the port-config.
    required: True
    type: str
    choices: ['update']
  pn_intf:
    description:
      - physical interface.
    required: False
    type: str
  pn_crc_check_enable:
    description:
      - CRC check on ingress and rewrite on egress.
    required: False
    type: bool
  pn_dscp_map:
    description:
      - DSCP map name to enable on port.
    required: False
    type: str
  pn_autoneg:
    description:
      - physical port autonegotiation.
    required: False
    type: bool
  pn_speed:
    description:
      - physical port speed.
    required: False
    choices: ['disable', '10m', '100m', '1g',
              '2.5g', '10g', '25g', '40g', '50g', '100g']
  pn_port:
    description:
      - physical port.
    required: False
    type: str
  pn_vxlan_termination:
    description:
      - physical port vxlan termination setting.
    required: False
    type: bool
  pn_pause:
    description:
      - physical port pause.
    required: False
    type: bool
  pn_loopback:
    description:
      - physical port loopback.
    required: False
    type: bool
  pn_loop_vlans:
    description:
      - looping vlans.
    required: False
    type: str
  pn_routing:
    description:
      - routing.
    required: False
    type: bool
  pn_edge_switch:
    description:
      - physical port edge switch.
    required: False
    type: bool
  pn_enable:
    description:
      - physical port enable.
    required: False
    type: bool
  pn_description:
    description:
      - physical port description.
    required: False
    type: str
  pn_host_enable:
    description:
      - Host facing port control setting.
    required: False
    type: bool
  pn_allowed_tpid:
    description:
      - Allowed TPID in addition to 0x8100 on Vlan header.
    required: False
    type: str
    choices: ['vlan', 'q-in-q', 'q-in-q-old']
  pn_mirror_only:
    description:
      - physical port mirror only.
    required: False
    type: bool
  pn_reflect:
    description:
      - physical port reflection.
    required: False
    type: bool
  pn_jumbo:
    description:
      - jumbo frames on physical port.
    required: False
    type: bool
  pn_egress_rate_limit:
    description:
      - max egress port data rate limit.
    required: False
    type: str
  pn_eth_mode:
    description:
      - physical Ethernet mode.
    required: False
    choices: ['1000base-x', 'sgmii', 'disabled', 'GMII']
  pn_fabric_guard:
    description:
      - Fabric guard configuration.
    required: False
    type: bool
  pn_local_switching:
    description:
      - no-local-switching port cannot bridge traffic to
        another no-local-switching port.
    required: False
    type: bool
  pn_lacp_priority:
    description:
      - LACP priority from 1 to 65535.
    required: False
    type: str
  pn_send_port:
    description:
      - send port.
    required: False
    type: str
  pn_port_mac_address:
    description:
      - physical port MAC Address.
    required: False
    type: str
  pn_defer_bringup:
    description:
      - defer port bringup.
    required: False
    type: bool
s
- name: port config modify
  pn_port_config:
    pn_cliswitch: "sw01"
    state: "update"
    pn_port: "all"
    pn_dscp_map: "foo"

- name: port config modify
  pn_port_config:
    pn_cliswitch: "sw01"
    state: "update"
    pn_port: "all"
    pn_host_enable: true
s�
command:
  description: the CLI command run on the target node.
  returned: always
  type: str
stdout:
  description: set of responses from the port-config command.
  returned: always
  type: list
stderr:
  description: set of error responses from the port-config 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_clitbooleanArgs(trun_commandscC`sR|jd}|d|7}t||�d}|j�}||dkrNtStS(s�
    This method checks for idempotency using the dscp-map-show name command.
    If a user with given name exists, return True else False.
    :param module: The Ansible module to fetch input parameters
    :param cli: The CLI string
    tpn_dscp_maps2 dscp-map-show name %s format name no-show-headersii����(tparamsRtsplittTruetFalse(tmoduletclitnametout((sS/usr/lib/python2.7/site-packages/ansible/modules/network/netvisor/pn_port_config.pyt	check_cli�s

c"AC`sstdd�}tdtdtdtdd�dtdtddd	dg�d
tdtdd�dtdtdd�d
tdtdd�dtdtdd�dtdtddd	ddddddddddg
�dtdtdd�dtdtdd�dtdtdd�dtdtdd�dtdtdd�dtdtdd�d tdtdd�d!tdtdd�d"tdtdd�d#tdtdd�d$tdtddd	d%d&d'g�d(tdtdd�d)tdtdd�d*tdtdd�d+tdtdd�d,tdtddd	d-d.d/d0g�d1tdtdd�d2tdtdd�d3tdtdd�d4tdtdd�d5tdtdd�d6tdtdd��d7dddggfd8d
dd
ddddd9dddd d!d"d#d$d(d)d*d+d,d1d2d3d4d5d6gg�}|jd}|jd}|jd
}|jd}|jd
}|jd}|jd}|jd}	|jd}
|jd}|jd}|jd}
|jd}|jd }|jd!}|jd"}|jd#}|jd$}|jd(}|jd)}|jd*}|jd+}|jd,}|jd1}|jd2}|jd3}|jd4}|jd5}|jd6}||}t||�} |r�t|| �}!n|dkr_| d:|7} |rC|!tkr2|jd;td<d=|�n| d>|7} n|rZ| d?|7} n|rq| d@|7} n|	r�| dA|	7} n|r�| dB|7} n|r�| dC|7} n|r�| dD|7} n|r�| dE|7} n|r�| dF|7} n|r| dG|7} n| t|dHdI�7} | t|dJdK�7} | t|
dLdM�7} | t|dNdO�7} | t|dPdQ�7} | t|dRdS�7} | t|dTdU�7} | t|dVd�7} | t|dWdX�7} | t|dYdZ�7} | t|d[d\�7} | t|d]d^�7} | t|d_d`�7} | t|dadb�7} | t|dcdd�7} nt	|| |�deS(fs' This section is for arguments parsing tupdatesport-config-modifyt
argument_spectpn_cliswitchtrequiredttypetstrtstatetchoicestpn_intftpn_crc_check_enabletboolR
t
pn_autonegtpn_speedtdisablet10mt100mt1gs2.5gt10gt25gt40gt50gt100gtpn_porttpn_vxlan_terminationtpn_pausetpn_loopbackt
pn_loop_vlanst
pn_routingtpn_edge_switcht	pn_enabletpn_descriptiontpn_host_enabletpn_allowed_tpidtvlansq-in-qs
q-in-q-oldtpn_mirror_onlyt
pn_reflecttpn_jumbotpn_egress_rate_limittpn_eth_modes
1000base-xtsgmiitdisabledtGMIItpn_fabric_guardtpn_local_switchingtpn_lacp_prioritytpn_send_porttpn_port_mac_addresstpn_defer_bringuptrequired_iftrequired_one_oftpn_fecs %s tfailedtmsgs,Create dscp map with name %s before updatings
 dscp-map s intf s speed s port s allowed-tpid s egress-rate-limit s
 eth-mode s lacp-priority s send-port s port-mac-address scrc-check-enablescrc-check-disabletautonegs
no-autonegsvxlan-terminationsno-vxlan-terminationtpausesno-pausetloopbacksno-loopbacktroutings
no-routingsedge-switchsno-edge-switchtenableshost-enableshost-disablesmirror-onlysno-mirror-receive-onlytreflects
no-reflecttjumbosno-jumbosfabric-guardsno-fabric-guardslocal-switchingsno-local-switchings
defer-bringupsno-defer-bringupN(
tdictRRRRR	Rt	fail_jsonRR
("t	state_mapRt	cliswitchRtintftcrc_check_enabletdscp_mapRLtspeedtporttvxlan_terminationRMRNt
loop_vlansROtedge_switchRPtdescriptionthost_enabletallowed_tpidtmirror_onlyRQRRtegress_rate_limitteth_modetfabric_guardtlocal_switchingt
lacp_priorityt	send_porttport_mac_addresst
defer_bringuptcommandRtNAME_EXISTS((sS/usr/lib/python2.7/site-packages/ansible/modules/network/netvisor/pn_port_config.pytmain�s				





























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


�		�

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