[ACL] enable ACL FC when genereting config from minigraph but disable by default (#8908)
* [ACL] enable ACL FC when genereting config from minigraph but disable by default Why I did it To support ACL counters on Flex Counter Infrastructure. How I did it Enable ACL FC in init_cfg and minigraph. Disable when genereting configuration from preset. How to verify it Together with depends PRs. Run ACL/Everflow test suite. Signed-off-by: Stepan Blyshchak <stepanb@nvidia.com>
This commit is contained in:
parent
5f11eb320e
commit
a2c2d67098
@ -45,6 +45,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()
|
||||
|
||||
|
||||
|
@ -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"),
|
||||
|
@ -10,6 +10,16 @@ if sys.version_info.major == 3:
|
||||
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'
|
||||
}
|
||||
}
|
||||
return data
|
||||
|
||||
# The following config generation methods exits:
|
||||
# 't1': generate_t1_sample_config,
|
||||
# 'l2': generate_l2_config,
|
||||
@ -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)
|
||||
|
||||
|
@ -4,6 +4,13 @@
|
||||
"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": {
|
||||
{%- for key, value in PORT.items() -%}
|
||||
|
@ -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() -%}
|
||||
|
@ -4,6 +4,13 @@
|
||||
"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": {
|
||||
{%- for key, value in PORT.items() -%}
|
||||
|
@ -257,5 +257,12 @@
|
||||
"mtu": "9100",
|
||||
"speed": "100000"
|
||||
}
|
||||
},
|
||||
"FLEX_COUNTER_TABLE": {
|
||||
"ACL": {
|
||||
"FLEX_COUNTER_STATUS": "disable",
|
||||
"FLEX_COUNTER_DELAY_STATUS": "true",
|
||||
"POLL_INTERVAL": "10000"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -297,5 +297,12 @@
|
||||
"Ethernet29": {},
|
||||
"Ethernet30": {},
|
||||
"Ethernet31": {}
|
||||
},
|
||||
"FLEX_COUNTER_TABLE": {
|
||||
"ACL": {
|
||||
"FLEX_COUNTER_STATUS": "disable",
|
||||
"FLEX_COUNTER_DELAY_STATUS": "true",
|
||||
"POLL_INTERVAL": "10000"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -257,5 +257,12 @@
|
||||
"mtu": "9100",
|
||||
"speed": "100000"
|
||||
}
|
||||
},
|
||||
"FLEX_COUNTER_TABLE": {
|
||||
"ACL": {
|
||||
"FLEX_COUNTER_STATUS": "disable",
|
||||
"FLEX_COUNTER_DELAY_STATUS": "true",
|
||||
"POLL_INTERVAL": "10000"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -297,5 +297,12 @@
|
||||
"Ethernet29": {},
|
||||
"Ethernet30": {},
|
||||
"Ethernet31": {}
|
||||
},
|
||||
"FLEX_COUNTER_TABLE": {
|
||||
"ACL": {
|
||||
"FLEX_COUNTER_STATUS": "disable",
|
||||
"FLEX_COUNTER_DELAY_STATUS": "true",
|
||||
"POLL_INTERVAL": "10000"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user