dellemc.enterprise_sonic.sonic_ars module – Manage adaptive routing and switching (ARS) configuration 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_ars.

New in dellemc.enterprise_sonic 3.1.0

Synopsis

  • This module provides configuration management of ARS for devices running SONiC

Parameters

Parameter

Comments

config

dictionary

ARS configuration

ars_objects

list / elements=dictionary

List of ARS next-hop group objects configuration

idle_time

integer

Idle time in microseconds

Range 16-32767

max_flows

integer

Maximum number of flows that can be maintained by the ARS object

Choices:

  • 256

  • 512

  • 1024

  • 2048

  • 4096

  • 8192

  • 16384

  • 32768

mode

string

ARS path reassignment mode

Choices:

  • "fixed"

  • "flowlet-quality"

  • "flowlet-random"

  • "packet-quality"

  • "packet-random"

name

string / required

Name of next-hop group object

port_bindings

list / elements=dictionary

List of ARS port bindings configuration

name

string / required

Name of port

profile

string

ARS port profile to bind to port

Required for modifcation

port_profiles

list / elements=dictionary

List of ARS port profiles configuration

enable

boolean

Enable/disable ARS for the port

Choices:

  • false

  • true

load_future_weight

integer

Weight of future port load used in EWMA calculations

Range 1-16

load_past_weight

integer

Weight as a percentage of the past port load

Range 0-100

load_scaling_factor

float

Port load scaling factor

Choices:

  • 0.0

  • 1.0

  • 2.5

  • 4.0

  • 5.0

  • 10.0

  • 20.0

  • 40.0

  • 80.0

name

string / required

Name of port profile

profiles

list / elements=dictionary

List of ARS profiles configuration

algorithm

string

ARS algorithm used for quality computation

EWMA - Exponential Weighted Moving Average

Choices:

  • "EWMA"

load_current_max_val

integer

Maximum current load threshold value for the quantization process

Range 0-133169151

load_current_min_val

integer

Minimum current load threshold value for the quantization process

Range 0-133169151

load_future_max_val

integer

Maximum future load threshold value for the quantization process

Range 0-266338303

load_future_min_val

integer

Minimum future load threshold value for the quantization process

Range 0-266338303

load_past_max_val

integer

Maximum past load threshold value for the quantization process

Range 0-10000

load_past_min_val

integer

Minimum past load threshold value for the quantization process

Range 0-10000

name

string / required

Name of profile

port_load_current

boolean

Set port load to current sampled value when sampled value is less than the average

Choices:

  • false

  • true

port_load_exponent

integer

EWMA exponent used in port loading computation

Range 1-16

port_load_future

boolean

Enable/disable future port load, the average queued bytes measured on a port

Choices:

  • false

  • true

port_load_future_weight

integer

Weight of future port load used in EWMA calculations

Range 1-16

port_load_past

boolean

Enable/disable past port load, the average egress bytes measured on a port

Choices:

  • false

  • true

port_load_past_weight

integer

Weight of past port load used in EWMA calculations

Range 1-16

random_seed

integer

Random seed value

Range 0-16777214

sampling_interval

integer

Sampling interval in microseconds

Range 1-255

switch_binding

dictionary

ARS switch binding configuration

profile

string

ARS profile to bind to switch

state

string

The state of the configuration after module completion

Choices:

  • "merged" ← (default)

  • "deleted"

  • "replaced"

  • "overridden"

Notes

Note

  • Tested against Enterprise SONiC Distribution by Dell Technologies.

  • Supports check_mode.

Examples

# Using "merged" state
#
# Before state:
# -------------
#
# sonic# show running-configuration ars
# (No ARS configuration present)

- name: Merge ARS configuration
  dellemc.enterprise_sonic.sonic_ars:
    config:
      ars_objects:
        - name: obj1
          idle_time: 100
          max_flows: 1024
          mode: flowlet-quality
      port_profiles:
        - name: pp1
          enable: true
          load_future_weight: 9
          load_past_weight: 20
          load_scaling_factor: 0
      profiles:
        - name: p1
          algorithm: EWMA
          load_current_max_val: 10000
          load_current_min_val: 100
          load_future_max_val: 20000
          load_future_min_val: 200
          load_past_max_val: 500
          load_past_min_val: 50
          port_load_current: true
          port_load_exponent: 7
          port_load_future: true
          port_load_future_weight: 9
          port_load_past: true
          port_load_past_weight: 11
          random_seed: 800000
          sampling_interval: 140
      port_bindings:
        - name: Ethernet20
          profile: pp1
      switch_binding:
        profile: p1
    state: merged

# After state:
# ------------
#
# sonic# show running-configuration ars
# ars profile p1
#  sampling-interval 140
#  random-seed 800000
#  port-load-past-weight 11
#  port-load-future-weight 9
#  port-load-current
#  port-load-exponent 7
#  load-past-min-val 50
#  load-past-max-val 500
#  load-future-min-val 200
#  load-future-max-val 20000
#  load-current-min-val 100
#  load-current-max-val 10000
# !
# ars port-profile pp1
#  enable
#  load-past-weight 20
#  load-future-weight 9
# !
# ars object obj1
#  idle-time 100
#  max-flows 1024
# !
# interface Ethernet20
#  mtu 9100
#  speed 400000
#  fec RS
#  unreliable-los auto
#  shutdown
#  ars bind pp1
# !
# ars bind profile p1


