dellemc.enterprise_sonic.sonic_pim_global module – Manage global 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_global.

New in dellemc.enterprise_sonic 2.5.0

Synopsis

  • This module provides configuration management of global PIM parameters for devices running SONiC.

  • VRF and prefix-list need to be created earlier in the device.

Parameters

Parameter

Comments

config

list / elements=dictionary

Specifies global PIM configurations.

ecmp_enable

boolean

Enable PIM ECMP.

Choices:

  • false

  • true

ecmp_rebalance_enable

boolean

Enable PIM ECMP rebalance.

ECMP has to be enabled for configuring ECMP rebalance.

Choices:

  • false

  • true

join_prune_interval

integer

Specifies the PIM Join Prune Interval in seconds.

The range is from 60 to 600.

keepalive_timer

integer

Specifies the PIM Keepalive timer in seconds.

The range is from 31 to 60000.

ssm_prefix_list

string

Specifies the SSM prefix-list.

vrf_name

string

Name of the VRF to which the PIM configurations belong.

Default: "default"

state

string

The state of the configuration after module completion.

merged - Merges provided global PIM configuration with on-device configuration.

replaced - Replaces on-device PIM configuration of the specified VRFs with provided configuration.

overridden - Overrides all on-device global PIM configurations with the provided configuration.

deleted - Deletes on-device global PIM configuration.

Choices:

  • "merged" ← (default)

  • "deleted"

  • "replaced"

  • "overridden"

Notes

Note

  • Supports check_mode.

Examples

# Using deleted
#
# Before State:
# -------------
#
# sonic# show running-configuration | grep "ip pim"
# ip pim vrf VrfReg1 join-prune-interval 60
# ip pim vrf VrfReg1 keep-alive-timer 180
# ip pim vrf VrfReg1 ssm prefix-list prefix-list-1
# ip pim vrf VrfReg2 ecmp
# ip pim vrf VrfReg2 ssm prefix-list prefix-list-2
# ip pim vrf default ecmp
# ip pim vrf default ecmp rebalance
# sonic#

  - name: Delete specified global PIM configurations
    dellemc.enterprise_sonic.sonic_pim_global:
      config:
        - vrf_name: 'VrfReg1'
          join_prune_interval: 60
          keepalive_timer: 180
        - vrf_name: 'VrfReg2'
      state: deleted

# After State:
# ------------
#
# sonic# show running-configuration | grep "ip pim"
# ip pim vrf VrfReg1 ssm prefix-list prefix-list-1
# ip pim vrf default ecmp
# ip pim vrf default ecmp rebalance
# sonic#


# Using deleted
#
# Before State:
# -------------
#
# sonic# show running-configuration | grep "ip pim"
# ip pim vrf VrfReg1 join-prune-interval 60
# ip pim vrf VrfReg1 keep-alive-timer 180
# ip pim vrf VrfReg1 ssm prefix-list prefix-list-1
# ip pim vrf VrfReg2 ecmp
# ip pim vrf VrfReg2 ssm prefix-list prefix-list-2
# ip pim vrf default ecmp
# ip pim vrf default ecmp rebalance
# sonic#

  - name: Delete all global PIM configurations
    dellemc.enterprise_sonic.sonic_pim_global:
      config:
      state: deleted

# After State:
# ------------
#
# sonic# show running-configuration | grep "ip pim"
# sonic#


# Using merged
#
# Before State:
# -------------
#
# sonic# show running-configuration | grep "ip pim"
# ip pim vrf default join-prune-interval 120
# ip pim vrf default keep-alive-timer 360
# ip pim vrf default ssm prefix-list prefix-list-1
# sonic#

  - name: Merge provided global PIM configurations
    dellemc.enterprise_sonic.sonic_pim_global:
      config:
        - vrf_name: 'default'
          ecmp_enable: true
          ecmp_rebalance_enable: true
          join_prune_interval: 60
          keepalive_timer: 180
          ssm_prefix_list: 'prefix-list-def'
        - vrf_name: 'VrfReg1'
          join_prune_interval: 60
          keepalive_timer: 180
        - vrf_name: 'VrfReg2'
          ssm_prefix_list: 'prefix-list-2'
      state: merged

