Skip to content
Merged
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
1 change: 1 addition & 0 deletions dockers/docker-orchagent/enable_counters.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def enable_counters():
enable_counter_group(db, 'QUEUE_WATERMARK')
enable_counter_group(db, 'BUFFER_POOL_WATERMARK')
enable_counter_group(db, 'PORT_BUFFER_DROP')
enable_counter_group(db, 'ACL')
enable_rates()


Expand Down
7 changes: 7 additions & 0 deletions files/build_templates/init_cfg.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
{% endfor %}
}
},
"FLEX_COUNTER_TABLE": {
"ACL": {
"FLEX_COUNTER_STATUS": "enable",
"FLEX_COUNTER_DELAY_STATUS": "true",
"POLL_INTERVAL": "10000"
}
},
{%- set features = [("bgp", "enabled", false, "enabled"),
("database", "always_enabled", false, "always_enabled"),
("lldp", "enabled", false, "enabled"),
Expand Down
11 changes: 11 additions & 0 deletions src/sonic-config-engine/config_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@
else:
UNICODE_TYPE = unicode

def generate_common_config(data):
data['FLEX_COUNTER_TABLE'] = {
'ACL': {
'FLEX_COUNTER_STATUS': 'disable',
'FLEX_COUNTER_DELAY_STATUS': 'true',
'POLL_INTERVAL': '10000'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stepanblyschak Could you please help? What could be the possible POLL_INTERVAL range?

}
}
return data

# The following config generation methods exits:
# 't1': generate_t1_sample_config,
# 'l2': generate_l2_config,
Expand Down Expand Up @@ -160,5 +170,6 @@ def get_available_config():
return list(_sample_generators.keys())

def generate_sample_config(data, setting_name):
data = generate_common_config(data)
return _sample_generators[setting_name.lower()](data)

11 changes: 9 additions & 2 deletions src/sonic-config-engine/data/l1intf.j2
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
{
"DEVICE_METADATA": {
"localhost" : {
"hwsku" : "{{ DEVICE_METADATA.localhost.hwsku }}"
}
"hwsku" : "{{ DEVICE_METADATA.localhost.hwsku }}"
}
},
"FLEX_COUNTER_TABLE": {
"ACL": {
"FLEX_COUNTER_STATUS": "disable",
"FLEX_COUNTER_DELAY_STATUS": "true",
"POLL_INTERVAL": "10000"
}
},
{% set ns = {'firstPrinted': False} -%}
"PORT": {
Expand Down
7 changes: 7 additions & 0 deletions src/sonic-config-engine/data/l2switch.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{
"DEVICE_METADATA": {{ DEVICE_METADATA | tojson }},
"FLEX_COUNTER_TABLE": {
"ACL": {
"FLEX_COUNTER_STATUS": "disable",
"FLEX_COUNTER_DELAY_STATUS": "true",
"POLL_INTERVAL": "10000"
}
},
{% set ns = {'firstPrinted': False} -%}
"PORT": {
{%- for key, value in PORT.items() -%}
Expand Down
11 changes: 9 additions & 2 deletions src/sonic-config-engine/data/l3intf.j2
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
{
"DEVICE_METADATA": {
"localhost" : {
"hwsku" : "{{ DEVICE_METADATA.localhost.hwsku }}"
}
"hwsku" : "{{ DEVICE_METADATA.localhost.hwsku }}"
}
},
"FLEX_COUNTER_TABLE": {
"ACL": {
"FLEX_COUNTER_STATUS": "disable",
"FLEX_COUNTER_DELAY_STATUS": "true",
"POLL_INTERVAL": "10000"
}
},
{% set ns = {'firstPrinted': False} -%}
"PORT": {
Expand Down
7 changes: 7 additions & 0 deletions src/sonic-config-engine/tests/sample_output/py2/l1_intfs.json
Original file line number Diff line number Diff line change
Expand Up @@ -257,5 +257,12 @@
"mtu": "9100",
"speed": "100000"
}
},
"FLEX_COUNTER_TABLE": {
"ACL": {
"FLEX_COUNTER_STATUS": "disable",
"FLEX_COUNTER_DELAY_STATUS": "true",
"POLL_INTERVAL": "10000"
}
}
}
7 changes: 7 additions & 0 deletions src/sonic-config-engine/tests/sample_output/py2/l2switch.json
Original file line number Diff line number Diff line change
Expand Up @@ -264,5 +264,12 @@
"Vlan1000|Ethernet24": {
"tagging_mode": "untagged"
}
},
"FLEX_COUNTER_TABLE": {
"ACL": {
"FLEX_COUNTER_STATUS": "disable",
"FLEX_COUNTER_DELAY_STATUS": "true",
"POLL_INTERVAL": "10000"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -643,5 +643,12 @@
"server_ipv6": "fc02:1000::19/128",
"state": "auto"
}
},
"FLEX_COUNTER_TABLE": {
"ACL": {
"FLEX_COUNTER_STATUS": "disable",
"FLEX_COUNTER_DELAY_STATUS": "true",
"POLL_INTERVAL": "10000"
}
}
}
7 changes: 7 additions & 0 deletions src/sonic-config-engine/tests/sample_output/py2/l3_intfs.json
Original file line number Diff line number Diff line change
Expand Up @@ -297,5 +297,12 @@
"Ethernet29": {},
"Ethernet30": {},
"Ethernet31": {}
},
"FLEX_COUNTER_TABLE": {
"ACL": {
"FLEX_COUNTER_STATUS": "disable",
"FLEX_COUNTER_DELAY_STATUS": "true",
"POLL_INTERVAL": "10000"
}
}
}
7 changes: 7 additions & 0 deletions src/sonic-config-engine/tests/sample_output/py3/l1_intfs.json
Original file line number Diff line number Diff line change
Expand Up @@ -257,5 +257,12 @@
"mtu": "9100",
"speed": "100000"
}
},
"FLEX_COUNTER_TABLE": {
"ACL": {
"FLEX_COUNTER_STATUS": "disable",
"FLEX_COUNTER_DELAY_STATUS": "true",
"POLL_INTERVAL": "10000"
}
}
}
7 changes: 7 additions & 0 deletions src/sonic-config-engine/tests/sample_output/py3/l2switch.json
Original file line number Diff line number Diff line change
Expand Up @@ -264,5 +264,12 @@
"Vlan1000|Ethernet124": {
"tagging_mode": "untagged"
}
},
"FLEX_COUNTER_TABLE": {
"ACL": {
"FLEX_COUNTER_STATUS": "disable",
"FLEX_COUNTER_DELAY_STATUS": "true",
"POLL_INTERVAL": "10000"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -643,5 +643,12 @@
"server_ipv6": "fc02:1000::19/128",
"state": "auto"
}
},
"FLEX_COUNTER_TABLE": {
"ACL": {
"FLEX_COUNTER_STATUS": "disable",
"FLEX_COUNTER_DELAY_STATUS": "true",
"POLL_INTERVAL": "10000"
}
}
}
7 changes: 7 additions & 0 deletions src/sonic-config-engine/tests/sample_output/py3/l3_intfs.json
Original file line number Diff line number Diff line change
Expand Up @@ -297,5 +297,12 @@
"Ethernet29": {},
"Ethernet30": {},
"Ethernet31": {}
},
"FLEX_COUNTER_TABLE": {
"ACL": {
"FLEX_COUNTER_STATUS": "disable",
"FLEX_COUNTER_DELAY_STATUS": "true",
"POLL_INTERVAL": "10000"
}
}
}