�
�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 iosxr_lacp
i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust networkt supported_bys}
---
module: iosxr_lacp
version_added: 2.9
short_description: Manage Global Link Aggregation Control Protocol (LACP) on IOS-XR devices.
description:
- This module manages Global Link Aggregation Control Protocol (LACP) on IOS-XR devices.
notes:
- Tested against IOS-XR 6.1.3.
- This module works with connection C(network_cli). See L(the IOS-XR Platform Options,../network/user_guide/platform_iosxr.html).
author: Nilashish Chakraborty (@nilashishc)
options:
config:
description: The provided configurations.
type: dict
suboptions:
system:
description: This option sets the default system parameters for LACP bundles.
type: dict
suboptions:
priority:
description:
- The system priority to use in LACP negotiations.
- Lower value is higher priority.
- Refer to vendor documentation for valid values.
type: int
mac:
type: dict
description:
- The system MAC related configuration for LACP.
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
- deleted
default: merged
s�
# Using merged
#
#
# ------------
# Before state
# ------------
#
#
# RP/0/0/CPU0:iosxr01#show running-config lacp
# Tue Jul 16 17:46:08.147 UTC
# % No such configuration item(s)
#
#
- name: Merge provided configuration with device configuration
iosxr_lacp:
config:
system:
priority: 10
mac:
address: 00c1.4c00.bd15
state: merged
#
#
# -----------------------
# Module Execution Result
# -----------------------
#
# "before": {}
#
#
# "commands": [
# "lacp system priority 10",
# "lacp system mac 00c1.4c00.bd15"
# ]
#
#
# "after": {
# "system": {
# "mac": {
# "address": "00c1.4c00.bd15"
# },
# "priority": 10
# }
# }
#
# -----------
# After state
# -----------
#
#
# RP/0/0/CPU0:iosxr01#sh run lacp
# Tue Jul 16 17:51:29.365 UTC
# lacp system mac 00c1.4c00.bd15
# lacp system priority 10
#
#
# Using replaced
#
#
# -------------
# Before state
# -------------
#
#
# RP/0/0/CPU0:iosxr01#sh run lacp
# Tue Jul 16 17:53:59.904 UTC
# lacp system mac 00c1.4c00.bd15
# lacp system priority 10
#
- name: Replace device global lacp configuration with the given configuration
iosxr_lacp:
config:
system:
priority: 11
state: replaced
#
#
# -----------------------
# Module Execution Result
# -----------------------
# "before": {
# "system": {
# "mac": {
# "address": "00c1.4c00.bd15"
# },
# "priority": 10
# }
# }
#
#
# "commands": [
# "no lacp system mac",
# "lacp system priority 11"
# ]
#
#
# "after": {
# "system": {
# "priority": 11
# }
# }
#
# -----------
# After state
# -----------
#
#
# RP/0/0/CPU0:iosxr01#sh run lacp
# Tue Jul 16 18:02:40.379 UTC
# lacp system priority 11
#
#
# Using deleted
#
#
# ------------
# Before state
# ------------
#
#
# RP/0/0/CPU0:iosxr01#sh run lacp
# Tue Jul 16 18:37:09.727 UTC
# lacp system mac 00c1.4c00.bd15
# lacp system priority 11
#
#
- name: Delete global LACP configurations from the device
iosxr_lacp:
state: deleted
#
#
# -----------------------
# Module Execution Result
# -----------------------
# "before": {
# "system": {
# "mac": {
# "address": "00c1.4c00.bd15"
# },
# "priority": 11
# }
# }
#
#
# "commands": [
# "no lacp system mac",
# "no lacp system priority"
# ]
#
#
# "after": {}
#
# ------------
# After state
# ------------
#
#
# RP/0/0/CPU0:iosxr01#sh run lacp
# Tue Jul 16 18:39:44.116 UTC
# % No such configuration item(s)
#
#
s{
before:
description: The configuration as structured data prior to module invocation.
returned: always
type: dict
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: dict
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: ['lacp system priority 10', 'lacp system mac 00c1.4c00.bd15']
( t
AnsibleModule( t LacpArgs( t Lacpc C` s_ 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
argument_spect required_ift supports_check_modeN( s config( s config( R R R t TrueR
t execute_modulet exit_json( R t modulet result( ( sL /usr/lib/python2.7/site-packages/ansible/modules/network/iosxr/iosxr_lacp.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 t4 ansible.module_utils.network.iosxr.argspec.lacp.lacpR t3 ansible.module_utils.network.iosxr.config.lacp.lacpR
R t __name__( ( ( sL /usr/lib/python2.7/site-packages/ansible/modules/network/iosxr/iosxr_lacp.pyt <module> s
/�
Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]