# Using "replaced" state
#
# Before state:
# -------------
#
# sonic# show running-configuration ars
# ars profile p1
#  sampling-interval 140
#  random-seed 800000
#  port-load-past-weight 11
#  port-load-future-weight 9
#  port-load-current
#  port-load-exponent 7
#  load-past-min-val 50
#  load-past-max-val 500
#  load-future-min-val 200
#  load-future-max-val 20000
#  load-current-min-val 100
#  load-current-max-val 10000
# !
# ars port-profile pp1
#  enable
#  load-past-weight 20
#  load-future-weight 9
# !
# ars object obj1
#  idle-time 100
#  max-flows 1024
# !
# interface Ethernet20
#  mtu 9100
#  speed 400000
#  fec RS
#  unreliable-los auto
#  shutdown
#  ars bind pp1
# !
# ars bind profile p1

- name: Replace ARS configuration
  dellemc.enterprise_sonic.sonic_ars:
    config:
      port_profiles:
        - name: pp2
          enable: true
          load_future_weight: 8
          load_past_weight: 15
      port_bindings:
        - name: Ethernet20
          profile: pp2
    state: replaced

# After state:
# ------------
#
# sonic# show running-configuration ars
# ars profile p1
#  sampling-interval 140
#  random-seed 800000
#  port-load-past-weight 11
#  port-load-future-weight 9
#  port-load-current
#  port-load-exponent 7
#  load-past-min-val 50
#  load-past-max-val 500
#  load-future-min-val 200
#  load-future-max-val 20000
#  load-current-min-val 100
#  load-current-max-val 10000
# !
# ars port-profile pp2
#  enable
#  load-past-weight 15
#  load-future-weight 8
# !
# ars object obj1
#  idle-time 100
#  max-flows 1024
# !
# interface Ethernet20
#  mtu 9100
#  speed 400000
#  fec RS
#  unreliable-los auto
#  shutdown
#  ars bind pp2
# !
# ars bind profile p1


# Using "overridden" state
#
# Before state:
# -------------
#
# sonic# show running-configuration ars
# ars profile p1
#  sampling-interval 140
#  random-seed 800000
#  port-load-past-weight 11
#  port-load-future-weight 9
#  port-load-current
#  port-load-exponent 7
#  load-past-min-val 50
#  load-past-max-val 500
#  load-future-min-val 200
#  load-future-max-val 20000
#  load-current-min-val 100
#  load-current-max-val 10000
# !
# ars port-profile pp2
#  enable
#  load-past-weight 15
#  load-future-weight 8
# !
# ars object obj1
#  idle-time 100
#  max-flows 1024
# !
# interface Ethernet20
#  mtu 9100
#  speed 400000
#  fec RS
#  unreliable-los auto
#  shutdown
#  ars bind pp1
# !
# ars bind profile p1

- name: Override ARS configuration
  dellemc.enterprise_sonic.sonic_ars:
    config:
      ars_objects:
        - name: obj4
          idle_time: 65
          max_flows: 4096
          mode: flowlet-quality
    state: overridden

# After state:
# ------------
#
# sonic# show running-configuration ars
# ars object obj4
#  idle-time 65
#  max-flows 4096


# Using "deleted" state
#
# Before state:
# -------------
#
# sonic# show running-configuration ars
# ars profile p1
#  sampling-interval 140
#  random-seed 800000
#  port-load-past-weight 11
#  port-load-future-weight 9
#  port-load-current
#  port-load-exponent 7
#  load-past-min-val 50
#  load-past-max-val 500
#  load-future-min-val 200
#  load-future-max-val 20000
#  load-current-min-val 100
#  load-current-max-val 10000
# !
# ars port-profile pp2
#  enable
#  load-past-weight 15
#  load-future-weight 8

- name: Delete specified ARS configuration
  dellemc.enterprise_sonic.sonic_ars:
    config:
      port_profiles:
        - name: pp2
      profiles:
        - name: p1
          load_current_max_val: 10000
          load_future_max_val: 20000
          load_past_max_val: 500
          random_seed: 800000
          sampling_interval: 140
    state: deleted

# After state:
# ------------
#
# sonic# show running-configuration ars
# ars profile p1
#  port-load-past-weight 11
#  port-load-future-weight 9
#  port-load-current
#  port-load-exponent 7
#  load-past-min-val 50
#  load-future-min-val 200
#  load-current-min-val 100


# Using "deleted" state
#
# Before state:
# -------------
#
# sonic# show running-configuration ars
# ars profile p1
#  sampling-interval 140
#  random-seed 800000
#  port-load-past-weight 11
#  port-load-future-weight 9
#  port-load-current
#  port-load-exponent 7
#  load-past-min-val 50
#  load-past-max-val 500
#  load-future-min-val 200
#  load-future-max-val 20000
#  load-current-min-val 100
#  load-current-max-val 10000
# !
# ars port-profile pp1
#  enable
#  load-past-weight 20
#  load-future-weight 9
# !
# ars object obj1
#  idle-time 100
#  max-flows 1024
# !
# interface Ethernet20
#  mtu 9100
#  speed 400000
#  fec RS
#  unreliable-los auto
#  shutdown
#  ars bind pp1
# !
# ars bind profile p1

- name: Delete all ARS configuration
  dellemc.enterprise_sonic.sonic_ars:
    config:
    state: deleted

# After state:
# ------------
#
# sonic# show running-configuration ars
# (No ARS configuration present)

Return Values

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

Key

Description

after

dictionary

The configuration resulting from module invocation.

Returned: when changed

after(generated)

dictionary

The generated configuration from module invocation.

Returned: when check_mode

before

dictionary

The configuration prior to the module invocation.

Returned: always

commands

list / elements=string

The set of commands pushed to the remote device.

Returned: always

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

Authors

    1. Talabi (@stalabi1)