�
�Udac @ s� d Z i d d 6d g d 6d d 6Z d Z d Z d Z d
d l Z d
d l m Z d a d a
d a d a d
� Z
d � Z d � Z d � Z d � Z d � Z e d k r� e � n d S( s, PN-CLI vrouter-interface-add/remove/modify s 1.1t metadata_versiont
deprecatedt statust communityt supported_bys.
---
module: pn_vrouterif
author: "Pluribus Networks (@amitsi)"
version_added: "2.2"
short_description: CLI command to add/remove/modify vrouter-interface.
deprecated:
removed_in: '2.12'
why: Doesn't support latest Pluribus Networks netvisor
alternative: Latest modules will be pushed in Ansible future versions.
description:
- Execute vrouter-interface-add, vrouter-interface-remove,
vrouter-interface-modify command.
- You configure interfaces to vRouter services on a fabric, cluster,
standalone switch or virtual network(VNET).
options:
pn_cliusername:
description:
- Provide login username if user is not root.
required: False
pn_clipassword:
description:
- Provide login password if user is not root.
required: False
pn_cliswitch:
description:
- Target switch to run the cli on.
required: False
default: 'local'
state:
description:
- State the action to perform. Use 'present' to add vrouter interface,
'absent' to remove vrouter interface and 'update' to modify vrouter
interface.
required: True
choices: ['present', 'absent', 'update']
pn_vrouter_name:
description:
- Specify the name of the vRouter interface.
required: True
pn_vlan:
description:
- Specify the VLAN identifier. This is a value between 1 and 4092.
pn_interface_ip:
description:
- Specify the IP address of the interface in x.x.x.x/n format.
pn_assignment:
description:
- Specify the DHCP method for IP address assignment.
choices: ['none', 'dhcp', 'dhcpv6', 'autov6']
pn_vxlan:
description:
- Specify the VXLAN identifier. This is a value between 1 and 16777215.
pn_interface:
description:
- Specify if the interface is management, data or span interface.
choices: ['mgmt', 'data', 'span']
pn_alias:
description:
- Specify an alias for the interface.
pn_exclusive:
description:
- Specify if the interface is exclusive to the configuration. Exclusive
means that other configurations cannot use the interface. Exclusive is
specified when you configure the interface as span interface and allows
higher throughput through the interface.
type: bool
required: False
pn_nic_enable:
description:
- Specify if the NIC is enabled or not
type: bool
pn_vrrp_id:
description:
- Specify the ID for the VRRP interface. The IDs on both vRouters must be
the same IS number.
pn_vrrp_priority:
description:
- Specify the priority for the VRRP interface. This is a value between
1 (lowest) and 255 (highest).
pn_vrrp_adv_int:
description:
- Specify a VRRP advertisement interval in milliseconds. The range is
from 30 to 40950 with a default value of 1000.
pn_l3port:
description:
- Specify a Layer 3 port for the interface.
pn_secondary_macs:
description:
- Specify a secondary MAC address for the interface.
pn_nic_str:
description:
- Specify the type of NIC. Used for vrouter-interface remove/modify.
s�
- name: Add vrouter-interface
pn_vrouterif:
pn_cliusername: admin
pn_clipassword: admin
state: 'present'
pn_vrouter_name: 'ansible-vrouter'
pn_interface_ip: 101.101.101.2/24
pn_vlan: 101
- name: Add VRRP..
pn_vrouterif:
pn_cliusername: admin
pn_clipassword: admin
state: 'present'
pn_vrouter_name: 'ansible-vrouter'
pn_interface_ip: 101.101.101.2/24
pn_vrrp_ip: 101.101.101.1/24
pn_vrrp_priority: 100
pn_vlan: 101
- name: Remove vrouter-interface
pn_vrouterif:
pn_cliusername: admin
pn_clipassword: admin
state: 'absent'
pn_vrouter_name: 'ansible-vrouter'
pn_interface_ip: 101.101.101.2/24
s�
command:
description: The CLI command run on the target node(s).
returned: always
type: str
stdout:
description: The set of responses from the vrouterif command.
returned: on success
type: list
stderr:
description: The set of error responses from the vrouterif command.
returned: on error
type: str
changed:
description: Indicates whether the CLI caused changes on the target.
returned: always
type: bool
i����N( t
AnsibleModulec C sw | j d } | j d } | j d } | rF | rF d | | f } n d } | d k re | d 7} n | d | 7} | S( s
This method is to generate the cli portion to launch the Netvisor cli.
It parses the username, password, switch parameters from module.
:param module: The Ansible module to fetch username, password and switch
:return: returns the cli string for further processing
t pn_cliusernamet pn_clipasswordt pn_cliswitchs"