�
�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 d
l m Z d � 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_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( t pn_clit run_clit booleanArgs( t run_commandsc C` sR | j d } | d | 7} t | | � d } | j � } | | d k rN t St S( 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
t pn_dscp_maps2 dscp-map-show name %s format name no-show-headersi i����( t paramsR t splitt Truet False( t modulet clit namet out( ( sS /usr/lib/python2.7/site-packages/ansible/modules/network/netvisor/pn_port_config.pyt check_cli� s
c "