�
�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_vrouter_ospf6
author: "Pluribus Networks (@rajaspachipulusu17)"
version_added: "2.8"
short_description: CLI command to add/remove vrouter-ospf6
description:
- This module can be used to add interface ip to OSPF6 protocol
or remove interface ip from OSPF6 protocol on vRouter.
options:
pn_cliswitch:
description:
- Target switch to run the CLI on.
required: false
type: str
state:
description:
- State the action to perform. Use C(present) to add vrouter-ospf6 and
C(absent) to remove interface from vrouter-ospf6.
required: true
type: str
choices: ['present', 'absent']
pn_ospf6_area:
description:
- area id for this interface in IPv4 address format.
required: false
type: str
pn_nic:
description:
- OSPF6 control for this interface.
required: false
type: str
pn_vrouter_name:
description:
- name of service config.
required: false
type: str
sq
- name: Add vrouter interface nic to ospf6
pn_vrouter_ospf6:
pn_cliswitch: "sw01"
state: "present"
pn_vrouter_name: "foo-vrouter"
pn_nic: "eth0.4092"
pn_ospf6_area: "0.0.0.0"
- name: Remove vrouter interface nic to ospf6
pn_vrouter_ospf6:
pn_cliswitch: "sw01"
state: "absent"
pn_vrouter_name: "foo-vrouter"
pn_nic: "eth0.4092"
s�
command:
description: the CLI command run on the target node.
returned: always
type: str
stdout:
description: set of responses from the vrouter-ospf6 command.
returned: always
type: list
stderr:
description: set of error responses from the vrouter-ospf6 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 } t | | � d } | rL | j � } n | | k r^ t n t } | r� | d | } t | | � d } | r� | j � n | | k r� t n t } n | | f S( s�
This method checks if vRouter exists on the target node.
This method also checks for idempotency using the vrouter-interface-show
command.
If the given vRouter exists, return VROUTER_EXISTS as True else False.
If nic_str exists on the given vRouter, return NIC_EXISTS as True else
False. This is required for vrouter-ospf6-remove.
:param module: The Ansible module to fetch input parameters
:param cli: The CLI string
:return Booleans: VROUTER_EXISTS, NIC_EXISTS
t pn_vrouter_namet pn_nics* vrouter-show format name no-show-headers i s>