Skip to content

Add FBS classifiers model #284

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions models/enterprise_sonic/fbs_classifiers/deleted_example_01.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Using "deleted" state
#
# Before state:
# -------------
#
# sonic# show class-map
# Class-map class1 match-type fields
# Description: xyz
# Match:
# ethertype 0x8100
# src-mac 9a:8b:7c:6d:5e:4f/2a:4b:1c:9b:1e:0f
# dst-mac 1a:6c:3c:4f:40:22/26:44:8c:9d:4b:6f
# vlan 2
# pcp ic
# Referenced in flows:
#
# Class-map class2 match-type acl
# Description: abc
# Match:
# ip access-group acl1
# Referenced in flows:

- name: Delete FBS classifiers configuration
dellemc.enterprise_sonic.sonic_fbs_classifiers:
config:
- class_name: class1
class_description: xyz
match_hdr_fields:
l2:
source_mac: 9a:8b:7c:6d:5e:4f
source_mac_mask: 2a:4b:1c:9b:1e:0f
destination_mac: 1a:6c:3c:4f:40:22
destination_mac_mask: 26:44:8c:9d:4b:6f
ethertype: vlan
pcp: 6
vlanid: 2
- class_name: class2
state: deleted

# After state:
# ------------
#
# sonic# show class-map
# Class-map class1 match-type fields
# Description:
# Match:
# Referenced in flows:
32 changes: 32 additions & 0 deletions models/enterprise_sonic/fbs_classifiers/deleted_example_02.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Using "deleted" state
#
# Before state:
# -------------
#
# sonic# show class-map
# Class-map class1 match-type fields
# Description: xyz
# Match:
# ethertype 0x8100
# src-mac 9a:8b:7c:6d:5e:4f/2a:4b:1c:9b:1e:0f
# dst-mac 1a:6c:3c:4f:40:22/26:44:8c:9d:4b:6f
# vlan 2
# pcp ic
# Referenced in flows:
#
# Class-map class2 match-type acl
# Description: abc
# Match:
# ip access-group acl1
# Referenced in flows:

- name: Delete all FBS classifiers configuration
dellemc.enterprise_sonic.sonic_fbs_classifiers:
config:
state: deleted

# After state:
# ------------
#
# sonic# show class-map
# (No 'class-map' configuration present)
60 changes: 60 additions & 0 deletions models/enterprise_sonic/fbs_classifiers/merged_example_01.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Using "merged" state
#
# Before state:
# -------------
#
# sonic# show class-map
# (No 'class-map' configuration present)

- name: Merge FBS classifiers configuration
dellemc.enterprise_sonic.sonic_fbs_classifiers:
config:
- class_name: class1
class_description: xyz
match_type: fields
match_hdr_fields:
ip:
dscp: 0
protocol: tcp
ipv4:
source_address: 1.1.1.1/1
destination_address: 2.2.2.2/2
l2:
source_mac: 1a:2b:3c:4d:5e:6f
source_mac_mask: 6a:5b:4c:3d:2e:1f
destination_mac: 2a:4b:6c:8d:10:20
destination_mac_mask: 20:10:8d:6c:4b:2a
dei: 0
ethertype: ipv4
pcp: 0
vlanid: 1
transport:
source_port: 1..3
destination_port: 4..6
tcp_flags:
- ack
- fin
- psh
state: merged

# After state:
# ------------
#
# sonic# show class-map
# Class-map class1 match-type fields
# Description: xyz
# Match:
# ethertype ip
# src-mac 1a:2b:3c:4d:5e:6f/6a:5b:4c:3d:2e:1f
# dst-mac 2a:4b:6c:8d:10:20/20:10:8d:6c:4b:2a
# vlan 1
# pcp be
# dei 0
# ip protocol tcp
# src-ip 1.1.1.1/1
# dst-ip 2.2.2.2/2
# dscp default
# src-port 1-3
# dst-port 4-6
# tcp-flags fin psh ack
# Referenced in flows:
35 changes: 35 additions & 0 deletions models/enterprise_sonic/fbs_classifiers/overridden_example_01.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Using "overridden" state
#
# Before state:
# -------------
#
# sonic# show class-map
# Class-map class1 match-type fields
# Description: xyz
# Match:
# ethertype 0x8100
# src-mac 9a:8b:7c:6d:5e:4f/2a:4b:1c:9b:1e:0f
# dst-mac 1a:6c:3c:4f:40:22/26:44:8c:9d:4b:6f
# vlan 2
# pcp ic
# Referenced in flows:

- name: Override FBS classifiers configuration
dellemc.enterprise_sonic.sonic_fbs_classifiers:
config:
- class_name: class2
class_description: abc
match_type: acl
match_acl:
acl_name: acl1
acl_type: ip

# After state:
# ------------
#
# sonic# show class-map
# Class-map class2 match-type acl
# Description: abc
# Match:
# ip access-group acl1
# Referenced in flows:
64 changes: 64 additions & 0 deletions models/enterprise_sonic/fbs_classifiers/replaced_example_01.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Using "replaced" state
#
# Before state:
# -------------
#
# sonic# show class-map
# Class-map class1 match-type fields
# Description: xyz
# Match:
# ethertype ip
# src-mac 1a:2b:3c:4d:5e:6f/6a:5b:4c:3d:2e:1f
# dst-mac 2a:4b:6c:8d:10:20/20:10:8d:6c:4b:2a
# vlan 1
# pcp be
# dei 0
# ip protocol tcp
# src-ip 1.1.1.1/1
# dst-ip 2.2.2.2/2
# dscp default
# src-port 1-3
# dst-port 4-6
# tcp-flags fin psh ack
# Referenced in flows:
#
# Class-map class2 match-type acl
# Description: abc
# Match:
# ip access-group acl1
# Referenced in flows:

- name: Replace FBS classifiers configuration
dellemc.enterprise_sonic.sonic_fbs_classifiers:
config:
- class_name: class1
match_hdr_fields:
l2:
source_mac: 9a:8b:7c:6d:5e:4f
source_mac_mask: 2a:4b:1c:9b:1e:0f
destination_mac: 1a:6c:3c:4f:40:22
destination_mac_mask: 26:44:8c:9d:4b:6f
ethertype: vlan
pcp: 6
vlanid: 2
state: replaced

# After state:
# ------------
#
# sonic# show class-map
# Class-map class1 match-type fields
# Description: xyz
# Match:
# ethertype 0x8100
# src-mac 9a:8b:7c:6d:5e:4f/2a:4b:1c:9b:1e:0f
# dst-mac 1a:6c:3c:4f:40:22/26:44:8c:9d:4b:6f
# vlan 2
# pcp ic
# Referenced in flows:
#
# Class-map class2 match-type acl
# Description: abc
# Match:
# ip access-group acl1
# Referenced in flows:
Loading