moved modules to net_infrastructure

reviewable/pr18780/r1
Peter Sprygada 12 years ago
parent 6439d0ff38
commit 51279a16a6

@ -31,53 +31,58 @@ options:
description: description:
- the full name of the interface - the full name of the interface
required: true required: true
default: null
aliases: []
logging: logging:
description: description:
- enables or disables the syslog facility for this module - enables or disables the syslog facility for this module
required: false required: false
default: false default: false
choices: [ 'true', 'false', 'yes', 'no' ] choices: [ 'true', 'false', 'yes', 'no' ]
aliases: []
admin: admin:
description: description:
- controls the operational state of the interface - controls the operational state of the interface
required: false required: false
default: null
choices: [ 'up', 'down' ] choices: [ 'up', 'down' ]
aliases: []
description: description:
description: description:
- a single line text string describing the interface - a single line text string describing the interface
required: false required: false
default: null
aliases: []
mtu: mtu:
description: description:
- configureds the maximum transmission unit for the interface - configureds the maximum transmission unit for the interface
required: false required: false
default: 1500 default: 1500
aliases: []
speed: speed:
description: description:
- sets the interface speed setting - sets the interface speed setting
required: false required: false
default: 'auto' default: 'auto'
choices: [ 'auto', '100m', '1g', '10g' ] choices: [ 'auto', '100m', '1g', '10g' ]
aliases: []
duplex: duplex:
description: description:
- sets the interface duplex setting - sets the interface duplex setting
required: false required: false
default: 'auto' default: 'auto'
choices: [ 'auto', 'half', 'full' ] choices: [ 'auto', 'half', 'full' ]
aliases: [] notes:
examples: - Requires EOS 4.10 or later
- code: 'arista_interface: interface_id=Ethernet1 admin="up"' - The Netdev extension for EOS must be installed and active in the
description: "Administratively enable the Ethernet1 interface" available extensions (show extensions from the EOS CLI)
- code: 'arista_interface: itnerface_id=Ethernet4 state="default"' - See http://eos.aristanetworks.com for details
descripton: "Default interface Ethernet4" '''
EXAMPLES = '''
Example playbook entries using the arista_interface module to manage resource
state. Note that interface names must be the full interface name not shortcut
names (ie Ethernet, not Et1)
tasks:
- name: enable interface Ethernet 1
action: arista_interface interface_id=Ethernet1 admin=up speed=10g duplex=full logging=true
- name: set mtu on Ethernet 1
action: arista_interface interface_id=Ethernet1 mtu=1600 speed=10g duplex=full logging=true
- name: reset changes to Ethernet 1
action: arista_interface interface_id=Ethernet1 admin=down mtu=1500 speed=10g duplex=full logging=true
''' '''
import syslog import syslog
import json import json
@ -220,7 +225,7 @@ def main():
mtu=dict(default=None, type='int'), mtu=dict(default=None, type='int'),
speed=dict(default=None, choices=['auto', '100m', '1g', '10g']), speed=dict(default=None, choices=['auto', '100m', '1g', '10g']),
duplex=dict(default=None, choices=['auto', 'half', 'full']), duplex=dict(default=None, choices=['auto', 'half', 'full']),
logging=dict(default=False, choices=BOOLEANS) logging=dict(default=False, type='bool')
), ),
supports_check_mode = True supports_check_mode = True
) )

