Skip to content

Commit 2d00937

Browse files
yejianquanabdosi
authored andcommitted
Make pmon feature delayed flag as jinja template (sonic-net#19657)
* Fix the Loopback0 IPv6 address of LC's in chassis not reachable from peer device's Signed-off-by: Abhishek Dosi <[email protected]> * Added change to have flag Signed-off-by: Abhishek Dosi <[email protected]> * Assign the metric vaule for Ipv6 default route learnt via RA message to higher value so that BGP learnt default route is higher priority. Signed-off-by: Abhishek Dosi <[email protected]> * Add alternate name for bridge interface on supversior in chassis systrem Signed-off-by: Abhishek Dosi <[email protected]> * Update service_checker.py * Update init_cfg.json.j2 to handle global scope for lldp feature * Update sonic-feature.yang * Added support to parse "AssociatedSliceStr" attribute of minigraph and save as `slice_type` as part of DEVICE_METADATA Signed-off-by: Abhishek Dosi <[email protected]> * Revert "Added support to parse "AssociatedSliceStr" attribute of minigraph and" This reverts commit 0f2d26d. * Added support to parse "AssociatedSliceStr" attribute of minigraph and save as `slice_type` as part of DEVICE_METADATA for Chassis Device type Signed-off-by: Abhishek Dosi <[email protected]> * Update minigraph.py * pmon need not be delayed for SpineRouter/T2. pmon need to enable asap to detect ASIC's on Supervisor. pmonm need to enable asap for bring-up of 400G ports on LC's fast becuase of CMIS state machine present in PMON. Signed-off-by: Abhishek Dosi <[email protected]> * Updated Yang model for Feature delay from boolean to string Signed-off-by: Abhishek Dosi <[email protected]> * Fix Build Error Signed-off-by: Abhishek Dosi <[email protected]> * Fix build error Signed-off-by: Abhishek Dosi <[email protected]> * Update true/false to True/False --------- Signed-off-by: Abhishek Dosi <[email protected]> Co-authored-by: Abhishek Dosi <[email protected]> Co-authored-by: abdosi <[email protected]>
1 parent 2cf2b8b commit 2d00937

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

files/build_templates/init_cfg.json.j2

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
{%- set features = [("bgp", "{% 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']) %}disabled{% else %}enabled{% endif %}", false, "enabled"),
3939
("database", "always_enabled", false, "always_enabled"),
4040
("lldp", "enabled", true, "enabled"),
41-
("pmon", "enabled", true, "enabled"),
41+
("pmon", "enabled", "{% if 'type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] == 'SpineRouter' %}False{% else %}True{% endif %}", "enabled"),
4242
("snmp", "enabled", true, "enabled"),
4343
("swss", "enabled", false, "enabled"),
4444
("syncd", "enabled", false, "enabled")] %}
@@ -71,7 +71,7 @@
7171
{%- for feature, state, delayed, autorestart in features %}
7272
"{{feature}}": {
7373
"state": "{{state}}",
74-
"delayed" : {{delayed | lower()}},
74+
"delayed" : "{{delayed}}",
7575
{%- if feature in ["lldp"] %}
7676
"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 %},
7777
"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 %},

src/sonic-yang-models/yang-models/sonic-feature.yang

+6-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ module sonic-feature{
2929
type string;
3030
}
3131

32+
typedef feature-delay-status {
33+
description "configuration to set the feature has delay scope as True/False";
34+
type string;
35+
}
36+
3237
container sonic-feature {
3338

3439
container FEATURE {
@@ -60,7 +65,7 @@ module sonic-feature{
6065
leaf delayed {
6166
description "This configuration identicates if the feature needs to be delayed until
6267
system initialization";
63-
type stypes:boolean_type;
68+
type feature-delay-status;
6469
default "false";
6570
}
6671

0 commit comments

Comments
 (0)