mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 05:40:23 -07:00
Mellanox OS name change: MLNXOS changed to ONYX (#34753)
* Mellanox OS name change: MLNXOS changed to ONYX Signed-off-by: Samer Deeb <samerd@mellanox.com> * Fix alphabetical order of modules metadata Signed-off-by: Samer Deeb <samerd@mellanox.com>
This commit is contained in:
parent
57ff84251e
commit
f8884f12bc
73 changed files with 381 additions and 383 deletions
|
@ -12,15 +12,15 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
|
||||
DOCUMENTATION = """
|
||||
---
|
||||
module: mlnxos_bgp
|
||||
module: onyx_bgp
|
||||
version_added: "2.5"
|
||||
author: "Samer Deeb (@samerd)"
|
||||
short_description: Configures BGP on Mellanox MLNX-OS network devices
|
||||
short_description: Configures BGP on Mellanox ONYX network devices
|
||||
description:
|
||||
- This module provides declarative management of BGP router and neighbors
|
||||
on Mellanox MLNX-OS network devices.
|
||||
on Mellanox ONYX network devices.
|
||||
notes:
|
||||
- Tested on MLNX-OS 3.6.4000
|
||||
- Tested on ONYX 3.6.4000
|
||||
options:
|
||||
as_number:
|
||||
description:
|
||||
|
@ -53,7 +53,7 @@ options:
|
|||
|
||||
EXAMPLES = """
|
||||
- name: configure bgp
|
||||
mlnxos_bgp:
|
||||
onyx_bgp:
|
||||
as_number: 320
|
||||
router_id: 10.3.3.3
|
||||
neighbors:
|
||||
|
@ -81,11 +81,11 @@ import re
|
|||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import get_bgp_summary
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import BaseMlnxosModule
|
||||
from ansible.module_utils.network.onyx.onyx import get_bgp_summary
|
||||
from ansible.module_utils.network.onyx.onyx import BaseOnyxModule
|
||||
|
||||
|
||||
class MlnxosBgpModule(BaseMlnxosModule):
|
||||
class OnyxBgpModule(BaseOnyxModule):
|
||||
LOCAL_AS_REGEX = re.compile(r'^\s+router bgp\s+(\d+).*')
|
||||
ROUTER_ID_REGEX = re.compile(
|
||||
r'^\s+router bgp\s+(\d+).*router-id\s+(\S+)\s+.*')
|
||||
|
@ -249,7 +249,7 @@ class MlnxosBgpModule(BaseMlnxosModule):
|
|||
def main():
|
||||
""" main entry point for module execution
|
||||
"""
|
||||
MlnxosBgpModule.main()
|
||||
OnyxBgpModule.main()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
|
@ -12,25 +12,25 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
|
||||
DOCUMENTATION = """
|
||||
---
|
||||
module: mlnxos_command
|
||||
extends_documentation_fragment: mlnxos
|
||||
module: onyx_command
|
||||
extends_documentation_fragment: onyx
|
||||
version_added: "2.5"
|
||||
author: "Samer Deeb (@samerd)"
|
||||
short_description: Run commands on remote devices running Mellanox MLNX-OS
|
||||
short_description: Run commands on remote devices running Mellanox ONYX
|
||||
description:
|
||||
- Sends arbitrary commands to an Mellanox MLNX-OS network device and returns
|
||||
- Sends arbitrary commands to an Mellanox ONYX network device and returns
|
||||
the results read from the device. This module includes an
|
||||
argument that will cause the module to wait for a specific condition
|
||||
before returning or timing out if the condition is not met.
|
||||
- This module does not support running commands in configuration mode.
|
||||
Please use M(mlnxos_config) to configure Mellanox MLNX-OS devices.
|
||||
Please use M(onyx_config) to configure Mellanox ONYX devices.
|
||||
notes:
|
||||
- Tested on MLNX-OS 3.6.4000
|
||||
- Tested on ONYX 3.6.4000
|
||||
options:
|
||||
commands:
|
||||
description:
|
||||
- List of commands to send to the remote mlnxos device over the
|
||||
configured provider. The resulting output from the command
|
||||
- List of commands to send to the remote Mellanox ONYX network device.
|
||||
The resulting output from the command
|
||||
is returned. If the I(wait_for) argument is provided, the
|
||||
module is not returned until the condition is satisfied or
|
||||
the number of retries has expired.
|
||||
|
@ -71,22 +71,22 @@ options:
|
|||
EXAMPLES = """
|
||||
tasks:
|
||||
- name: run show version on remote devices
|
||||
mlnxos_command:
|
||||
onyx_command:
|
||||
commands: show version
|
||||
|
||||
- name: run show version and check to see if output contains MLNXOS
|
||||
mlnxos_command:
|
||||
onyx_command:
|
||||
commands: show version
|
||||
wait_for: result[0] contains MLNXOS
|
||||
|
||||
- name: run multiple commands on remote nodes
|
||||
mlnxos_command:
|
||||
onyx_command:
|
||||
commands:
|
||||
- show version
|
||||
- show interfaces
|
||||
|
||||
- name: run multiple commands and evaluate the output
|
||||
mlnxos_command:
|
||||
onyx_command:
|
||||
commands:
|
||||
- show version
|
||||
- show interfaces
|
||||
|
@ -120,7 +120,7 @@ from ansible.module_utils.network.common.parsing import Conditional
|
|||
from ansible.module_utils.network.common.utils import ComplexList
|
||||
from ansible.module_utils.six import string_types
|
||||
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import run_commands
|
||||
from ansible.module_utils.network.onyx.onyx import run_commands
|
||||
|
||||
|
||||
def to_lines(stdout):
|
||||
|
@ -146,8 +146,8 @@ def parse_commands(module, warnings):
|
|||
commands.remove(item)
|
||||
elif item['command'].startswith('conf'):
|
||||
module.fail_json(
|
||||
msg='mlnxos_command does not support running config mode '
|
||||
'commands. Please use mlnxos_config instead'
|
||||
msg='onyx_command does not support running config mode '
|
||||
'commands. Please use onyx_config instead'
|
||||
)
|
||||
return commands
|
||||
|
|
@ -12,15 +12,15 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
|
||||
DOCUMENTATION = """
|
||||
---
|
||||
module: mlnxos_config
|
||||
extends_documentation_fragment: mlnxos
|
||||
module: onyx_config
|
||||
extends_documentation_fragment: onyx
|
||||
version_added: "2.5"
|
||||
author: "Alex Tabachnik (@atabachnik), Samer Deeb (@samerd)"
|
||||
short_description: Manage Mellanox MLNX-OS configuration sections
|
||||
short_description: Manage Mellanox ONYX configuration sections
|
||||
description:
|
||||
- Mellanox MLNX-OS configurations uses a simple block indent file syntax
|
||||
- Mellanox ONYX configurations uses a simple block indent file syntax
|
||||
for segmenting configuration into sections. This module provides
|
||||
an implementation for working with MLNX-OS configuration sections in
|
||||
an implementation for working with ONYX configuration sections in
|
||||
a deterministic way.
|
||||
options:
|
||||
lines:
|
||||
|
@ -105,7 +105,7 @@ options:
|
|||
|
||||
EXAMPLES = """
|
||||
---
|
||||
- mlnxos_config:
|
||||
- onyx_config:
|
||||
lines:
|
||||
- snmp-server community
|
||||
- snmp-server host 10.2.2.2 traps version 2c
|
||||
|
@ -121,15 +121,15 @@ backup_path:
|
|||
description: The full path to the backup file
|
||||
returned: when backup is yes
|
||||
type: string
|
||||
sample: /playbooks/ansible/backup/mlnxos_config.2016-07-16@22:28:34
|
||||
sample: /playbooks/ansible/backup/onyx_config.2016-07-16@22:28:34
|
||||
"""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.network.common.config import NetworkConfig, dumps
|
||||
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import get_config
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import load_config
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import run_commands
|
||||
from ansible.module_utils.network.onyx.onyx import get_config
|
||||
from ansible.module_utils.network.onyx.onyx import load_config
|
||||
from ansible.module_utils.network.onyx.onyx import run_commands
|
||||
|
||||
|
||||
def get_candidate(module):
|
|
@ -12,18 +12,18 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
|
||||
DOCUMENTATION = """
|
||||
---
|
||||
module: mlnxos_facts
|
||||
module: onyx_facts
|
||||
version_added: "2.5"
|
||||
author: "Waleed Mousa (@waleedym), Samer Deeb (@samerd)"
|
||||
short_description: Collect facts from Mellanox MLNX-OS network devices
|
||||
short_description: Collect facts from Mellanox ONYX network devices
|
||||
description:
|
||||
- Collects a base set of device facts from a MLNX-OS Mellanox network devices
|
||||
- Collects a base set of device facts from a ONYX Mellanox network devices
|
||||
This module prepends all of the base network fact keys with
|
||||
C(ansible_net_<fact>). The facts module will always collect a base set of
|
||||
facts from the device and can enable or disable collection of additional
|
||||
facts.
|
||||
notes:
|
||||
- Tested against MLNX-OS 3.6
|
||||
- Tested against ONYX 3.6
|
||||
options:
|
||||
gather_subset:
|
||||
description:
|
||||
|
@ -40,16 +40,16 @@ options:
|
|||
EXAMPLES = """
|
||||
---
|
||||
- name: Collect all facts from the device
|
||||
mlnxos_facts:
|
||||
onyx_facts:
|
||||
gather_subset: all
|
||||
|
||||
- name: Collect only the interfaces facts
|
||||
mlnxos_facts:
|
||||
onyx_facts:
|
||||
gather_subset:
|
||||
- interfaces
|
||||
|
||||
- name: Do not collect version facts
|
||||
mlnxos_facts:
|
||||
onyx_facts:
|
||||
gather_subset:
|
||||
- "!version"
|
||||
"""
|
||||
|
@ -82,11 +82,11 @@ ansible_net_interfaces:
|
|||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.six import iteritems
|
||||
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import BaseMlnxosModule
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import show_cmd
|
||||
from ansible.module_utils.network.onyx.onyx import BaseOnyxModule
|
||||
from ansible.module_utils.network.onyx.onyx import show_cmd
|
||||
|
||||
|
||||
class MlnxosFactsModule(BaseMlnxosModule):
|
||||
class OnyxFactsModule(BaseOnyxModule):
|
||||
|
||||
def get_runable_subset(self, gather_subset):
|
||||
runable_subsets = set()
|
||||
|
@ -231,7 +231,7 @@ VALID_SUBSETS = frozenset(FACT_SUBSETS.keys())
|
|||
def main():
|
||||
""" main entry point for module execution
|
||||
"""
|
||||
MlnxosFactsModule.main()
|
||||
OnyxFactsModule.main()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
|
@ -12,13 +12,13 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
|
||||
DOCUMENTATION = """
|
||||
---
|
||||
module: mlnxos_interface
|
||||
module: onyx_interface
|
||||
version_added: "2.5"
|
||||
author: "Samer Deeb (@samerd)"
|
||||
short_description: Manage Interfaces on Mellanox MLNX-OS network devices
|
||||
short_description: Manage Interfaces on Mellanox ONYX network devices
|
||||
description:
|
||||
- This module provides declarative management of Interfaces
|
||||
on Mellanox MLNX-OS network devices.
|
||||
on Mellanox ONYX network devices.
|
||||
notes:
|
||||
options:
|
||||
name:
|
||||
|
@ -74,29 +74,29 @@ options:
|
|||
|
||||
EXAMPLES = """
|
||||
- name: configure interface
|
||||
mlnxos_interface:
|
||||
onyx_interface:
|
||||
name: Eth1/2
|
||||
description: test-interface
|
||||
speed: 100 GB
|
||||
mtu: 512
|
||||
|
||||
- name: make interface up
|
||||
mlnxos_interface:
|
||||
onyx_interface:
|
||||
name: Eth1/2
|
||||
enabled: True
|
||||
|
||||
- name: make interface down
|
||||
mlnxos_interface:
|
||||
onyx_interface:
|
||||
name: Eth1/2
|
||||
enabled: False
|
||||
|
||||
- name: Check intent arguments
|
||||
mlnxos_interface:
|
||||
onyx_interface:
|
||||
name: Eth1/2
|
||||
state: up
|
||||
|
||||
- name: Config + intent
|
||||
mlnxos_interface:
|
||||
onyx_interface:
|
||||
name: Eth1/2
|
||||
enabled: False
|
||||
state: down
|
||||
|
@ -123,11 +123,11 @@ from ansible.module_utils.six import iteritems
|
|||
from ansible.module_utils.network.common.utils import conditional
|
||||
from ansible.module_utils.network.common.utils import remove_default_spec
|
||||
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import BaseMlnxosModule
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import get_interfaces_config
|
||||
from ansible.module_utils.network.onyx.onyx import BaseOnyxModule
|
||||
from ansible.module_utils.network.onyx.onyx import get_interfaces_config
|
||||
|
||||
|
||||
class MlnxosInterfaceModule(BaseMlnxosModule):
|
||||
class OnyxInterfaceModule(BaseOnyxModule):
|
||||
IF_ETH_REGEX = re.compile(r"^Eth(\d+\/\d+|Eth\d+\/\d+\d+)$")
|
||||
IF_VLAN_REGEX = re.compile(r"^Vlan (\d+)$")
|
||||
IF_LOOPBACK_REGEX = re.compile(r"^Loopback (\d+)$")
|
||||
|
@ -475,7 +475,7 @@ class MlnxosInterfaceModule(BaseMlnxosModule):
|
|||
def main():
|
||||
""" main entry point for module execution
|
||||
"""
|
||||
MlnxosInterfaceModule.main()
|
||||
OnyxInterfaceModule.main()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
|
@ -12,13 +12,13 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
|
||||
DOCUMENTATION = """
|
||||
---
|
||||
module: mlnxos_l2_interface
|
||||
module: onyx_l2_interface
|
||||
version_added: "2.5"
|
||||
author: "Samer Deeb (@samerd)"
|
||||
short_description: Manage Layer-2 interface on Mellanox MLNX-OS network devices
|
||||
short_description: Manage Layer-2 interface on Mellanox ONYX network devices
|
||||
description:
|
||||
- This module provides declarative management of Layer-2 interface
|
||||
on Mellanox MLNX-OS network devices.
|
||||
on Mellanox ONYX network devices.
|
||||
options:
|
||||
name:
|
||||
description:
|
||||
|
@ -46,13 +46,13 @@ options:
|
|||
|
||||
EXAMPLES = """
|
||||
- name: configure Layer-2 interface
|
||||
mlnxos_l2_interface:
|
||||
onyx_l2_interface:
|
||||
name: Eth1/1
|
||||
mode: access
|
||||
access_vlan: 30
|
||||
|
||||
- name: remove Layer-2 interface configuration
|
||||
mlnxos_l2_interface:
|
||||
onyx_l2_interface:
|
||||
name: Eth1/1
|
||||
state: absent
|
||||
"""
|
||||
|
@ -74,11 +74,11 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
from ansible.module_utils.six import iteritems
|
||||
from ansible.module_utils.network.common.utils import remove_default_spec
|
||||
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import BaseMlnxosModule
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import get_interfaces_config
|
||||
from ansible.module_utils.network.onyx.onyx import BaseOnyxModule
|
||||
from ansible.module_utils.network.onyx.onyx import get_interfaces_config
|
||||
|
||||
|
||||
class MlnxosL2InterfaceModule(BaseMlnxosModule):
|
||||
class OnyxL2InterfaceModule(BaseOnyxModule):
|
||||
IFNAME_REGEX = re.compile(r"^.*(Eth\d+\/\d+|Mpo\d+|Po\d+)")
|
||||
|
||||
@classmethod
|
||||
|
@ -277,7 +277,7 @@ class MlnxosL2InterfaceModule(BaseMlnxosModule):
|
|||
def main():
|
||||
""" main entry point for module execution
|
||||
"""
|
||||
MlnxosL2InterfaceModule.main()
|
||||
OnyxL2InterfaceModule.main()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
|
@ -12,13 +12,13 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
|
||||
DOCUMENTATION = """
|
||||
---
|
||||
module: mlnxos_l3_interface
|
||||
module: onyx_l3_interface
|
||||
version_added: "2.5"
|
||||
author: "Samer Deeb (@samerd)"
|
||||
short_description: Manage L3 interfaces on Mellanox MLNX-OS network devices
|
||||
short_description: Manage L3 interfaces on Mellanox ONYX network devices
|
||||
description:
|
||||
- This module provides declarative management of L3 interfaces
|
||||
on Mellanox MLNX-OS network devices.
|
||||
on Mellanox ONYX network devices.
|
||||
options:
|
||||
name:
|
||||
description:
|
||||
|
@ -45,23 +45,23 @@ options:
|
|||
|
||||
EXAMPLES = """
|
||||
- name: Set Eth1/1 IPv4 address
|
||||
mlnxos_l3_interface:
|
||||
onyx_l3_interface:
|
||||
name: Eth1/1
|
||||
ipv4: 192.168.0.1/24
|
||||
|
||||
- name: Remove Eth1/1 IPv4 address
|
||||
mlnxos_l3_interface:
|
||||
onyx_l3_interface:
|
||||
name: Eth1/1
|
||||
state: absent
|
||||
|
||||
- name: Set IP addresses on aggregate
|
||||
mlnxos_l3_interface:
|
||||
onyx_l3_interface:
|
||||
aggregate:
|
||||
- { name: Eth1/1, ipv4: 192.168.2.10/24 }
|
||||
- { name: Eth1/2, ipv4: 192.168.3.10/24 }
|
||||
|
||||
- name: Remove IP addresses on aggregate
|
||||
mlnxos_l3_interface:
|
||||
onyx_l3_interface:
|
||||
aggregate:
|
||||
- { name: Eth1/1, ipv4: 192.168.2.10/24 }
|
||||
- { name: Eth1/2, ipv4: 192.168.3.10/24 }
|
||||
|
@ -83,11 +83,11 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
from ansible.module_utils.six import iteritems
|
||||
from ansible.module_utils.network.common.utils import remove_default_spec
|
||||
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import BaseMlnxosModule
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import get_interfaces_config
|
||||
from ansible.module_utils.network.onyx.onyx import BaseOnyxModule
|
||||
from ansible.module_utils.network.onyx.onyx import get_interfaces_config
|
||||
|
||||
|
||||
class MlnxosL3InterfaceModule(BaseMlnxosModule):
|
||||
class OnyxL3InterfaceModule(BaseOnyxModule):
|
||||
IF_ETH_REGEX = re.compile(r"^Eth(\d+\/\d+|Eth\d+\/\d+\d+)$")
|
||||
IF_VLAN_REGEX = re.compile(r"^Vlan (\d+)$")
|
||||
IF_LOOPBACK_REGEX = re.compile(r"^Loopback (\d+)$")
|
||||
|
@ -285,7 +285,7 @@ class MlnxosL3InterfaceModule(BaseMlnxosModule):
|
|||
def main():
|
||||
""" main entry point for module execution
|
||||
"""
|
||||
MlnxosL3InterfaceModule.main()
|
||||
OnyxL3InterfaceModule.main()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
|
@ -12,13 +12,13 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
|
||||
DOCUMENTATION = """
|
||||
---
|
||||
module: mlnxos_linkagg
|
||||
module: onyx_linkagg
|
||||
version_added: "2.5"
|
||||
author: "Samer Deeb (@samerd)"
|
||||
short_description: Manage link aggregation groups on Mellanox MLNX-OS network devices
|
||||
short_description: Manage link aggregation groups on Mellanox ONYX network devices
|
||||
description:
|
||||
- This module provides declarative management of link aggregation groups
|
||||
on Mellanox MLNX-OS network devices.
|
||||
on Mellanox ONYX network devices.
|
||||
options:
|
||||
name:
|
||||
description:
|
||||
|
@ -53,25 +53,25 @@ options:
|
|||
|
||||
EXAMPLES = """
|
||||
- name: configure link aggregation group
|
||||
mlnxos_linkagg:
|
||||
onyx_linkagg:
|
||||
name: Po1
|
||||
members:
|
||||
- Eth1/1
|
||||
- Eth1/2
|
||||
|
||||
- name: remove configuration
|
||||
mlnxos_linkagg:
|
||||
onyx_linkagg:
|
||||
name: Po1
|
||||
state: absent
|
||||
|
||||
- name: Create aggregate of linkagg definitions
|
||||
mlnxos_linkagg:
|
||||
onyx_linkagg:
|
||||
aggregate:
|
||||
- { name: Po1, members: [Eth1/1] }
|
||||
- { name: Po2, members: [Eth1/2] }
|
||||
|
||||
- name: Remove aggregate of linkagg definitions
|
||||
mlnxos_linkagg:
|
||||
onyx_linkagg:
|
||||
aggregate:
|
||||
- name: Po1
|
||||
- name: Po2
|
||||
|
@ -97,11 +97,11 @@ from ansible.module_utils.network.common.utils import remove_default_spec
|
|||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.six import iteritems
|
||||
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import BaseMlnxosModule
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import get_interfaces_config
|
||||
from ansible.module_utils.network.onyx.onyx import BaseOnyxModule
|
||||
from ansible.module_utils.network.onyx.onyx import get_interfaces_config
|
||||
|
||||
|
||||
class MlnxosLinkAggModule(BaseMlnxosModule):
|
||||
class OnyxLinkAggModule(BaseOnyxModule):
|
||||
LAG_ID_REGEX = re.compile(r"^\d+ (Po\d+|Mpo\d+)\(([A-Z])\)$")
|
||||
LAG_NAME_REGEX = re.compile(r"^(Po|Mpo)(\d+)$")
|
||||
IF_NAME_REGEX = re.compile(r"^(Eth\d+\/\d+|Eth\d+\/\d+\/\d+)(.*)$")
|
||||
|
@ -334,7 +334,7 @@ class MlnxosLinkAggModule(BaseMlnxosModule):
|
|||
def main():
|
||||
""" main entry point for module execution
|
||||
"""
|
||||
MlnxosLinkAggModule.main()
|
||||
OnyxLinkAggModule.main()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
|
@ -12,13 +12,13 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
|
||||
DOCUMENTATION = """
|
||||
---
|
||||
module: mlnxos_lldp
|
||||
module: onyx_lldp
|
||||
version_added: "2.5"
|
||||
author: "Samer Deeb (@samerd)"
|
||||
short_description: Manage LLDP configuration on Mellanox MLNX-OS network devices
|
||||
short_description: Manage LLDP configuration on Mellanox ONYX network devices
|
||||
description:
|
||||
- This module provides declarative management of LLDP service configuration
|
||||
on Mellanox MLNX-OS network devices.
|
||||
on Mellanox ONYX network devices.
|
||||
options:
|
||||
state:
|
||||
description:
|
||||
|
@ -29,11 +29,11 @@ options:
|
|||
|
||||
EXAMPLES = """
|
||||
- name: Enable LLDP protocol
|
||||
mlnxos_lldp:
|
||||
onyx_lldp:
|
||||
state: present
|
||||
|
||||
- name: Disable LLDP protocol
|
||||
mlnxos_lldp:
|
||||
onyx_lldp:
|
||||
state: lldp
|
||||
"""
|
||||
|
||||
|
@ -48,11 +48,11 @@ commands:
|
|||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import BaseMlnxosModule
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import show_cmd
|
||||
from ansible.module_utils.network.onyx.onyx import BaseOnyxModule
|
||||
from ansible.module_utils.network.onyx.onyx import show_cmd
|
||||
|
||||
|
||||
class MlnxosLldpModule(BaseMlnxosModule):
|
||||
class OnyxLldpModule(BaseOnyxModule):
|
||||
LLDP_ENTRY = 'LLDP'
|
||||
SHOW_LLDP_CMD = 'show lldp local'
|
||||
|
||||
|
@ -110,7 +110,7 @@ class MlnxosLldpModule(BaseMlnxosModule):
|
|||
def main():
|
||||
""" main entry point for module execution
|
||||
"""
|
||||
MlnxosLldpModule.main()
|
||||
OnyxLldpModule.main()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
|
@ -12,13 +12,13 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
|
||||
DOCUMENTATION = """
|
||||
---
|
||||
module: mlnxos_lldp_interface
|
||||
module: onyx_lldp_interface
|
||||
version_added: "2.5"
|
||||
author: "Samer Deeb (@samerd)"
|
||||
short_description: Manage LLDP interfaces configuration on Mellanox MLNX-OS network devices
|
||||
short_description: Manage LLDP interfaces configuration on Mellanox ONYX network devices
|
||||
description:
|
||||
- This module provides declarative management of LLDP interfaces
|
||||
configuration on Mellanox MLNX-OS network devices.
|
||||
configuration on Mellanox ONYX network devices.
|
||||
options:
|
||||
name:
|
||||
description:
|
||||
|
@ -39,34 +39,34 @@ options:
|
|||
|
||||
EXAMPLES = """
|
||||
- name: Configure LLDP on specific interfaces
|
||||
mlnxos_lldp_interface:
|
||||
onyx_lldp_interface:
|
||||
name: Eth1/1
|
||||
state: present
|
||||
|
||||
- name: Disable LLDP on specific interfaces
|
||||
mlnxos_lldp_interface:
|
||||
onyx_lldp_interface:
|
||||
name: Eth1/1
|
||||
state: disabled
|
||||
|
||||
- name: Enable LLDP on specific interfaces
|
||||
mlnxos_lldp_interface:
|
||||
onyx_lldp_interface:
|
||||
name: Eth1/1
|
||||
state: enabled
|
||||
|
||||
- name: Delete LLDP on specific interfaces
|
||||
mlnxos_lldp_interface:
|
||||
onyx_lldp_interface:
|
||||
name: Eth1/1
|
||||
state: absent
|
||||
|
||||
- name: Create aggregate of LLDP interface configurations
|
||||
mlnxos_lldp_interface:
|
||||
onyx_lldp_interface:
|
||||
aggregate:
|
||||
- { name: Eth1/1 }
|
||||
- { name: Eth1/2 }
|
||||
state: present
|
||||
|
||||
- name: Delete aggregate of LLDP interface configurations
|
||||
mlnxos_lldp_interface:
|
||||
onyx_lldp_interface:
|
||||
aggregate:
|
||||
- { name: Eth1/1 }
|
||||
- { name: Eth1/2 }
|
||||
|
@ -89,11 +89,11 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
from ansible.module_utils.six import iteritems
|
||||
from ansible.module_utils.network.common.utils import remove_default_spec
|
||||
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import BaseMlnxosModule
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import show_cmd
|
||||
from ansible.module_utils.network.onyx.onyx import BaseOnyxModule
|
||||
from ansible.module_utils.network.onyx.onyx import show_cmd
|
||||
|
||||
|
||||
class MlnxosLldpInterfaceModule(BaseMlnxosModule):
|
||||
class OnyxLldpInterfaceModule(BaseOnyxModule):
|
||||
IF_NAME_REGEX = re.compile(r"^(Eth\d+\/\d+|Eth\d+\/\d+\d+)$")
|
||||
_purge = False
|
||||
|
||||
|
@ -222,7 +222,7 @@ class MlnxosLldpInterfaceModule(BaseMlnxosModule):
|
|||
def main():
|
||||
""" main entry point for module execution
|
||||
"""
|
||||
MlnxosLldpInterfaceModule.main()
|
||||
OnyxLldpInterfaceModule.main()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
|
@ -12,15 +12,15 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
|
||||
DOCUMENTATION = """
|
||||
---
|
||||
module: mlnxos_magp
|
||||
module: onyx_magp
|
||||
version_added: "2.5"
|
||||
author: "Samer Deeb (@samerd)"
|
||||
short_description: Manage MAGP protocol on Mellanox MLNX-OS network devices
|
||||
short_description: Manage MAGP protocol on Mellanox ONYX network devices
|
||||
description:
|
||||
- This module provides declarative management of MAGP protocol on vlan
|
||||
interface of Mellanox MLNX-OS network devices.
|
||||
interface of Mellanox ONYX network devices.
|
||||
notes:
|
||||
- Tested on MLNX-OS 3.6.4000
|
||||
- Tested on ONYX 3.6.4000
|
||||
options:
|
||||
magp_id:
|
||||
description:
|
||||
|
@ -45,7 +45,7 @@ options:
|
|||
|
||||
EXAMPLES = """
|
||||
- name: run add vlan interface with magp
|
||||
mlnxos_magp:
|
||||
onyx_magp:
|
||||
magp_id: 103
|
||||
router_ip: 192.168.8.2
|
||||
router_mac: AA:1B:2C:3D:4E:5F
|
||||
|
@ -66,11 +66,11 @@ import re
|
|||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import BaseMlnxosModule
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import show_cmd
|
||||
from ansible.module_utils.network.onyx.onyx import BaseOnyxModule
|
||||
from ansible.module_utils.network.onyx.onyx import show_cmd
|
||||
|
||||
|
||||
class MlnxosMagpModule(BaseMlnxosModule):
|
||||
class OnyxMagpModule(BaseOnyxModule):
|
||||
IF_VLAN_REGEX = re.compile(r"^Vlan (\d+)$")
|
||||
|
||||
@classmethod
|
||||
|
@ -220,7 +220,7 @@ class MlnxosMagpModule(BaseMlnxosModule):
|
|||
def main():
|
||||
""" main entry point for module execution
|
||||
"""
|
||||
MlnxosMagpModule.main()
|
||||
OnyxMagpModule.main()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
|
@ -12,15 +12,15 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
|
||||
DOCUMENTATION = """
|
||||
---
|
||||
module: mlnxos_mlag_ipl
|
||||
module: onyx_mlag_ipl
|
||||
version_added: "2.5"
|
||||
author: "Samer Deeb (@samerd)"
|
||||
short_description: Manage IPL (inter-peer link) on Mellanox MLNX-OS network devices
|
||||
short_description: Manage IPL (inter-peer link) on Mellanox ONYX network devices
|
||||
description:
|
||||
- This module provides declarative management of IPL (inter-peer link)
|
||||
management on Mellanox MLNX-OS network devices.
|
||||
management on Mellanox ONYX network devices.
|
||||
notes:
|
||||
- Tested on MLNX-OS 3.6.4000
|
||||
- Tested on ONYX 3.6.4000
|
||||
options:
|
||||
name:
|
||||
description:
|
||||
|
@ -41,14 +41,14 @@ options:
|
|||
|
||||
EXAMPLES = """
|
||||
- name: run configure ipl
|
||||
mlnxos_mlag_ipl:
|
||||
onyx_mlag_ipl:
|
||||
name: Po1
|
||||
vlan_interface: Vlan 322
|
||||
state: present
|
||||
peer_address: 192.168.7.1
|
||||
|
||||
- name: run remove ipl
|
||||
mlnxos_mlag_ipl:
|
||||
onyx_mlag_ipl:
|
||||
name: Po1
|
||||
state: absent
|
||||
"""
|
||||
|
@ -66,11 +66,11 @@ import re
|
|||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import BaseMlnxosModule
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import show_cmd
|
||||
from ansible.module_utils.network.onyx.onyx import BaseOnyxModule
|
||||
from ansible.module_utils.network.onyx.onyx import show_cmd
|
||||
|
||||
|
||||
class MlnxosMlagIplModule(BaseMlnxosModule):
|
||||
class OnyxMlagIplModule(BaseOnyxModule):
|
||||
VLAN_IF_REGEX = re.compile(r'^Vlan \d+')
|
||||
|
||||
@classmethod
|
||||
|
@ -203,7 +203,7 @@ class MlnxosMlagIplModule(BaseMlnxosModule):
|
|||
def main():
|
||||
""" main entry point for module execution
|
||||
"""
|
||||
MlnxosMlagIplModule.main()
|
||||
OnyxMlagIplModule.main()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
|
@ -12,15 +12,15 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
|
||||
DOCUMENTATION = """
|
||||
---
|
||||
module: mlnxos_mlag_vip
|
||||
module: onyx_mlag_vip
|
||||
version_added: "2.5"
|
||||
author: "Samer Deeb (@samerd)"
|
||||
short_description: Configures MLAG VIP on Mellanox MLNX-OS network devices
|
||||
short_description: Configures MLAG VIP on Mellanox ONYX network devices
|
||||
description:
|
||||
- This module provides declarative management of MLAG virtual IPs
|
||||
on Mellanox MLNX-OS network devices.
|
||||
on Mellanox ONYX network devices.
|
||||
notes:
|
||||
- Tested on MLNX-OS 3.6.4000
|
||||
- Tested on ONYX 3.6.4000
|
||||
options:
|
||||
ipaddress:
|
||||
description:
|
||||
|
@ -44,7 +44,7 @@ options:
|
|||
|
||||
EXAMPLES = """
|
||||
- name: configure mlag-vip
|
||||
mlnxos_mlag_vip:
|
||||
onyx_mlag_vip:
|
||||
ipaddress: 50.3.3.1/24
|
||||
group_name: ansible-test-group
|
||||
mac_address: 00:11:12:23:34:45
|
||||
|
@ -64,11 +64,11 @@ import time
|
|||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import BaseMlnxosModule
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import show_cmd
|
||||
from ansible.module_utils.network.onyx.onyx import BaseOnyxModule
|
||||
from ansible.module_utils.network.onyx.onyx import show_cmd
|
||||
|
||||
|
||||
class MlnxosMLagVipModule(BaseMlnxosModule):
|
||||
class OnyxMLagVipModule(BaseOnyxModule):
|
||||
|
||||
def init_module(self):
|
||||
""" initialize module
|
||||
|
@ -172,7 +172,7 @@ class MlnxosMLagVipModule(BaseMlnxosModule):
|
|||
def main():
|
||||
""" main entry point for module execution
|
||||
"""
|
||||
MlnxosMLagVipModule.main()
|
||||
OnyxMLagVipModule.main()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
|
@ -12,15 +12,15 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
|
||||
DOCUMENTATION = """
|
||||
---
|
||||
module: mlnxos_ospf
|
||||
module: onyx_ospf
|
||||
version_added: "2.5"
|
||||
author: "Samer Deeb (@samerd)"
|
||||
short_description: Manage OSPF protocol on Mellanox MLNX-OS network devices
|
||||
short_description: Manage OSPF protocol on Mellanox ONYX network devices
|
||||
description:
|
||||
- This module provides declarative management and configuration of OSPF
|
||||
protocol on Mellanox MLNX-OS network devices.
|
||||
protocol on Mellanox ONYX network devices.
|
||||
notes:
|
||||
- Tested on MLNX-OS 3.6.4000
|
||||
- Tested on ONYX 3.6.4000
|
||||
options:
|
||||
ospf:
|
||||
description:
|
||||
|
@ -50,7 +50,7 @@ options:
|
|||
|
||||
EXAMPLES = """
|
||||
- name: add ospf router to interface
|
||||
mlnxos_ospf:
|
||||
onyx_ospf:
|
||||
ospf: 2
|
||||
router_id: 192.168.8.2
|
||||
interfaces:
|
||||
|
@ -74,11 +74,11 @@ import re
|
|||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.six import iteritems
|
||||
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import BaseMlnxosModule
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import show_cmd
|
||||
from ansible.module_utils.network.onyx.onyx import BaseOnyxModule
|
||||
from ansible.module_utils.network.onyx.onyx import show_cmd
|
||||
|
||||
|
||||
class MlnxosOspfModule(BaseMlnxosModule):
|
||||
class OnyxOspfModule(BaseOnyxModule):
|
||||
OSPF_IF_REGEX = re.compile(
|
||||
r'^(Loopback\d+|Eth\d+\/\d+|Vlan\d+|Po\d+)\s+(\S+).*')
|
||||
OSPF_ROUTER_REGEX = re.compile(r'^Routing Process (\d+).*ID\s+(\S+).*')
|
||||
|
@ -231,7 +231,7 @@ class MlnxosOspfModule(BaseMlnxosModule):
|
|||
def main():
|
||||
""" main entry point for module execution
|
||||
"""
|
||||
MlnxosOspfModule.main()
|
||||
OnyxOspfModule.main()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
|
@ -12,15 +12,15 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
|
||||
DOCUMENTATION = """
|
||||
---
|
||||
module: mlnxos_pfc_interface
|
||||
module: onyx_pfc_interface
|
||||
version_added: "2.5"
|
||||
author: "Samer Deeb (@samerd)"
|
||||
short_description: Manage priority flow control on MLNX-OS network devices
|
||||
short_description: Manage priority flow control on ONYX network devices
|
||||
description:
|
||||
- This module provides declarative management of priority flow control (PFC)
|
||||
on interfaces of Mellanox MLNX-OS network devices.
|
||||
on interfaces of Mellanox ONYX network devices.
|
||||
notes:
|
||||
- Tested on MLNX-OS 3.6.4000
|
||||
- Tested on ONYX 3.6.4000
|
||||
options:
|
||||
name:
|
||||
description:
|
||||
|
@ -41,7 +41,7 @@ options:
|
|||
|
||||
EXAMPLES = """
|
||||
- name: configure PFC
|
||||
mlnxos_pfc_interface:
|
||||
onyx_pfc_interface:
|
||||
name: Eth1/1
|
||||
state: enabled
|
||||
"""
|
||||
|
@ -61,11 +61,11 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
from ansible.module_utils.network.common.utils import remove_default_spec
|
||||
from ansible.module_utils.six import iteritems
|
||||
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import BaseMlnxosModule
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import show_cmd
|
||||
from ansible.module_utils.network.onyx.onyx import BaseOnyxModule
|
||||
from ansible.module_utils.network.onyx.onyx import show_cmd
|
||||
|
||||
|
||||
class MlnxosPfcInterfaceModule(BaseMlnxosModule):
|
||||
class OnyxPfcInterfaceModule(BaseOnyxModule):
|
||||
PFC_IF_REGEX = re.compile(
|
||||
r"^(Eth\d+\/\d+)|(Eth\d+\/\d+\/\d+)|(Po\d+)|(Mpo\d+)$")
|
||||
|
||||
|
@ -198,7 +198,7 @@ class MlnxosPfcInterfaceModule(BaseMlnxosModule):
|
|||
def main():
|
||||
""" main entry point for module execution
|
||||
"""
|
||||
MlnxosPfcInterfaceModule.main()
|
||||
OnyxPfcInterfaceModule.main()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
|
@ -12,15 +12,15 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
|
||||
DOCUMENTATION = """
|
||||
---
|
||||
module: mlnxos_protocol
|
||||
module: onyx_protocol
|
||||
version_added: "2.5"
|
||||
author: "Samer Deeb (@samerd)"
|
||||
short_description: Enables/Disables protocols on Mellanox MLNX-OS network devices
|
||||
short_description: Enables/Disables protocols on Mellanox ONYX network devices
|
||||
description:
|
||||
- This module provides a mechanism for enabling and disabling protocols
|
||||
Mellanox on MLNX-OS network devices.
|
||||
Mellanox on ONYX network devices.
|
||||
notes:
|
||||
- Tested on MLNX-OS 3.6.4000
|
||||
- Tested on ONYX 3.6.4000
|
||||
options:
|
||||
mlag:
|
||||
description: MLAG protocol
|
||||
|
@ -59,7 +59,7 @@ options:
|
|||
|
||||
EXAMPLES = """
|
||||
- name: enable protocols for MLAG
|
||||
mlnxos_protocol:
|
||||
onyx_protocol:
|
||||
lacp: enabled
|
||||
spanning_tree: disabled
|
||||
ip_routing: enabled
|
||||
|
@ -80,11 +80,11 @@ commands:
|
|||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.six import iteritems
|
||||
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import BaseMlnxosModule
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import show_cmd
|
||||
from ansible.module_utils.network.onyx.onyx import BaseOnyxModule
|
||||
from ansible.module_utils.network.onyx.onyx import show_cmd
|
||||
|
||||
|
||||
class MlnxosProtocolModule(BaseMlnxosModule):
|
||||
class OnyxProtocolModule(BaseOnyxModule):
|
||||
|
||||
PROTOCOL_MAPPING = dict(
|
||||
mlag=dict(name="mlag", enable="protocol mlag",
|
||||
|
@ -178,7 +178,7 @@ class MlnxosProtocolModule(BaseMlnxosModule):
|
|||
def main():
|
||||
""" main entry point for module execution
|
||||
"""
|
||||
MlnxosProtocolModule.main()
|
||||
OnyxProtocolModule.main()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
|
@ -12,13 +12,13 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|||
|
||||
DOCUMENTATION = """
|
||||
---
|
||||
module: mlnxos_vlan
|
||||
module: onyx_vlan
|
||||
version_added: "2.5"
|
||||
author: "Samer Deeb (@samerd) Alex Tabachnik (@atabachnik)"
|
||||
short_description: Manage VLANs on Mellanox MLNX-OS network devices
|
||||
short_description: Manage VLANs on Mellanox ONYX network devices
|
||||
description:
|
||||
- This module provides declarative management of VLANs
|
||||
on Mellanox MLNX-OS network devices.
|
||||
on Mellanox ONYX network devices.
|
||||
options:
|
||||
name:
|
||||
description:
|
||||
|
@ -41,12 +41,12 @@ options:
|
|||
|
||||
EXAMPLES = """
|
||||
- name: configure VLAN ID and name
|
||||
mlnxos_vlan:
|
||||
onyx_vlan:
|
||||
vlan_id: 20
|
||||
name: test-vlan
|
||||
|
||||
- name: remove configuration
|
||||
mlnxos_vlan:
|
||||
onyx_vlan:
|
||||
state: absent
|
||||
"""
|
||||
|
||||
|
@ -67,11 +67,11 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
from ansible.module_utils.six import iteritems
|
||||
from ansible.module_utils.network.common.utils import remove_default_spec
|
||||
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import BaseMlnxosModule
|
||||
from ansible.module_utils.network.mlnxos.mlnxos import show_cmd
|
||||
from ansible.module_utils.network.onyx.onyx import BaseOnyxModule
|
||||
from ansible.module_utils.network.onyx.onyx import show_cmd
|
||||
|
||||
|
||||
class MlnxosVlanModule(BaseMlnxosModule):
|
||||
class OnyxVlanModule(BaseOnyxModule):
|
||||
_purge = False
|
||||
|
||||
@classmethod
|
||||
|
@ -194,7 +194,7 @@ class MlnxosVlanModule(BaseMlnxosModule):
|
|||
def main():
|
||||
""" main entry point for module execution
|
||||
"""
|
||||
MlnxosVlanModule.main()
|
||||
OnyxVlanModule.main()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
Loading…
Add table
Add a link
Reference in a new issue