@ -31,22 +31,18 @@ options:
description: description:
- the full name of the interface - the full name of the interface
required: true required: true
default: null
aliases: []
state: state:
description: description:
- describe the desired state of the interface related to the config - describe the desired state of the interface related to the config
required: false required: false
default: 'present' default: 'present'
choices: [ 'present', 'absent' ] choices: [ 'present', 'absent' ]
aliases: []
logging: logging:
description: description:
- enables or disables the syslog facility for this module - enables or disables the syslog facility for this module
required: false required: false
default: false default: false
choices: [ 'true', 'false', 'yes', 'no' ] choices: [ 'true', 'false', 'yes', 'no' ]
aliases: []
vlan_tagging: vlan_tagging:
description: description:
- specifies whether or not vlan tagging should be enabled for - specifies whether or not vlan tagging should be enabled for
@ -54,26 +50,49 @@ options:
required: false required: false
default: true default: true
choices: [ 'enable', 'disable' ] choices: [ 'enable', 'disable' ]
aliases: []
tagged_vlans: tagged_vlans:
description: description:
- specifies the list of vlans that should be allowed to transit - specifies the list of vlans that should be allowed to transit
this interface this interface
required: false required: false
default: null
aliases: []
untagged_vlan: untagged_vlan:
description: description:
- specifies the vlan that untagged traffic should be placed in for - specifies the vlan that untagged traffic should be placed in for
transit across a vlan tagged link transit across a vlan tagged link
required: false required: false
default: 'default' default: 'default'
aliases: [] notes:
examples: - Requires EOS 4.10 or later
- code: 'arista_l2interface: interface_id=Ethernet1 vlan_tagging="enable"' - The Netdev extension for EOS must be installed and active in the
description: "Enable vlan tagging for interface Ethernet1" available extensions (show extensions from the EOS CLI)
- code: 'arista_l2interface: interface_id=Ethernet4 tagged_vlans=Blue,Red' - See http://eos.aristanetworks.com for details
descripton: "Specifies vlans Blue & Red should be allowed across this interface" '''
EXAMPLES = '''
Example playbook entries using the arista_l2interface module to manage resource
state. Note that interface names must be the full interface name not shortcut
names (ie Ethernet, not Et1)
tasks:
- name: create switchport ethernet1 access port
action: arista_l2interface interface_id=Ethernet1 logging=true
- name: create switchport ethernet2 trunk port
action: arista_l2interface interface_id=Ethernet2 vlan_tagging=enable logging=true
- name: add vlans to red and blue switchport ethernet2
action: arista_l2interface interface_id=Ethernet2 tagged_vlans=red,blue logging=true
- name: set untagged vlan for Ethernet1
action: arista_l2interface interface_id=Ethernet1 untagged_vlan=red logging=true
- name: convert access to trunk
action: arista_l2interface interface_id=Ethernet1 vlan_tagging=enable tagged_vlans=red,blue logging=true
- name: convert trunk to access
action: arista_l2interface interface_id=Ethernet2 vlan_tagging=disable untagged_vlan=blue logging=true
- name: delete switchport ethernet1
action: arista_l2interface interface_id=Ethernet1 state=absent logging=true
''' '''
import syslog import syslog
import json import json
@ -270,7 +289,7 @@ def main():
vlan_tagging=dict(default=None, choices=['enable', 'disable']), vlan_tagging=dict(default=None, choices=['enable', 'disable']),
tagged_vlans=dict(default=None, type='str'), tagged_vlans=dict(default=None, type='str'),
untagged_vlan=dict(default=None, type='str'), untagged_vlan=dict(default=None, type='str'),
logging=dict(default=False, choices=BOOLEANS) logging=dict(default=False, type='bool')
), ),
supports_check_mode = True supports_check_mode = True
) )

@ -25,50 +25,63 @@ requirements:
- Arista EOS 4.10 - Arista EOS 4.10
- Netdev extension for EOS - Netdev extension for EOS
description: description:
- Manage port channel (lag) interfaceresources on Arista EOS network devices - Manage port channel interface resources on Arista EOS network
devices
options: options:
interface_id: interface_id:
description: description:
- the full name of the interface - the full name of the interface
required: true required: true
default: null
aliases: []
state: state:
description: description:
- describe the desired state of the interface related to the config - describe the desired state of the interface related to the config
required: false required: false
default: 'present' default: 'present'
choices: [ 'present', 'absent' ] choices: [ 'present', 'absent' ]
aliases: []
logging: logging:
description: description:
- enables or disables the syslog facility for this module - enables or disables the syslog facility for this module
required: false required: false
default: false default: false
choices: [ 'true', 'false', 'yes', 'no' ] choices: [ 'true', 'false', 'yes', 'no' ]
aliases: []
links: links:
description: description:
- array of physical interface links to include in this lag - array of physical interface links to include in this lag
required: false required: false
default: null
aliases: []
minimum_links: minimum_links:
description: description:
- the minimum number of physical interaces that must be operationally up to consider the lag operationally up - the minimum number of physical interaces that must be operationally up to consider the lag operationally up
required: false required: false
default: null
aliases: []
lacp: lacp:
description: description:
- enables the use of the LACP protocol for managing link bundles - enables the use of the LACP protocol for managing link bundles
required: false required: false
default: 'active', default: 'active',
choices: [ 'active', 'passive', 'off' ] choices: [ 'active', 'passive', 'off' ]
aliases: [] notes:
examples: - Requires EOS 4.10 or later
- code: 'arista_lag: interface_id=Port-Channel10 links=Ethernet1,Ethernet2' - The Netdev extension for EOS must be installed and active in the
description: "Configure Port-Channel 10 with physical interfaces Ethernet1 and Ethernet2 as members" available extensions (show extensions from the EOS CLI)
- See http://eos.aristanetworks.com for details
'''
EXAMPLES = '''
Example playbook entries using the arista_lag module to manage resource
state. Note that interface names must be the full interface name not shortcut
names (ie Ethernet, not Et1)
tasks:
- name: create lag interface
action: arista_lag interface_id=Port-Channel1 links=Ethernet1,Ethernet2 logging=true
- name: add member links
action: arista_lag interface_id=Port-Channel1 links=Ethernet1,Ethernet2,Ethernet3 logging=true
- name: remove member links
action: arista_lag interface_id=Port-Channel1 links=Ethernet2,Ethernet3 logging=true
- name: remove lag interface
action: arista_lag interface_id=Port-Channel1 state=absent logging=true
''' '''
import syslog import syslog
import json import json
@ -265,7 +278,7 @@ def main():
links=dict(default=None, type='str'), links=dict(default=None, type='str'),
lacp=dict(default=None, choices=['active', 'passive', 'off'], type='str'), lacp=dict(default=None, choices=['active', 'passive', 'off'], type='str'),
minimum_links=dict(default=None, type='int'), minimum_links=dict(default=None, type='int'),
logging=dict(default=False, choices=BOOLEANS) logging=dict(default=False, type='bool')
), ),
supports_check_mode = True supports_check_mode = True
) )

