�
�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_bysP
---
module: pn_vtep
author: "Pluribus Networks (@rajaspachipulusu17)"
version_added: "2.9"
short_description: CLI command to create/delete vtep
description:
- This module can be used to create a vtep and delete a vtep.
options:
pn_cliswitch:
description:
- Target switch to run the CLI on.
required: false
type: str
state:
description:
- vtep configuration command.
required: false
choices: ['present', 'absent']
type: str
default: 'present'
pn_name:
description:
- vtep name.
required: false
type: str
pn_ip:
description:
- Primary IP address.
required: false
type: str
pn_vrouter_name:
description:
- name of the vrouter service.
required: false
type: str
pn_virtual_ip:
description:
- Virtual/Secondary IP address.
required: false
type: str
pn_location:
description:
- switch name.
required: false
type: str
pn_switch_in_cluster:
description:
- Tells whether switch in cluster or not.
required: false
type: bool
default: True
s
- name: create vtep
pn_vtep:
pn_cliswitch: 'sw01'
pn_name: 'foo'
pn_vrouter_name: 'foo-vrouter'
pn_ip: '22.22.22.2'
pn_location: 'sw01'
pn_virtual_ip: "22.22.22.1"
- name: delete vtep
pn_vtep:
pn_cliswitch: 'sw01'
state: 'absent'
pn_name: 'foo'
s�
command:
description: the CLI command run on the target node.
returned: always
type: str
stdout:
description: set of responses from the vtep command.
returned: always
type: list
stderr:
description: set of error responses from the vtep 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` sS | j d } | d 7} t | | � d } | r? | j � } n | | k rO t St S( s�
This method checks for idempotency using the vtep-show command.
If a name exists, return True if name exists else False.
:param module: The Ansible module to fetch input parameters
:param cli: The CLI string
t pn_names&