�
�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 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_access_list_ip
author: "Pluribus Networks (@rajaspachipulusu17)"
version_added: "2.8"
short_description: CLI command to add/remove access-list-ip
description:
- This modules can be used to add and remove IPs associated with access list.
options:
pn_cliswitch:
description:
- Target switch to run the CLI on.
required: False
type: str
state:
description:
- State the action to perform. Use 'present' to add access-list-ip and
'absent' to remove access-list-ip.
required: True
choices: ["present", "absent"]
pn_ip:
description:
- IP associated with the access list.
required: False
default: '::'
type: str
pn_name:
description:
- Access List Name.
required: False
type: str
s'
- name: access list ip functionality
pn_access_list_ip:
pn_cliswitch: "sw01"
pn_name: "foo"
pn_ip: "172.16.3.1"
state: "present"
- name: access list ip functionality
pn_access_list_ip:
pn_cliswitch: "sw01"
pn_name: "foo"
pn_ip: "172.16.3.1"
state: "absent"
s�
command:
description: the CLI command run on the target node.
returned: always
type: str
stdout:
description: set of responses from the access-list-ip command.
returned: always
type: list
stderr:
description: set of error responses from the access-list-ip 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_cli( t run_commandsc C` s� | j d } | j d } | } | d | 7} t | | � d } | | k rj | j d t d d | � n | } | d | 7} t | | � d } | j � } | | k r� t St S( s�
This method checks for idempotency using the access-list-ip-show command.
If ip exists, return True else False.
:param module: The Ansible module to fetch input parameters
:param cli: The CLI string
t pn_namet pn_ips* access-list-show name %s no-show-headers i t failedt msgs'