mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
parent
27059a859e
commit
fdcb883ac0
1 changed files with 81 additions and 18 deletions
|
@ -28,6 +28,10 @@ options:
|
||||||
description:
|
description:
|
||||||
- The interfaces that are part of the trunk.
|
- The interfaces that are part of the trunk.
|
||||||
- To clear the list of interfaces, specify an empty list.
|
- To clear the list of interfaces, specify an empty list.
|
||||||
|
description:
|
||||||
|
description:
|
||||||
|
- Description of the trunk.
|
||||||
|
version_added: 2.7
|
||||||
link_selection_policy:
|
link_selection_policy:
|
||||||
description:
|
description:
|
||||||
- Specifies, once the trunk is configured, the policy that the trunk uses to determine
|
- Specifies, once the trunk is configured, the policy that the trunk uses to determine
|
||||||
|
@ -92,6 +96,16 @@ options:
|
||||||
choices:
|
choices:
|
||||||
- long
|
- long
|
||||||
- short
|
- short
|
||||||
|
qinq_ethertype:
|
||||||
|
description:
|
||||||
|
- Specifies the ether-type value used for the packets handled on this trunk when
|
||||||
|
it is a member in a QinQ vlan.
|
||||||
|
- The ether-type can be set to any string containing a valid hexadecimal 16 bits
|
||||||
|
number, or any of the well known ether-types; C(0x8100), C(0x9100), C(0x88a8).
|
||||||
|
- This parameter is not supported on Virtual Editions.
|
||||||
|
- You should always wrap this value in quotes to prevent Ansible from interpreting
|
||||||
|
the value as a literal hexadecimal number and converting it to an integer.
|
||||||
|
version_added: 2.7
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- When C(present), ensures that the resource exists.
|
- When C(present), ensures that the resource exists.
|
||||||
|
@ -106,27 +120,67 @@ author:
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = r'''
|
EXAMPLES = r'''
|
||||||
- name: Create a ...
|
- name: Create a trunk on hardware
|
||||||
bigip_trunk:
|
bigip_trunk:
|
||||||
name: foo
|
name: trunk1
|
||||||
|
interfaces:
|
||||||
|
- 1.1
|
||||||
|
- 1.2
|
||||||
|
link_selection_policy: maximum-bandwidth
|
||||||
|
frame_distribution_hash: destination-mac
|
||||||
|
lacp_enabled: yes
|
||||||
|
lacp_mode: passive
|
||||||
|
lacp_timeout: short
|
||||||
|
provider:
|
||||||
password: secret
|
password: secret
|
||||||
server: lb.mydomain.com
|
server: lb.mydomain.com
|
||||||
state: present
|
|
||||||
user: admin
|
user: admin
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = r'''
|
RETURN = r'''
|
||||||
param1:
|
lacp_mode:
|
||||||
description: The new param1 value of the resource.
|
description: Operation mode for LACP if the lacp option is enabled for the trunk.
|
||||||
returned: changed
|
|
||||||
type: bool
|
|
||||||
sample: true
|
|
||||||
param2:
|
|
||||||
description: The new param2 value of the resource.
|
|
||||||
returned: changed
|
returned: changed
|
||||||
type: string
|
type: string
|
||||||
sample: Foo is bar
|
sample: active
|
||||||
|
lacp_timeout:
|
||||||
|
description: Rate at which the system sends the LACP control packets.
|
||||||
|
returned: changed
|
||||||
|
type: string
|
||||||
|
sample: long
|
||||||
|
link_selection_policy:
|
||||||
|
description:
|
||||||
|
- LACP policy that the trunk uses to determine which member link (interface)
|
||||||
|
can handle new traffic.
|
||||||
|
returned: changed
|
||||||
|
type: string
|
||||||
|
sample: auto
|
||||||
|
frame_distribution_hash:
|
||||||
|
description: Hash that the system uses as the frame distribution algorithm.
|
||||||
|
returned: changed
|
||||||
|
type: string
|
||||||
|
sample: src-dst-ipport
|
||||||
|
lacp_enabled:
|
||||||
|
description: Whether the system supports the link aggregation control protocol (LACP) or not.
|
||||||
|
returned: changed
|
||||||
|
type: bool
|
||||||
|
sample: yes
|
||||||
|
interfaces:
|
||||||
|
description: Interfaces that are part of the trunk.
|
||||||
|
returned: changed
|
||||||
|
type: list
|
||||||
|
sample: ['int1', 'int2']
|
||||||
|
description:
|
||||||
|
description: Description of the trunk.
|
||||||
|
returned: changed
|
||||||
|
type: string
|
||||||
|
sample: My trunk
|
||||||
|
qinq_ethertype:
|
||||||
|
description: Ether-type value used for the packets handled on this trunk when it is a member in a QinQ vlan.
|
||||||
|
returned: changed
|
||||||
|
type: string
|
||||||
|
sample: 0x9100
|
||||||
'''
|
'''
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
@ -164,7 +218,8 @@ class Parameters(AnsibleF5Parameters):
|
||||||
'lacpTimeout': 'lacp_timeout',
|
'lacpTimeout': 'lacp_timeout',
|
||||||
'linkSelectPolicy': 'link_selection_policy',
|
'linkSelectPolicy': 'link_selection_policy',
|
||||||
'distributionHash': 'frame_distribution_hash',
|
'distributionHash': 'frame_distribution_hash',
|
||||||
'lacp': 'lacp_enabled'
|
'lacp': 'lacp_enabled',
|
||||||
|
'qinqEthertype': 'qinq_ethertype'
|
||||||
}
|
}
|
||||||
|
|
||||||
api_attributes = [
|
api_attributes = [
|
||||||
|
@ -174,6 +229,8 @@ class Parameters(AnsibleF5Parameters):
|
||||||
'linkSelectPolicy',
|
'linkSelectPolicy',
|
||||||
'distributionHash',
|
'distributionHash',
|
||||||
'interfaces',
|
'interfaces',
|
||||||
|
'description',
|
||||||
|
'qinqEthertype'
|
||||||
]
|
]
|
||||||
|
|
||||||
returnables = [
|
returnables = [
|
||||||
|
@ -182,7 +239,9 @@ class Parameters(AnsibleF5Parameters):
|
||||||
'link_selection_policy',
|
'link_selection_policy',
|
||||||
'frame_distribution_hash',
|
'frame_distribution_hash',
|
||||||
'lacp_enabled',
|
'lacp_enabled',
|
||||||
'interfaces'
|
'interfaces',
|
||||||
|
'description',
|
||||||
|
'qinq_ethertype'
|
||||||
]
|
]
|
||||||
|
|
||||||
updatables = [
|
updatables = [
|
||||||
|
@ -191,7 +250,9 @@ class Parameters(AnsibleF5Parameters):
|
||||||
'link_selection_policy',
|
'link_selection_policy',
|
||||||
'frame_distribution_hash',
|
'frame_distribution_hash',
|
||||||
'lacp_enabled',
|
'lacp_enabled',
|
||||||
'interfaces'
|
'interfaces',
|
||||||
|
'description',
|
||||||
|
'qinq_ethertype'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -478,10 +539,12 @@ class ArgumentSpec(object):
|
||||||
lacp_enabled=dict(type='bool'),
|
lacp_enabled=dict(type='bool'),
|
||||||
lacp_mode=dict(choices=['active', 'passive']),
|
lacp_mode=dict(choices=['active', 'passive']),
|
||||||
lacp_timeout=dict(choices=['short', 'long']),
|
lacp_timeout=dict(choices=['short', 'long']),
|
||||||
|
description=dict(),
|
||||||
state=dict(
|
state=dict(
|
||||||
default='present',
|
default='present',
|
||||||
choices=['absent', 'present']
|
choices=['absent', 'present']
|
||||||
)
|
),
|
||||||
|
qinq_ethertype=dict(type='raw'),
|
||||||
)
|
)
|
||||||
self.argument_spec = {}
|
self.argument_spec = {}
|
||||||
self.argument_spec.update(f5_argument_spec)
|
self.argument_spec.update(f5_argument_spec)
|
||||||
|
|
Loading…
Reference in a new issue