�
�Udac @` s 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 Z d d
l
m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d e f d � � YZ d � Z e d k re � n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust communityt supported_bys�
---
module: onyx_interface
version_added: "2.5"
author: "Samer Deeb (@samerd)"
short_description: Manage Interfaces on Mellanox ONYX network devices
description:
- This module provides declarative management of Interfaces
on Mellanox ONYX network devices.
notes:
options:
name:
description:
- Name of the Interface.
required: true
description:
description:
- Description of Interface.
enabled:
description:
- Interface link status.
type: bool
speed:
description:
- Interface link speed.
choices: ['1G', '10G', '25G', '40G', '50G', '56G', '100G']
mtu:
description:
- Maximum size of transmit packet.
aggregate:
description: List of Interfaces definitions.
duplex:
description:
- Interface link status
default: auto
choices: ['full', 'half', 'auto']
tx_rate:
description:
- Transmit rate in bits per second (bps).
- This is state check parameter only.
- Supports conditionals, see L(Conditionals in Networking Modules,../network/user_guide/network_working_with_command_output.html)
rx_rate:
description:
- Receiver rate in bits per second (bps).
- This is state check parameter only.
- Supports conditionals, see L(Conditionals in Networking Modules,../network/user_guide/network_working_with_command_output.html)
delay:
description:
- Time in seconds to wait before checking for the operational state on
remote device. This wait is applicable for operational state argument
which are I(state) with values C(up)/C(down).
default: 10
purge:
description:
- Purge Interfaces not defined in the aggregate parameter.
This applies only for logical interface.
default: false
type: bool
state:
description:
- State of the Interface configuration, C(up) means present and
operationally up and C(down) means present and operationally C(down)
default: present
choices: ['present', 'absent', 'up', 'down']
s�
- name: configure interface
onyx_interface:
name: Eth1/2
description: test-interface
speed: 100G
mtu: 512
- name: make interface up
onyx_interface:
name: Eth1/2
enabled: True
- name: make interface down
onyx_interface:
name: Eth1/2
enabled: False
- name: Check intent arguments
onyx_interface:
name: Eth1/2
state: up
- name: Config + intent
onyx_interface:
name: Eth1/2
enabled: False
state: down
s�
commands:
description: The list of configuration mode commands to send to the device.
returned: always
type: list
sample:
- interface ethernet 1/2
- description test-interface
- mtu 512
- exit
( t deepcopyN( t sleep( t
AnsibleModule( t iteritems( t conditional( t remove_default_spec( t BaseOnyxModule( t get_interfaces_configt OnyxInterfaceModulec B` s� e Z e j d � Z e j d � Z e j d � Z e j d � Z d Z d Z d Z
d Z i e e 6e e
6e e 6e e 6Z i d) e 6d* e
6d+ e 6d, e 6Z
i d- e 6d. e
6d/ e 6d e 6Z d0 Z d1 Z e d � � Z e d � � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z e d � � Z e d � � Z e d � � Z e d � � Z d � Z! d � Z"