dellemc.enterprise_sonic.sonic_pim_interfaces module – Manage interface-specific PIM configurations 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_pim_interfaces
.
New in dellemc.enterprise_sonic 2.5.0
Synopsis
This module provides configuration management of interface-specific PIM parameters for devices running SONiC.
BFD profiles need to be created earlier in the device.
Parameters
Parameter |
Comments |
---|---|
Specifies interface-specific PIM configurations. |
|
Enable BFD support for PIM. Choices:
|
|
Specifies the BFD profile to be enabled. BFD support for PIM has to be enabled for configuring BFD profile. |
|
Specifies the Designated Router Priority. The range is from 1 to 4294967295. |
|
Specifies the Hello interval in seconds. The range is from 1 to 255. |
|
Full name of the interface. |
|
Enable PIM sparse-mode. Choices:
|
|
The state of the configuration after module completion.
Choices:
|
Notes
Note
Supports
check_mode
.
Examples
# Using deleted
#
# Before State:
# -------------
#
# sonic# show running-configuration interface Eth 1/1 | grep "ip pim"
# ip pim sparse-mode
# ip pim drpriority 10
# ip pim hello 60
# ip pim bfd
# ip pim bfd profile profile_1
# sonic# show running-configuration interface Eth 1/2 | grep "ip pim"
# ip pim hello 60
# ip pim bfd
# sonic#
- name: Delete specified interface PIM configurations
dellemc.enterprise_sonic.sonic_pim_interfaces:
config:
- name: 'Eth1/1'
hello_interval: 60
bfd_profile: profile_1
- name: 'Eth1/2'
state: deleted
# After State:
# ------------
#
# sonic# show running-configuration interface Eth 1/1 | grep "ip pim"
# ip pim sparse-mode
# ip pim drpriority 10
# ip pim bfd
# sonic# show running-configuration interface Eth 1/2 | grep "ip pim"
# sonic#
# Using deleted
#
# Before State:
# -------------
#
# sonic# show running-configuration interface Eth 1/1 | grep "ip pim"
# ip pim sparse-mode
# ip pim drpriority 10
# ip pim hello 60
# ip pim bfd
# ip pim bfd profile profile_1
# sonic# show running-configuration interface Eth 1/2 | grep "ip pim"
# ip pim hello 60
# ip pim bfd
# sonic#
- name: Delete all interface-specific PIM configurations
dellemc.enterprise_sonic.sonic_pim_interfaces:
config:
state: deleted
# After State:
# ------------
#
# sonic# show running-configuration interface Eth 1/1 | grep "ip pim"
# sonic# show running-configuration interface Eth 1/2 | grep "ip pim"
# sonic#
# Using merged
#
# Before State:
# -------------
#
# sonic# show running-configuration interface Eth 1/1 | grep "ip pim"
# ip pim sparse-mode
# ip pim hello 45
# sonic# show running-configuration interface Eth 1/2 | grep "ip pim"
# sonic#
- name: Merge provided interface PIM configurations
dellemc.enterprise_sonic.sonic_pim_interfaces:
config:
- name: 'Eth1/1'
drpriority: 10
hello_interval: 60
bfd_enable: true
bfd_profile: profile_1
- name: 'Eth1/2'
hello_interval: 60
bfd_enable: true
state: merged
# After State:
# ------------
#
# sonic# show running-configuration interface Eth 1/1 | grep "ip pim"
# ip pim sparse-mode
# ip pim drpriority 10
# ip pim hello 60
# ip pim bfd
# ip pim bfd profile profile_1
# sonic# show running-configuration interface Eth 1/2 | grep "ip pim"
# ip pim hello 60
# ip pim bfd
# sonic#
# Using replaced
#
# Before State:
# -------------
#
# sonic# show running-configuration interface Eth 1/1 | grep "ip pim"
# ip pim sparse-mode
# ip pim drpriority 10
# ip pim hello 45
# ip pim bfd
# ip pim bfd profile profile_1
# sonic# show running-configuration interface Eth 1/2 | grep "ip pim"
# ip pim hello 60
# ip pim bfd
# sonic#
- name: Replace PIM configurations for specified interfaces
dellemc.enterprise_sonic.sonic_pim_interfaces:
config:
- name: 'Eth1/1'
hello_interval: 60
bfd_enable: true
bfd_profile: profile_1
state: replaced
# After State:
# ------------
#
# sonic# show running-configuration interface Eth 1/1 | grep "ip pim"
# ip pim hello 60
# ip pim bfd
# ip pim bfd profile profile_1
# sonic# show running-configuration interface Eth 1/2 | grep "ip pim"
# ip pim hello 60
# ip pim bfd
# sonic#
# Using overridden
#
# Before State:
# -------------
#
# sonic# show running-configuration interface Eth 1/1 | grep "ip pim"
# ip pim sparse-mode
# ip pim drpriority 10
# ip pim hello 45
# ip pim bfd
# ip pim bfd profile profile_1
# sonic# show running-configuration interface Eth 1/2 | grep "ip pim"
# ip pim hello 60
# ip pim bfd
# sonic#
- name: Override interface-specific PIM configurations
dellemc.enterprise_sonic.sonic_pim_interfaces:
config:
- name: 'Eth1/1'
hello_interval: 60
bfd_enable: true
bfd_profile: profile_1
state: overridden
# After State:
# ------------
#
# sonic# show running-configuration interface Eth 1/1 | grep "ip pim"
# ip pim hello 60
# ip pim bfd
# ip pim bfd profile profile_1
# sonic# show running-configuration interface Eth 1/2 | grep "ip pim"
# sonic#
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The resulting configuration on module invocation. Returned: when changed Sample: |
|
The generated configuration on 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: |