dellemc.enterprise_sonic.sonic_dcbx module – Manage DCBx configurations on SONiC
Note
This module is part of the dellemc.enterprise_sonic collection (version 3.2.0).
You might already have this collection installed if you are using the ansible package.
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install dellemc.enterprise_sonic.
To use it in a playbook, specify: dellemc.enterprise_sonic.sonic_dcbx.
New in dellemc.enterprise_sonic 3.1.0
Synopsis
This module provides configuration management of DCBx parameters in devices running SONiC.
Parameters
Parameter |
Comments |
|---|---|
The set of DCBx attribute configurations |
|
Global DCBx configuration |
|
This argument is a boolean value to enable or disable DCBx. It has a default value of False in SONiC and has an operational default value of False for the enterproise_sonic Ansible collection Choices:
|
|
Interfaces DCBx configuration |
|
This argument is a boolean value to enable or disable DCBx. It has a default value of True in SONiC and has an operational default value of True for the enterprise_sonic Ansible collection This command is supported only on physical interfaces and not on logical interfaces. Choices:
|
|
This command can be used to select whether to advertise and receive ETS configuration TLV. It has a default value of True in SONiC and has an operational default value of True for the enterproise_sonic Ansible collection Choices:
|
|
This command can be used to select whether to advertise and receive ETS recommendation TLV. It has a default value of True in SONiC and has an operational default value of True for the enterproise_sonic Ansible collection Choices:
|
|
Interface name for which DCBx needs to be configured. This must be a physical (Ethernet) interface. |
|
This command can be used to select whether to advertise and receive PFC TLV. It has a default value of True in SONiC and has an operational default value of True for the enterproise_sonic Ansible collection Choices:
|
|
The state specifies the type of configuration update to be performed on the device. If the state is “merged”, merge specified attributes with existing configured attributes. For “deleted”, delete the specified attributes from existing configuration. Choices:
|
Examples
# Using "merged" state for DCBx interface configuration
#
# Before State:
# -------------
#
# sonic# show running-configuration interface Ethernet0
# !
# interface Ethernet0
# mtu 9100
# speed 25000
# unreliable-los auto
# no shutdown
- name: Modify DCBx Interface configurations
dellemc.enterprise_sonic.sonic_dcbx:
config:
-interfaces:
- name: Ethernet0
enabled: false
pfc_tlv_enabled: false
ets_configuration_tlv_enabled: false
ets_recommendation_tlv_enabled: false
state: merged
# After State:
# ------------
#
# sonic# show running-configuration interface Ethernet0
# !
# interface Ethernet0
# mtu 9100
# speed 25000
# unreliable-los auto
# no shutdown
# no dcbx enable
# no dcbx tlv-select pfc
# no dcbx tlv-select ets-conf
# no dcbx tlv-select ets-reco
# Using "merged" state for DCBx global configuration
#
# Before State:
# -------------
#
# sonic# show running-configuration | grep dcbx
# sonic#
- name: Modify DCBX configurations
dellemc.enterprise_sonic.sonic_dcbx:
config:
global:
enabled: true
state: merged
# After State:
# ------------
#
# sonic# show running-configuration | grep dcbx
# !
# dcbx enable
# !
# Using "merged" state for DCBx interface configuration
#
# Before State:
# -------------
# sonic# show running-configuration interface Ethernet 0
# !
# interface Ethernet0
# mtu 9100
# speed 25000
# unreliable-los auto
# no shutdown
# no dcbx enable
# no dcbx tlv-select pfc
# no dcbx tlv-select ets-conf
# no dcbx tlv-select ets-reco
- name: Modify DCBx Interface configurations
dellemc.enterprise_sonic.sonic_dcbx:
config:
interfaces:
- name: Ethernet0
enabled: true
pfc_tlv_enabled: true
ets_configuration_tlv_enabled: true
ets_recommendation_tlv_enabled: true
state: merged
# After State:
# ------------
#
# sonic# show running-configuration interface Ethernet0
# !
# interface Ethernet0
# mtu 9100
# speed 25000
# unreliable-los auto
# no shutdown
# Using "deleted" state for DCBx interface configuration
#
# Before State:
# -------------
#
# sonic# show running-configuration interface Ethernet 0
# !
# interface Ethernet0
# mtu 9100
# speed 25000
# unreliable-los auto
# no shutdown
# no dcbx enable
# no dcbx tlv-select pfc
# no dcbx tlv-select ets-conf
# no dcbx tlv-select ets-reco
- name: Delete and set default DCBx Interface configurations
dellemc.enterprise_sonic.sonic_dcbx:
config:
interfaces:
- name: Ethernet0
enabled: false
pfc_tlv_enabled: false
ets_configuration_tlv_enabled: false
ets_recommendation_tlv_enabled: false
state: deleted
# After State:
# ------------
#
# sonic# show running-configuration interface Ethernet0
# !
# interface Ethernet0
# mtu 9100
# speed 25000
# unreliable-los auto
# no shutdown
# Using "replaced" state for DCBx interface configuration
#
# Before State:
# -------------
#
# sonic# show running-configuration interface Ethernet0
# !
# interface Ethernet0
# mtu 9100
# speed 25000
# unreliable-los auto
# no shutdown
# no dcbx tlv-select pfc
# no dcbx tlv-select ets-conf
# no dcbx tlv-select ets-reco
#
# sonic# show running-configuration interface Ethernet4
# !
# interface Ethernet4
# mtu 9100
# speed 25000
# unreliable-los auto
# no shutdown
# no dcbx enable
# no dcbx tlv-select pfc
- name: Modify DCBx Interface configurations
dellemc.enterprise_sonic.sonic_dcbx:
config:
-interfaces:
- name: Ethernet0
enabled: false
state: replaced
# After State:
# ------------
#
# sonic# show running-configuration interface Ethernet0
# !
# interface Ethernet0
# mtu 9100
# speed 25000
# unreliable-los auto
# no shutdown
# no dcbx enable
#
# sonic# show running-configuration interface Ethernet4
# !
# interface Ethernet4
# mtu 9100
# speed 25000
# unreliable-los auto
# no shutdown
# no dcbx enable
# no dcbx tlv-select pfc
# Using "overridden" state for DCBx interface configuration
#
# Before State:
# -------------
# sonic# show running-configuration interface Ethernet0
# !
# interface Ethernet0
# mtu 9100
# speed 25000
# unreliable-los auto
# no shutdown
# no dcbx tlv-select pfc
# no dcbx tlv-select ets-conf
# no dcbx tlv-select ets-reco
#
# sonic# show running-configuration interface Ethernet4
# !
# interface Ethernet4
# mtu 9100
# speed 25000
# unreliable-los auto
# no shutdown
# no dcbx enable
# no dcbx tlv-select pfc
#
# sonic# show running-configuration interface Ethernet8
# !
# interface Ethernet8
# mtu 9100
# speed 25000
# unreliable-los auto
# no shutdown
# no dcbx enable
# no dcbx tlv-select pfc
# no dcbx tlv-select ets-conf
# no dcbx tlv-select ets-reco
#
# sonic# show running-configuration interface Ethernet12
# !
# interface Ethernet12
# mtu 9100
# speed 25000
# unreliable-los auto
# no shutdown
- name: Modify DCBx Interface configurations
dellemc.enterprise_sonic.sonic_dcbx:
config:
-interfaces:
- name: Ethernet0
enabled: false
state: overridden
# After State:
# ------------
# sonic# show running-configuration interface Ethernet0
# !
# interface Ethernet0
# mtu 9100
# speed 25000
# unreliable-los auto
# no shutdown
# no dcbx enable
#
# sonic# show running-configuration interface Ethernet4
# !
# interface Ethernet4
# mtu 9100
# speed 25000
# unreliable-los auto
# no shutdown
#
# sonic# show running-configuration interface Ethernet8
# !
# interface Ethernet8
# mtu 9100
# speed 25000
# unreliable-los auto
# no shutdown
#
# sonic# show running-configuration interface Ethernet12
# !
# interface Ethernet12
# mtu 9100
# speed 25000
# unreliable-los auto
# no shutdown
# Using "deleted" state for DCBx global configuration
#
# Before State:
# -------------
#
# sonic# show running-configuration | grep dcbx
# !
# dcbx enable
# !
- name: Delete DCBX mode configuration
dellemc.enterprise_sonic.sonic_dcbx:
config:
global:
enabled: true
state: deleted
# After State:
# ------------
#
# sonic# show running-configuration | grep dcbx
# sonic#
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
The resulting configuration from module invocation. Returned: when changed, if Sample: |
|
The generated (simulated) configuration from module invocation. Returned: when Sample: |
|
The configuration prior to the module invocation. Returned: always Sample: |
|
The set of commands pushed to the remote device. Returned: always Sample: |