.. _dellemc.enterprise_sonic.sonic_dcbx_module: *********************************** dellemc.enterprise_sonic.sonic_dcbx *********************************** **Manage DCBx configurations on SONiC** Version added: 3.1.0 .. contents:: :local: :depth: 1 Synopsis -------- - This module provides configuration management of DCBx parameters in devices running SONiC. Parameters ---------- .. raw:: html
Parameter Choices/Defaults Comments
config
dictionary
The set of DCBx attribute configurations
global
dictionary
Global DCBx configuration
enabled
boolean
    Choices:
  • no
  • yes
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
interfaces
list / elements=dictionary
Interfaces DCBx configuration
enabled
boolean
    Choices:
  • no
  • yes
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.
ets_configuration_tlv_enabled
boolean
    Choices:
  • no
  • yes
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
ets_recommendation_tlv_enabled
boolean
    Choices:
  • no
  • yes
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
name
string / required
Interface name for which DCBx needs to be configured.
This must be a physical (Ethernet) interface.
pfc_tlv_enabled
boolean
    Choices:
  • no
  • yes
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
state
string
    Choices:
  • merged ←
  • deleted
  • replaced
  • overridden
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.

Examples -------- .. code-block:: yaml # 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: .. raw:: html
Key Returned Description
after
list
when changed, if check_mode is not set
The resulting configuration from module invocation.

Sample:
The configuration returned will always be in the same format as the parameters above.
after_generated
list
when check_mode
The generated (simulated) configuration from module invocation.

Sample:
The configuration returned will always be in the same format as the parameters above.
before
list
always
The configuration prior to the module invocation.

Sample:
The configuration returned will always be in the same format as the parameters above.
commands
list
always
The set of commands pushed to the remote device.

Sample:
['command 1', 'command 2', 'command 3']


Status ------ Authors ~~~~~~~ - Bing Sun(@bsun-sudo), Haemanthi Sree KR (@haemanthisree)