�
�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 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_cos_bw
author: "Pluribus Networks (@rajaspachipulusu17)"
version_added: "2.8"
short_description: CLI command to modify port-cos-bw
description:
- This module can be used to update bw settings for CoS queues.
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-cos-bw.
required: True
type: str
choices: ['update']
pn_max_bw_limit:
description:
- Maximum b/w in percentage.
required: False
type: str
pn_cos:
description:
- CoS priority.
required: False
type: str
pn_port:
description:
- physical port number.
required: False
type: str
pn_weight:
description:
- Scheduling weight (1 to 127) after b/w guarantee met.
required: False
type: str
choices: ['priority', 'no-priority']
pn_min_bw_guarantee:
description:
- Minimum b/w in percentage.
required: False
type: str
s2
- name: port cos bw modify
pn_port_cos_bw:
pn_cliswitch: "sw01"
state: "update"
pn_port: "1"
pn_cos: "0"
pn_min_bw_guarantee: "60"
- name: port cos bw modify
pn_port_cos_bw:
pn_cliswitch: "sw01"
state: "update"
pn_port: "all"
pn_cos: "0"
pn_weight: "priority"
s�
command:
description: the CLI command run on the target node.
returned: always
type: str
stdout:
description: set of responses from the port-cos-bw command.
returned: always
type: list
stderr:
description: set of error responses from the port-cos-bw 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_clic C` s t d d � } t d t d t d t d d � d t d t d d d | j � � d
t d t d d � d t d t d d � d t d t d d � d
t d t d d d d d g � d t d t d d � � d d d d d g g f d d
d d
g g � } | j d } | j d } | j d
} | j d } | j d } | j d
} | j d } | | } t | | � }
| d k r�|
d | 7}
| r�|
d | 7}
n | r�|
d | 7}
n | r�|
d | 7}
n | r�|
d | 7}
n | r�|
d | 7}
q�n t | |
| � d S( s'