# After State:
# ------------
#
# sonic# show running-configuration | grep "ip pim"
# ip pim vrf VrfReg1 join-prune-interval 60
# ip pim vrf VrfReg1 keep-alive-timer 180
# ip pim vrf VrfReg2 ssm prefix-list prefix-list-2
# ip pim vrf default ecmp
# ip pim vrf default ecmp rebalance
# ip pim vrf default join-prune-interval 60
# ip pim vrf default keep-alive-timer 180
# ip pim vrf default ssm prefix-list prefix-list-def
# sonic#


# Using replaced
#
# Before State:
# -------------
#
# sonic# show running-configuration | grep "ip pim"
# ip pim vrf VrfReg1 join-prune-interval 60
# ip pim vrf VrfReg1 keep-alive-timer 180
# ip pim vrf VrfReg1 ssm prefix-list prefix-list-1
# ip pim vrf VrfReg2 ecmp
# ip pim vrf VrfReg2 ssm prefix-list prefix-list-2
# ip pim vrf default ecmp
# ip pim vrf default ecmp rebalance
# sonic#

  - name: Replace global PIM configurations of specified VRFs
    dellemc.enterprise_sonic.sonic_pim_global:
      config:
        - vrf_name: 'default'
          ecmp_enable: true
        - vrf_name: 'VrfReg1'
          join_prune_interval: 120
          keepalive_timer: 360
      state: replaced

# After State:
# ------------
#
# sonic# show running-configuration | grep "ip pim"
# ip pim vrf VrfReg1 join-prune-interval 120
# ip pim vrf VrfReg1 keep-alive-timer 360
# ip pim vrf VrfReg2 ecmp
# ip pim vrf VrfReg2 ssm prefix-list prefix-list-2
# ip pim vrf default ecmp
# sonic#


# Using replaced
#
# Before State:
# -------------
#
# sonic# show running-configuration | grep "ip pim"
# ip pim vrf VrfReg1 join-prune-interval 60
# ip pim vrf VrfReg1 keep-alive-timer 180
# ip pim vrf VrfReg1 ssm prefix-list prefix-list-1
# ip pim vrf VrfReg2 ecmp
# ip pim vrf VrfReg2 ssm prefix-list prefix-list-2
# ip pim vrf default ecmp
# ip pim vrf default ecmp rebalance
# sonic#

  - name: Override global PIM configurations
    dellemc.enterprise_sonic.sonic_pim_global:
      config:
        - vrf_name: 'default'
          ecmp_enable: true
        - vrf_name: 'VrfReg1'
          join_prune_interval: 120
          keepalive_timer: 360
      state: overridden

# After State:
# ------------
#
# sonic# show running-configuration | grep "ip pim"
# ip pim vrf VrfReg1 join-prune-interval 120
# ip pim vrf VrfReg1 keep-alive-timer 360
# ip pim vrf default ecmp
# sonic#

Return Values

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

Key

Description

after

list / elements=string

The resulting configuration on module invocation.

Returned: when changed

Sample: ["The configuration returned will always be in the same format\n as the parameters above.\n"]

after(generated)

list / elements=string

The generated configuration on module invocation.

Returned: when check_mode

Sample: ["The configuration returned will always be in the same format\n as the parameters above.\n"]

before

list / elements=string

The configuration prior to the module invocation.

Returned: always

Sample: ["The configuration returned will always be in the same format\n as the parameters above.\n"]

commands

list / elements=string

The set of commands pushed to the remote device.

Returned: always

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

Authors

  • Arun Saravanan Balachandran (@ArunSaravananBalachandran)