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_dscp_map_pri_map.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_dscp_map_pri_map
author: "Pluribus Networks (@rajaspachipulusu17)"
version_added: "2.8"
short_description: CLI command to modify dscp-map-pri-map
description:
  - This module can be used to update priority mappings in tables.
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 dscp-map-pri-map.
    required: True
    type: str
    choices: ['update']
  pn_pri:
    description:
      - CoS priority.
    required: False
    type: str
  pn_name:
    description:
      - Name for the DSCP map.
    required: False
    type: str
  pn_dsmap:
    description:
      - DSCP value(s).
    required: False
    type: str
s>
- name: dscp map pri map modify
  pn_dscp_map_pri_map:
    pn_cliswitch: 'sw01'
    state: 'update'
    pn_name: 'foo'
    pn_pri: '0'
    pn_dsmap: '40'

- name: dscp map pri map modify
  pn_dscp_map_pri_map:
    pn_cliswitch: 'sw01'
    state: 'update'
    pn_name: 'foo'
    pn_pri: '1'
    pn_dsmap: '8,10,12,14'
s�
command:
  description: the CLI command run on the target node.
  returned: always
  type: str
stdout:
  description: set of responses from the dscp-map-pri-map command.
  returned: always
  type: list
stderr:
  description: set of error responses from the dscp-map-pri-map 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 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_names* dscp-map-show format name no-show-headersi(tparamsRtsplittTruetFalse(tmoduletclitnametout((sX/usr/lib/python2.7/site-packages/ansible/modules/network/netvisor/pn_dscp_map_pri_map.pyt	check_cli^s

c
C`s�tdd�}tdtdtdtdd�dtdtddd	|j��d
tdtdd�dtdtdd�dtdtdd��d
dddd
ggf�}|jd}|jd}|jd
}|jd}|jd}||}t||�}t||�}	|dkr�|	tkrL|jdtdd|�n|d|7}|rq|d|7}n|r�|d|7}n|r�|d|7}q�nt	|||�dS(s' This section is for arguments parsing tupdatesdscp-map-pri-map-modifyt
argument_spectpn_cliswitchtrequiredttypetstrtstatetchoicestpn_priRtpn_dsmaptrequired_iftfailedtmsgs,Create dscp map with name %s before updatings %s s pri s name s dsmap N(
tdictRRRtkeysR
R	Rt	fail_jsonR
(
t	state_mapRt	cliswitchRtpriRtdsmaptcommandRtNAME_EXISTS((sX/usr/lib/python2.7/site-packages/ansible/modules/network/netvisor/pn_dscp_map_pri_map.pytmainps@	





	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__(((sX/usr/lib/python2.7/site-packages/ansible/modules/network/netvisor/pn_dscp_map_pri_map.pyt<module>s


'		3

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