diff --git a/tools/pyang/import_yang.py b/tools/pyang/import_yang.py index d4b7f690b..d4ea5174a 100755 --- a/tools/pyang/import_yang.py +++ b/tools/pyang/import_yang.py @@ -77,6 +77,8 @@ def __init__(self, files, options): ctx.keep_comments = options.keep_comments excludes = [f.stem for f in options.to_dir.glob("*.yang")] + # Exclude common yang-models since they are already included in sonic-mgmt-common + excludes += [f.stem for f in options.to_dir.glob("common/*.yang")] if options.exclude: excludes += [f.stem for f in options.exclude]