From 4907fba8ddd5aec14582409b66f87c240d2a2f73 Mon Sep 17 00:00:00 2001 From: jingwenxie Date: Thu, 24 Oct 2024 08:27:25 +0800 Subject: [PATCH] [202311]Set warn msg for list of tables which not covered by YANG (#3591) What I did Sent a warn syslog if there are tables not covered by yang. Only show the list of keys of table name How I did it Sent a warn syslog if there are tables not covered by yang. How to verify it Manual test --- config/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/main.py b/config/main.py index ea431399e9..e812db1e6c 100644 --- a/config/main.py +++ b/config/main.py @@ -2083,6 +2083,9 @@ def validate_config_by_cm_alerting(cm, config_json, jname): except Exception as ex: log.log_warning("Failed to validate {}. Alerting: {}".format(jname, ex)) + if len(cm.tablesWithOutYang()): + log.log_warning("YANG failed to cover tables: {}.".format(list(cm.tablesWithOutYang().keys()))) + def override_config_db(config_db, config_input): # Deserialized golden config to DB recognized format