Skip to content

Commit 6c5ed3a

Browse files
authored
Update init_cfg.json.j2 to handle global scope for lldp feature
1 parent 018b3f0 commit 6c5ed3a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

files/build_templates/init_cfg.json.j2

+2-1
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,11 @@
7070
"{{feature}}": {
7171
"state": "{{state}}",
7272
"delayed" : {{delayed | lower()}},
73-
"has_global_scope": {% if feature + '.service' in installer_services.split(' ') %}true{% else %}false{% endif %},
7473
{%- if feature in ["lldp"] %}
74+
"has_global_scope": {% raw %}"{% if ('CHASSIS_METADATA' in DEVICE_RUNTIME_METADATA and DEVICE_RUNTIME_METADATA['CHASSIS_METADATA']['module_type'] in ['linecard']) %}False{% else %}True{% endif %}"{% endraw %},
7575
"has_per_asic_scope": {% raw %}"{% if not DEVICE_RUNTIME_METADATA['ETHERNET_PORTS_PRESENT'] or ('CHASSIS_METADATA' in DEVICE_RUNTIME_METADATA and DEVICE_RUNTIME_METADATA['CHASSIS_METADATA']['module_type'] in ['supervisor']) %}False{% else %}True{% endif %}"{% endraw %},
7676
{%- else %}
77+
"has_global_scope": {% if feature + '.service' in installer_services.split(' ') %}true{% else %}false{% endif %},
7778
"has_per_asic_scope": {% if feature + '@.service' in installer_services.split(' ') %}"True"{% else %}"False"{% endif %},
7879
{%- endif %}
7980
"auto_restart": "{{autorestart}}",

0 commit comments

Comments
 (0)