onyx_traffic_class – Configures Traffic Class — Ansible Documentation

- AnsibleFest
- Products
- Community
- Webinars & Training
- Blog

Documentation

# onyx_traffic_class – Configures Traffic Class

New in version 2.9.

- Synopsis

- Parameters

- Examples

- Return Values

- Status

## Synopsis

- This module provides declarative management of Traffic Class configuration on Mellanox ONYX network devices.

## Parameters

Parameter | Choices/Defaults | Comments
--- | --- | ---
congestion_control - |  | configure congestion control on interface.
| control - / required | Choices: red ecn both | congestion control type.
| max_threshold - / required |  | Set maximum-threshold value (in KBs) for marking traffic-class queue.
| min_threshold - / required |  | Set minimum-threshold value (in KBs) for marking traffic-class queue.
| threshold_mode - / required | Choices: absolute relative | congestion control threshold mode.
dcb - |  | configure dcb control on interface.
| mode - / required | Choices: strict wrr | dcb control mode.
| weight - |  | Relevant only for wrr mode.
interfaces - / required |  | list of interfaces name.
state - | Choices: enabled ← disabled | enable congestion control on interface.
tc - / required |  | traffic class, range 0-7.

## Examples

    - name: configure traffic class
      onyx_traffic_class:
        interfaces:
          - Eth1/1
          - Eth1/2
        tc: 3
        congestion_control:
          control: ecn
          threshold_mode: absolute
          min_threshold: 500
          max_threshold: 1500
        dcb:
          mode: strict

## Return Values

Common return values are documented here, the following are the fields unique to this module:

Key | Returned | Description
--- | --- | ---
commands list | always | The list of configuration mode commands to send to the device. Sample: ['interface ethernet 1/15 traffic-class 3 congestion-control ecn minimum-absolute 150 maximum-absolute 1500', 'interface ethernet 1/16 traffic-class 3 congestion-control ecn minimum-absolute 150 maximum-absolute 1500', 'interface mlag-port-channel 7 traffic-class 3 congestion-control ecn minimum-absolute 150 maximum-absolute 1500', 'interface port-channel 1 traffic-class 3 congestion-control ecn minimum-absolute 150 maximum-absolute 1500', 'interface ethernet 1/15 traffic-class 3 dcb ets strict', 'interface ethernet 1/16 traffic-class 3 dcb ets strict', 'interface mlag-port-channel 7 traffic-class 3 dcb ets strict', 'interface port-channel 1 traffic-class 3 dcb ets strict']

## Status

- This module is not guaranteed to have a backwards compatible interface. [preview]

- This module is maintained by the Ansible Community. [community]

### Authors

- Anas Badaha (@anasb)

Hint

If you notice any issues in this documentation, you can edit this document to improve it.