�
�Udac @` s� d Z 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 d d l m Z d � Z e d k r� e � n d S( s+
The module file for junos_lacp_interfaces
i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust networkt supported_bys�
---
module: junos_lacp_interfaces
version_added: 2.9
short_description: Manage Link Aggregation Control Protocol (LACP) attributes of interfaces on Juniper JUNOS devices.
description:
- This module manages Link Aggregation Control Protocol (LACP) attributes of interfaces on Juniper JUNOS devices.
author: Ganesh Nalawade (@ganeshrn)
options:
config:
description: The list of dictionaries of LACP interfaces options.
type: list
elements: dict
suboptions:
name:
description:
- Name Identifier of the interface or link aggregation group.
type: str
period:
description:
- Timer interval for periodic transmission of LACP packets. If the value is
set to C(fast) the packets are received every second and if the value is
C(slow) the packets are received every 30 seconds. This value is applicable
for aggregate interface only.
type: str
choices: ['fast', 'slow']
sync_reset:
description:
- The argument notifies minimum-link failure out of sync to peer. If the value
is C(disable) it disables minimum-link failure handling at LACP level and if
value is C(enable) it enables minimum-link failure handling at LACP level.
This value is applicable for aggregate interface only.
type: str
choices: ['disable', 'enable']
force_up:
description:
- This is a boolean argument to control if the port should be up in absence
of received link Aggregation Control Protocol Data Unit (LACPDUS).
This value is applicable for member interfaces only.
type: bool
port_priority:
description:
- Priority of the member port. This value is applicable for member interfaces only.
- Refer to vendor documentation for valid values.
type: int
system:
description:
- This dict object contains configurable options related to LACP
system parameters for the link aggregation group.
This value is applicable for aggregate interface only.
type: dict
suboptions:
priority:
description:
- Specifies the system priority to use in LACP negotiations for
the bundle.
- Refer to vendor documentation for valid values.
type: int
mac:
description:
- Specifies the system ID to use in LACP negotiations for
the bundle, encoded as a MAC address.
type: dict
suboptions:
address:
description:
- The system ID to use in LACP negotiations.
type: str
state:
description:
- The state of the configuration after module completion.
type: str
choices:
- merged
- replaced
- overridden
- deleted
default: merged
s�
# Using merged
# Before state:
# -------------
# user@junos01# show interfaces
# ge-0/0/2 {
# ether-options {
# 802.3ad ae4;
# }
# }
# ge-0/0/3 {
# ether-options {
# 802.3ad ae0;
# }
# }
# ae0 {
# description "lag interface merged";
# aggregated-ether-options {
# lacp {
# passive;
# }
# }
# }
# ae4 {
# description "test aggregate interface";
# aggregated-ether-options {
# lacp {
# passive;
# link-protection;
# }
# }
# }
- name: Merge provided configuration with device configuration
junos_lacp_interfaces:
config:
- name: ae0
period: fast
sync_reset: enable
system:
priority: 100
mac:
address: 00:00:00:00:00:02
- name: ge-0/0/3
port_priority: 100
force_up: True
state: merged
# After state:
# -------------
# user@junos01# show interfaces
# ge-0/0/2 {
# ether-options {
# 802.3ad ae4;
# }
# }
# ge-0/0/3 {
# ether-options {
# 802.3ad {
# lacp {
# force-up;
# port-priority 100;
# }
# ae0;
# }
# }
# }
# ae0 {
# description "lag interface merged";
# aggregated-ether-options {
# lacp {
# passive;
# periodic fast;
# sync-reset enable;
# system-priority 100;
# system-id 00:00:00:00:00:02;
# }
# }
# }
# ae4 {
# description "test aggregate interface";
# aggregated-ether-options {
# lacp {
# passive;
# link-protection;
# }
# }
# }
# Using replaced
# Before state:
# -------------
# user@junos01# show interfaces
# ge-0/0/2 {
# ether-options {
# 802.3ad ae4;
# }
# }
# ge-0/0/3 {
# ether-options {
# 802.3ad {
# lacp {
# force-up;
# port-priority 100;
# }
# ae0;
# }
# }
# }
# ae0 {
# description "lag interface merged";
# aggregated-ether-options {
# lacp {
# passive;
# periodic fast;
# sync-reset enable;
# system-priority 100;
# system-id 00:00:00:00:00:02;
# }
# }
# }
# ae4 {
# description "test aggregate interface";
# aggregated-ether-options {
# lacp {
# passive;
# link-protection;
# }
# }
# }
- name: Replace device LACP interfaces configuration with provided configuration
junos_lacp_interfaces:
config:
- name: ae0
period: slow
state: replaced
# After state:
# -------------
# user@junos01# show interfaces
# ge-0/0/2 {
# ether-options {
# 802.3ad ae4;
# }
# }
# ge-0/0/3 {
# ether-options {
# 802.3ad {
# lacp {
# force-up;
# port-priority 100;
# }
# ae0;
# }
# }
# }
# ae0 {
# description "lag interface merged";
# aggregated-ether-options {
# lacp {
# passive;
# periodic slow;
# }
# }
# }
# ae4 {
# description "test aggregate interface";
# aggregated-ether-options {
# lacp {
# passive;
# link-protection;
# }
# }
# }
# Using overridden
# Before state:
# -------------
# user@junos01# show interfaces
# ge-0/0/2 {
# ether-options {
# 802.3ad ae4;
# }
# }
# ge-0/0/3 {
# ether-options {
# 802.3ad {
# lacp {
# force-up;
# port-priority 100;
# }
# ae0;
# }
# }
# }
# ae0 {
# description "lag interface merged";
# aggregated-ether-options {
# lacp {
# passive;
# periodic slow;
# }
# }
# }
# ae4 {
# description "test aggregate interface";
# aggregated-ether-options {
# lacp {
# passive;
# link-protection;
# }
# }
# }
- name: Overrides all device LACP interfaces configuration with provided configuration
junos_lacp_interfaces:
config:
- name: ae0
system:
priority: 300
mac:
address: 00:00:00:00:00:03
- name: ge-0/0/2
port_priority: 200
force_up: False
state: overridden
# After state:
# -------------
# user@junos01# show interfaces
# ge-0/0/2 {
# ether-options {
# 802.3ad {
# lacp {
# port-priority 200;
# }
# ae4;
# }
# }
# }
# ge-0/0/3 {
# ether-options {
# 802.3ad {
# lacp {
# force-up;
# port-priority 100;
# }
# ae0;
# }
# }
# }
# ae0 {
# description "lag interface merged";
# aggregated-ether-options {
# lacp {
# passive;
# system-priority 300;
# system-id 00:00:00:00:00:03;
# }
# }
# }
# ae4 {
# description "test aggregate interface";
# aggregated-ether-options {
# lacp {
# passive;
# link-protection;
# }
# }
# }
# Using deleted
# Before state:
# -------------
# user@junos01# show interfaces
# ge-0/0/2 {
# ether-options {
# 802.3ad {
# lacp {
# port-priority 200;
# }
# ae4;
# }
# }
# }
# ge-0/0/3 {
# ether-options {
# 802.3ad {
# lacp {
# force-up;
# port-priority 100;
# }
# ae0;
# }
# }
# }
# ae0 {
# description "lag interface merged";
# aggregated-ether-options {
# lacp {
# passive;
# system-priority 300;
# system-id 00:00:00:00:00:03;
# }
# }
# }
# ae4 {
# description "test aggregate interface";
# aggregated-ether-options {
# lacp {
# passive;
# link-protection;
# }
# }
# }
- name: "Delete LACP interfaces attributes of given interfaces (Note: This won't delete the interface itself)"
junos_lacp_interfaces:
config:
- name: ae0
- name: ge-0/0/3
- name: ge-0/0/2
state: deleted
# After state:
# -------------
# user@junos01# show interfaces
# ge-0/0/2 {
# ether-options {
# 802.3ad ae4;
# }
# }
# ge-0/0/3 {
# ether-options {
# 802.3ad ae0;
# }
# }
# ae0 {
# description "lag interface merged";
# aggregated-ether-options {
# lacp {
# passive;
# }
# }
# }
# ae4 {
# description "test aggregate interface";
# aggregated-ether-options {
# lacp {
# passive;
# link-protection;
# }
# }
# }
se
before:
description: The configuration as structured data prior to module invocation.
returned: always
type: list
sample: >
The configuration returned will always be in the same format
of the parameters above.
after:
description: The configuration as structured data after module completion.
returned: when changed
type: list
sample: >
The configuration returned will always be in the same format
of the parameters above.
commands:
description: The set of commands pushed to the remote device.
returned: always
type: list
sample: ['command 1', 'command 2', 'command 3']
( t
AnsibleModule( t Lacp_interfacesArgs( t Lacp_interfacesc C` sk d d d
f d d d f d d d f g } t d t j d | d t � } t | � j � } | j | � d S(
s_
Main entry point for module execution
:returns: the result form module invocation
t statet mergedt configt replacedt
overriddent
argument_spect required_ift supports_check_modeN( s config( s config( s config( R R R t TrueR
t execute_modulet exit_json( R t modulet result( ( sW /usr/lib/python2.7/site-packages/ansible/modules/network/junos/junos_lacp_interfaces.pyt main� s t __main__N( t __doc__t
__future__R R R t typet
__metaclass__t ANSIBLE_METADATAt
DOCUMENTATIONt EXAMPLESt RETURNt ansible.module_utils.basicR tJ ansible.module_utils.network.junos.argspec.lacp_interfaces.lacp_interfacesR tI ansible.module_utils.network.junos.config.lacp_interfaces.lacp_interfacesR
R t __name__( ( ( sW /usr/lib/python2.7/site-packages/ansible/modules/network/junos/junos_lacp_interfaces.pyt <module> s
Q� e
Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]