a2c2d67098
* [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>
66 lines
4.0 KiB
Django/Jinja
66 lines
4.0 KiB
Django/Jinja
{
|
|
"DEVICE_METADATA": {
|
|
"localhost": {
|
|
"buffer_model": {% if default_buffer_model == "dynamic" %}"dynamic"{% else %}"traditional"{% endif %},
|
|
"default_bgp_status": {% if shutdown_bgp_on_start == "y" %}"down"{% else %}"up"{% endif %},
|
|
"default_pfcwd_status": {% if enable_pfcwd_on_start == "y" %}"enable"{% else %}"disable"{% endif %}
|
|
}
|
|
},
|
|
"CRM": {
|
|
"Config": {
|
|
"polling_interval": "300",
|
|
{%- for crm_res in ["ipv4_route", "ipv6_route", "ipv4_nexthop", "ipv6_nexthop", "ipv4_neighbor",
|
|
"ipv6_neighbor", "nexthop_group_member", "nexthop_group", "acl_table",
|
|
"acl_group", "acl_entry", "acl_counter", "fdb_entry", "snat_entry", "dnat_entry",
|
|
"ipmc_entry", "mpls_inseg", "mpls_nexthop"] %}
|
|
"{{crm_res}}_threshold_type": "percentage",
|
|
"{{crm_res}}_low_threshold": "70",
|
|
"{{crm_res}}_high_threshold": "85"{% if not loop.last %},{% endif -%}
|
|
{% 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"),
|
|
("pmon", "enabled", false, "enabled"),
|
|
("radv", "enabled", false, "enabled"),
|
|
("snmp", "enabled", true, "enabled"),
|
|
("swss", "enabled", false, "enabled"),
|
|
("syncd", "enabled", false, "enabled"),
|
|
("teamd", "enabled", false, "enabled")] %}
|
|
{% do features.append(("dhcp_relay", "{% if not (DEVICE_METADATA is defined and DEVICE_METADATA['localhost'] is defined and DEVICE_METADATA['localhost']['type'] is defined and DEVICE_METADATA['localhost']['type'] != 'ToRRouter') %}enabled{% else %}disabled{% endif %}", false, "enabled")) %}
|
|
{%- if sonic_asic_platform == "vs" %}{% do features.append(("gbsyncd", "enabled", false, "enabled")) %}{% endif %}
|
|
{%- if include_iccpd == "y" %}{% do features.append(("iccpd", "disabled", false, "enabled")) %}{% endif %}
|
|
{%- if include_mgmt_framework == "y" %}{% do features.append(("mgmt-framework", "enabled", true, "enabled")) %}{% endif %}
|
|
{%- if include_mux == "y" %}{% do features.append(("mux", "{% if 'subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR' %}enabled{% else %}always_disabled{% endif %}", false, "enabled")) %}{% endif %}
|
|
{%- if include_nat == "y" %}{% do features.append(("nat", "disabled", false, "enabled")) %}{% endif %}
|
|
{%- if include_restapi == "y" %}{% do features.append(("restapi", "enabled", false, "enabled")) %}{% endif %}
|
|
{%- if include_sflow == "y" %}{% do features.append(("sflow", "disabled", false, "enabled")) %}{% endif %}
|
|
{%- if include_macsec == "y" %}{% do features.append(("macsec", "disabled", false, "enabled")) %}{% endif %}
|
|
{%- if include_system_telemetry == "y" %}{% do features.append(("telemetry", "enabled", true, "enabled")) %}{% endif %}
|
|
"FEATURE": {
|
|
{# has_timer field if set, will start the feature systemd .timer unit instead of .service unit #}
|
|
{%- for feature, state, has_timer, autorestart in features %}
|
|
"{{feature}}": {
|
|
"state": "{{state}}",
|
|
"has_timer" : {{has_timer | lower()}},
|
|
"has_global_scope": {% if feature + '.service' in installer_services.split(' ') %}true{% else %}false{% endif %},
|
|
"has_per_asic_scope": {% if feature + '@.service' in installer_services.split(' ') %}true{% else %}false{% endif %},
|
|
"auto_restart": "{{autorestart}}",
|
|
{%- if include_kubernetes == "y" %}
|
|
{%- if feature in ["lldp", "pmon", "radv", "snmp", "telemetry"] %}
|
|
"set_owner": "kube", {% else %}
|
|
"set_owner": "local", {% endif %} {% endif %}
|
|
"high_mem_alert": "disabled"
|
|
}{% if not loop.last %},{% endif -%}
|
|
{% endfor %}
|
|
}
|
|
}
|