dellemc.enterprise_sonic.sonic_fbs_policies module – Manage flow based services (FBS) policies 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_fbs_policies.
New in dellemc.enterprise_sonic 3.1.0
Synopsis
This module provides configuration management of FBS policies for devices running SONiC
Parameters
Parameter |
Comments |
|---|---|
FBS policies configuration |
|
Description of policy |
|
Name of policy |
|
Type of policy Choices:
|
|
Policy sections configuration |
|
ACL CoPP configuration policy_type must be configured to or |
|
CPU queue index, range 0-31 |
|
Traffic policing configuration |
|
Committed burst size measured Bps, range 1-4294967295 |
|
Committed information rate measured in bps, range 1-4294967295 |
|
Peak burst size measured in Bps, range 1-4294967295 |
|
Peak information rate measured in bps, range 1-4294967295 |
|
Name of classifier |
|
Forwarding actions configuration policy_type must be configured to |
|
Enable/disable adaptive routing and switching forwarding Functional default is Choices:
|
|
Egress interfaces configuration |
|
Name of interface |
|
Priority of the egress interfaces to be selected for forwarding, range 1-65535 |
|
Next hop groups configuration for L3 forwarding |
|
Name of next hop group |
|
Type of next hop group Choices:
|
|
Priority of the next hop group to be selected for forwarding, range 1-65535 |
|
Next hops configuration for L3 forwarding |
|
Forwarding IP/IPv6 address |
|
Priority of the next hop to be selected for forwarding, range 1-65535 |
|
Forwarding network instance |
|
Replication groups configuration for L3 forwarding |
|
Name of replication group |
|
Type of replication group Choices:
|
|
Priority of the replication group to be selected for forwarding, range 1-65535 |
|
Mirroring sessions configuration policy_type must be configured to |
|
Name of the mirror session |
|
Flow priority in the policy, range 0-4095 |
|
QoS action configuration policy_type must be configured to |
|
Output queue index, range 0-7 |
|
Traffic policing configuration |
|
Committed burst size measured Bps, range 1-4294967295 |
|
Committed information rate measured in bps, range 1-4294967295 |
|
Peak burst size measured in Bps, range 1-4294967295 |
|
Peak information rate measured in bps, range 1-4294967295 |
|
Remark configuration |
|
Set Dot1p remarking value, range 0-7 |
|
Set DSCP remarking value, range 0-63 |
|
Description of section |
|
The state of the configuration after module completion Choices:
|
Notes
Note
Tested against Enterprise SONiC Distribution by Dell Technologies.
Supports
check_mode.
Examples
# Using "merged" state
#
# Before state:
# -------------
#
# sonic# show running-configuration policy-map
# (No policy-map configuration present)
- name: Merge FBS policies configuration
dellemc.enterprise_sonic.sonic_fbs_policies:
config:
- policy_name: policy1
policy_description: abc
policy_type: forwarding
sections:
- class: class1
forwarding:
ars_disable: true
egress_interfaces:
- intf_name: Ethernet96
priority: 1
priority: 0
section_description: xyz
- policy_name: policy2
policy_description: qwerty
policy_type: acl-copp
sections:
- class: class1
acl_copp:
cpu_queue_index: 0
policer:
cbs: 80
cir: 75
pbs: 95
pir: 96
priority: 0
- policy_name: policy3
policy_description: 'this is policy 3'
policy_type: qos
sections:
- class: class1
qos:
output_queue_index: 0
policer:
cbs: 15
cir: 20
pbs: 21
pir: 24
remark:
set_dot1p: 0
set_dscp: 0
priority: 0
- policy_name: policy4
policy_description: 'this is policy 4'
policy_type: monitoring
sections:
- class: class1
mirror_sessions:
- session_name: session1
priority: 0
- policy_name: policy5
policy_description: abc
policy_type: forwarding
sections:
- class: class1
forwarding:
next_hops:
- address: 1.1.1.1
vrf: default
priority: 1
next_hop_groups:
- group_name: hop1
group_type: ipv4
priority: 1
replication_groups:
- group_name: rep1
group_type: ipv4
priority: 1
priority: 0
section_description: 'section for class1'
state: merged
# After state:
# ------------
#
# sonic# show running-configuration policy-map
# !
# policy-map policy1 type forwarding
# description abc
# class class1 priority 0
# description xyz
# set interface Ethernet96 priority 1
# set ars disable
# !
# !
# policy-map policy2 type acl-copp
# description qwerty
# class class1 priority 0
# set trap-queue 0
# police cir 75 cbs 80 pir 96 pbs 95
# !
# !
# policy-map policy3 type qos
# description "this is policy 3"
# class class1 priority 0
# set pcp 0
# set dscp 0
# set traffic-class 0
# police cir 20 cbs 15 pir 24 pbs 21
# !
# !
# policy-map policy4 type monitoring
# description "this is policy 4"
# class class1 priority 0
# set mirror-session session1
# !
# !
# policy-map policy5 type forwarding
# description abc
# class class1 priority 0
# description "section for class1"
# set ip next-hop 1.1.1.1 vrf default priority 1
# set ip next-hop-group hop1 priority 1
# set ip replication-group rep1 priority 1
# !
# Using "replaced" state
#
# Before state:
# -------------
#
# sonic# show running-configuration policy-map
# !
# policy-map policy1 type forwarding
# description abc
# class class1 priority 0
# description xyz
# set interface Ethernet20 priority 1
# set ars disable
# !
# !
# policy-map policy2 type acl-copp
# description qwerty
# class class1 priority 0
# set trap-queue 0
# police cir 75 cbs 80 pir 96 pbs 95
# !
- name: Replace FBS policies configuration
dellemc.enterprise_sonic.sonic_fbs_policies:
config:
- policy_name: policy1
policy_description: 'abc123'
policy_type: monitoring
sections:
- class: class1
mirror_sessions:
- session_name: mirror1
priority: 0
state: replaced
# After state:
# ------------
#
# sonic# show running-configuration policy-map
# !
# policy-map policy1 type monitoring
# description "abc123"
# class class1 priority 0
# set mirror-session mirror1
# !
# !
# policy-map policy2 type acl-copp
# description qwerty
# class class1 priority 0
# set trap-queue 0
# police cir 75 cbs 80 pir 96 pbs 95
# !
# Using "overridden" state
#
# Before state:
# -------------
#
# sonic# show running-configuration policy-map
# !
# policy-map policy1 type forwarding
# description abc
# class class1 priority 0
# description xyz
# set interface Ethernet20 priority 1
# set ars disable
# !
- name: Override FBS policies configuration
dellemc.enterprise_sonic.sonic_fbs_policies:
config:
- policy_name: policy2
policy_description: qwerty
policy_type: copp
sections:
- class: class1
acl_copp:
cpu_queue_index: 0
policer:
cbs: 80
cir: 75
pbs: 95
pir: 96
priority: 0
state: overridden
# After state:
# ------------
#
# sonic# show running-configuration policy-map
# !
# policy-map policy2 type acl-copp
# description qwerty
# class class1 priority 0
# set trap-queue 0
# police cir 75 cbs 80 pir 96 pbs 95
# !
# Using "deleted" state
#
# Before state:
# -------------
#
# sonic# show running-configuration policy-map
# !
# policy-map policy1 type forwarding
# description abc
# class class1 priority 0
# description xyz
# set interface Ethernet20 priority 1
# set ars disable
# !
# !
# policy-map policy2 type acl-copp
# description qwerty
# class class1 priority 0
# set trap-queue 0
# police cir 75 cbs 80 pir 96 pbs 95
# !
# !
# policy-map policy3 type monitoring
# description "this is policy 3"
# class class1 priority 0
# set mirror-session mirror1
# !
- name: Delete FBS policies configuration
dellemc.enterprise_sonic.sonic_fbs_policies:
config:
- policy_name: policy1
- policy_name: policy2
sections:
- class: class1
acl_copp:
policer:
cbs: 80
cir: 75
pbs: 95
pir: 96
- policy_name: policy3
sections:
- class: class1
state: deleted
# After state:
# ------------
#
# sonic# show running-configuration policy-map
# !
# policy-map policy2 type acl-copp
# description qwerty
# class class1 priority 0
# set trap-queue 0
# !
# !
# policy-map policy3 type monitoring
# description "this is policy 3"
# !
# Using "deleted" state
#
# Before state:
# -------------
#
# sonic# show running-configuration policy-map
# !
# policy-map policy2 type acl-copp
# description qwerty
# class class1 priority 0
# set trap-queue 0
# !
# !
# policy-map policy3 type monitoring
# description "this is policy 3"
# !
- name: Delete all FBS policies configuration
dellemc.enterprise_sonic.sonic_fbs_policies:
config:
state: deleted
# After state:
# -------------
#
# sonic# show running-configuration policy-map
# (No policy-map configuration present)
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
The configuration resulting from module invocation. Returned: when changed |
|
The generated configuration from module invocation. Returned: when |
|
The configuration prior to the module invocation. Returned: always |
|
The set of commands pushed to the remote device. Returned: always Sample: |