@ -25,43 +25,51 @@ requirements:
- Arista EOS 4.10 - Arista EOS 4.10
- Netdev extension for EOS - Netdev extension for EOS
description: description:
- Manage VLAN resources on Arista EOS network devices - Manage VLAN resources on Arista EOS network devices. This module
requires the Netdev EOS extension to be installed in EOS. For detailed
instructions for installing and using the Netdev module please see
[link]
options: options:
vlan_id: vlan_id:
description: description:
- the vlan id - the vlan id
required: true required: true
default: null
aliases: []
state: state:
description: description:
- describe the desired state of the vlan related to the config - describe the desired state of the vlan related to the config
required: false required: false
default: 'present' default: 'present'
choices: [ 'present', 'absent' ] choices: [ 'present', 'absent' ]
aliases: []
logging: logging:
description: description:
- enables or disables the syslog facility for this module - enables or disables the syslog facility for this module
required: false required: false
default: false
choices: [ 'true', 'false', 'yes', 'no' ] choices: [ 'true', 'false', 'yes', 'no' ]
aliases: []
name: name:
description: description:
- a descriptive name for the vlan - a descriptive name for the vlan
required: false required: false
default: null
aliases: []
examples:
- code: 'arista_vlan: vlan_id=100 name="Blue"'
description: "Creates vlan 100 in the running config"
- code: 'arista_vlan: vlan_id=200 state="absent"'
descripton: "Ensures vlan 200 is not in the config"
notes: notes:
- Requires EOS 4.10 or later - Requires EOS 4.10 or later
- The Netdev extension for EOS must be installed and active in the - The Netdev extension for EOS must be installed and active in the
available extensions (show extensions from the EOS CLI) available extensions (show extensions from the EOS CLI)
- See http://eos.aristanetworks.com for details
'''
EXAMPLES = '''
Example playbook entries using the arista_vlan module to manage resource
state.
tasks:
- name: create vlan 999
action: arista_vlan vlan_id=999 logging=true
- name: create / edit vlan 999
action: arista_vlan vlan_id=999 name=test logging=true
- name: remove vlan 999
action: arista_vlan vlan_id=999 state=absent logging=true
''' '''
import syslog import syslog
import json import json
@ -251,7 +259,7 @@ def main():
vlan_id=dict(default=None, required=True, type='int'), vlan_id=dict(default=None, required=True, type='int'),
name=dict(default=None, type='str'), name=dict(default=None, type='str'),
state=dict(default='present', choices=['present', 'absent']), state=dict(default='present', choices=['present', 'absent']),
logging=dict(default=False, choices=BOOLEANS) logging=dict(default=False, type='bool')
), ),
supports_check_mode = True supports_check_mode = True
) )
Loading…
Cancel
Save