dellemc.enterprise_sonic.sonic_poe module – Manage PoE configuration on SONiC
Note
This module is part of the dellemc.enterprise_sonic collection (version 2.5.1).
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_poe
.
New in dellemc.enterprise_sonic 2.5.0
Synopsis
This module provides configuration management of PoE at global and card level for devices running SONiC
Parameters
Parameter |
Comments |
---|---|
Specifies PoE configurations |
|
PoE card (power controller hardware) configuration. currently not supported on platforms. |
|
enable PoE auto reset mode for this card Choices:
|
|
Identifier for the card. must be number in range of 0-7. |
|
the power management algorithm. dynamic means that power consumption of each port is measured and calculated in real-time. static means that power allocated for each port depends on the type of power threshold configured on the port Choices:
|
|
Inline power usage threshold. Range is 0-99 inclusive |
|
configuration for global PoE card |
|
enable PoE auto reset mode for global. currently not supported on platforms. Choices:
|
|
the power management algorithm to use. dynamic means that power consumption of each port is measured and calculated in real-time. static means that power allocated for each port depends on the type of power threshold configured on the port. currently only ‘dynamic’ and ‘class’ values are supported Choices:
|
|
Inline power usage threshold. Range is 0-99 inclusive. currently not supported on platforms. |
|
PoE configuration for ethernet interfaces |
|
Device detection mechanism performed by this PSE port. Legacy is capacitive detection scheme, which can be used alone or as a backup if other detection schemes fail. Those schemes are IEEE 802 standard schemes. None cannot be forcibly set by adminstrator. currently only ‘dot3bt’ and ‘dot3bt+legacy’ values are supported Choices:
|
|
PoE port disconnect type. currently not supported on platforms. Choices:
|
|
enable PoE per port Choices:
|
|
Enables four pair mode for port. currently not supported on platforms. Choices:
|
|
Enables high power mode on a PSE port. currently not supported on platforms. Choices:
|
|
Name of the interface |
|
PoE power-classification mode for port. currently not supported on platforms. Choices:
|
|
The configured maximum power this port can provide to an attached device measured in Milliwatts. Range is 0-99900 inclusive. currently not supported on platforms. |
|
Controls the maximum power that a port can deliver. class-based means that the port power limit is as per the dot3af class of the powered device attached. user-defined means limit is specified by config. currently not supported on platforms. Choices:
|
|
PoE port power-pairs settings. currently not supported on platforms. Choices:
|
|
The mode configured for a PSE port to deliver high power. pre-dot3at means that a port is powered in the IEEE 802.3af mode initially, switched to the high-power IEEE 802.3at mode. dot3at means that a port is powered in the IEEE 802.3at mode. dot3bt, type3 and pre-dot3bt are to support 802.3bt interfaces. currently not supported on platforms. Choices:
|
|
PoE port priority in power management algorithm. Priority could be used by a control mechanism that prevents over current situations by disconnecting ports with lower power priority first. currently only ‘low’, ‘high’ and ‘critical’ values are supported Choices:
|
|
Enables spare pair power for port. currently not supported on platforms. Choices:
|
|
The state of the configuration after module completion Choices:
|
Examples
# Using merged to add or change poe global settings
# Before state:
# config:
# global:
# auto_reset: False
# Example:
- name: "add poe global settings"
sonic_poe:
config:
global:
auto_reset: True
power_mgmt_model: 'class'
usage_threshold: 300
state: merged
# After state:
# config:
# global:
# auto_reset: True
# power_mgmt_model: 'class'
# usage_threshold: 300
# ------
# Using merged to add cards
# Note that platform must support adding multiple cards to do this
# Before state:
# config:
# global:
# auto_reset: True
# Example:
- name: "add poe cards"
sonic_poe:
config:
cards:
- card_id: 0
usage_threshold: 39
state: merged
# After state:
# config:
# global:
# auto_reset: True
# cards:
# - card_id: 0
# usage_threshold: 39
# ------
# Using merged to add or change card settings
# Before state:
# config:
# cards:
# - card_id: 0
# usage_threshold: 39
# Example:
- name: "add poe cards settings"
sonic_poe:
config:
cards:
- card_id: 0
usage_threshold: 60
power_mgmt_model: dymanic
state: merged
# After state:
# config:
# cards:
# - card_id: 0
# usage_threshold: 60
# power_mgmt_model: dymanic
# ------
# Using merged to add interfaces
# Before state:
# config: {}
# Example:
- name: "add poe interfaces"
sonic_poe:
config:
interfaces:
- name: Ethernet0
enabled: True
state: merged
# After state:
# config:
# interfaces:
# - name: Ethernet0
# enabled: True
# ------
# Using merged to add or change interface settings
# Before state:
# config:
# interfaces:
# - name: Ethernet0
# enabled: True
# disconnect_type: dc
# Example:
- name: "add poe interface settings"
sonic_poe:
config:
interfaces:
- name: Ethernet0
four_pair: True
high_power: True
detection: dot3bt
power_classification: normal
power_limit: 5000
power_limit_type: class-based
power_pairs: signal
power_up_mode: dot3bt
priority: medium
use_spare_pair: False
disconnect_type: ac
state: merged
# After state:
# config:
# interfaces:
# - name: Ethernet0
# four_pair: True
# high_power: True
# detection: dot3bt
# power_classification: normal
# power_limit: 5000
# power_limit_type: class-based
# power_pairs: signal
# power_up_mode: dot3bt
# priority: medium
# use_spare_pair: False
# disconnect_type: ac
# enabled: True
# ------
# Using deleted to remove poe global settings
# Before state:
# config:
# global:
# auto_reset: True
# power_mgmt_model: 'class'
# usage_threshold: 300
# Example:
- name: "delete matching poe global settings"
sonic_poe:
config:
global:
auto_reset: False
usage_threshold: 300
state: deleted
# After state:
# config:
# global:
# power_mgmt_model: 'class'
# auto_reset: True
# ------
# Using deleted to delete cards or card settings
# Note: to delete whole card, either need just the name or specify all current settings and values
# Before state:
# config:
# global:
# auto_reset: True
# cards:
# - card_id: 0
# usage_threshold: 39
# - card_id: 1
# auto_reset: True
# usage_threshold: 60
# power_mgmt_model: class
# - card_id: 2
# usage_threshold: 39
# power_mgmt_model: dymanic
# Example:
- name: "delete poe cards"
sonic_poe:
config:
cards:
- card_id: 0
- card_id: 1
auto_reset: True
usage_threshold: 60
power_mgmt_model: class
- card_id: 2
usage_threshold: 39
power_mgmt_model: static
state: deleted
# After state:
# config:
# global:
# auto_reset: True
# cards:
# - card_id: 2
# power_mgmt_model: dymanic
# ------
# Using deleted to delete interfaces or interface settings
# Note: to delete whole interface, either need just the name or specify all current settings and values
# Before state:
# config:
# interfaces:
# - name: Ethernet0
# enabled: True
# - name: Ethernet1
# enabled: False
# four_pair: True
# - name: Ethernet2
# detection: 4pt-dot3af+legacy
# power_up_mode: dot3bt
# use_spare_pair: True
# Example:
- name: "delete poe interfaces"
sonic_poe:
config:
interfaces:
- name: Ethernet0
- name: Ethernet1
enabled: False
four_pair: True
- name: Ethernet2
detection: 4pt-dot3af+legacy
power_up_mode: pre-dot3at
state: deleted
# After state:
# config:
# interfaces:
# - name: Ethernet2
# power_up_mode: dot3bt
# use_spare_pair: True
# ------
# Using deleted to clear all interfaces or cards
# Before state:
# config:
# cards:
# - card_id: 0
# usage_threshold: 39
# interfaces:
# - name: Ethernet0
# enabled: True
# Example:
- name: "clear poe interfaces and cards"
sonic_poe:
config:
interfaces: []
cards: []
state: deleted
# After state:
# config: {}
# ------
# Using deleted to delete attributes of interfaces or cards
# Before state:
# config:
# cards:
# - card_id: 1
# auto_reset: True
# usage_threshold: 60
# interfaces:
# - name: Ethernet1
# enabled: False
# four_pair: True
# power_classification: normal
# Example:
- name: "clear poe interfaces and cards"
sonic_poe:
config:
interfaces:
- name: Ethernet1
four_pair: True
cards:
- card_id: 1
usage_threshold: 60
state: deleted
# After state:
# config:
# interfaces:
# - name: Ethernet1
# enabled: False
# power_classification: normal
# cards:
# - card_id: 1
# auto_reset: True
# ------
# Using overridden to set poe config
# Before state:
# config:
# global:
# auto_reset: True
# power_mgmt_model: 'class'
# usage_threshold: 300
# interfaces:
# - name: Ethernet1
# power_classification: normal
# enabled: True
# cards:
# - card_id: 0
# usage_threshold: 60
# power_mgmt_model: dymanic
# Example:
- name: "overridden to exactly specified"
sonic_poe:
config:
global:
auto_reset: False
interfaces:
- name: Ethernet0
enabled: True
disconnect_type: ac
- name: Ethernet1
power_pairs: signal
state: overridden
# After state:
# config:
# global:
# auto_reset: False
# interfaces:
# - name: Ethernet0
# disconnect_type: ac
# enabled: True
# - name: Ethernet1
# power_pairs: signal
# ------
# Using replaced to replace sections of poe config
# Before state:
# config:
# global:
# auto_reset: True
# power_mgmt_model: 'class'
# usage_threshold: 300
# interfaces:
# - name: Ethernet1
# power_classification: normal
# enabled: True
# - name: Ethernet0
# enabled: True
# power_limit_type: class-based
# cards:
# - card_id: 0
# usage_threshold: 60
# power_mgmt_model: dymanic
# Example:
- name: "replace sections of config to exactly specified"
sonic_poe:
config:
global:
auto_reset: False
interfaces:
- name: Ethernet0
enabled: True
disconnect_type: ac
state: repalced
# After state:
# config:
# global:
# auto_reset: False
# interfaces:
# - name: Ethernet0
# disconnect_type: ac
# enabled: True
# cards:
# - card_id: 0
# usage_threshold: 60
# power_mgmt_model: dymanic
# ------
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The resulting configuration after module invocation. Returned: when changed Sample: |
|
The configuration prior to the module invocation. Returned: always Sample: |
|
The set of commands pushed to the remote device. Returned: always Sample: |