Skip to content

Commit

Permalink
Record and warn tables which not covered by YANG (sonic-net#3583)
Browse files Browse the repository at this point in the history
What I did
Sent a warn syslog if there are tables not covered by yang.

How I did it
Sent a warn syslog if there are tables not covered by yang.

How to verify it
Manual test
  • Loading branch information
wen587 authored Oct 23, 2024
1 parent dd34d7c commit aeda86a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2323,6 +2323,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(str(cm.tablesWithOutYang)))


def override_config_db(config_db, config_input):
# Deserialized golden config to DB recognized format
Expand Down

0 comments on commit aeda86a

Please sign in to comment.