From 04eb30431114c8c5b41b4199ffcbb6dc22d6acc3 Mon Sep 17 00:00:00 2001 From: Andriy Yurkiv Date: Thu, 24 Mar 2022 21:32:58 +0000 Subject: [PATCH] [yang] add yang options for Context object --- src/sonic-yang-mgmt/sonic_yang.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sonic-yang-mgmt/sonic_yang.py b/src/sonic-yang-mgmt/sonic_yang.py index 16aeb8a9ff8a..6bf590fced38 100644 --- a/src/sonic-yang-mgmt/sonic_yang.py +++ b/src/sonic-yang-mgmt/sonic_yang.py @@ -12,7 +12,7 @@ """ class SonicYang(SonicYangExtMixin): - def __init__(self, yang_dir, debug=False, print_log_enabled=True): + def __init__(self, yang_dir, debug=False, print_log_enabled=True, sonic_yang_options=0): self.yang_dir = yang_dir self.ctx = None self.module = None @@ -46,7 +46,7 @@ def __init__(self, yang_dir, debug=False, print_log_enabled=True): self.preProcessedYang = dict() try: - self.ctx = ly.Context(yang_dir) + self.ctx = ly.Context(yang_dir, sonic_yang_options) except Exception as e: self.fail(e)