Skip to content

Commit 4cf965c

Browse files
hyberdkrjarry
authored andcommitted
context: add option all_implemented and enable_imp_features
includes the default context options LY_CTX_ALL_IMPLEMENTED and LY_CTX_ENABLE_IMP_FEATURES into the ctor of Context class. Signed-off-by: Esben Laursen <[email protected]>
1 parent ddb7e99 commit 4cf965c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

libyang/context.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ def __init__(
203203
leafref_extended: bool = False,
204204
leafref_linking: bool = False,
205205
builtin_plugins_only: bool = False,
206+
all_implemented: bool = False,
207+
enable_imp_features: bool = False,
206208
yanglib_path: Optional[str] = None,
207209
yanglib_fmt: str = "json",
208210
cdata=None, # C type: "struct ly_ctx *"
@@ -225,6 +227,10 @@ def __init__(
225227
options |= lib.LY_CTX_LEAFREF_LINKING
226228
if builtin_plugins_only:
227229
options |= lib.LY_CTX_BUILTIN_PLUGINS_ONLY
230+
if all_implemented:
231+
options |= lib.LY_CTX_ALL_IMPLEMENTED
232+
if enable_imp_features:
233+
options |= lib.LY_CTX_ENABLE_IMP_FEATURES
228234
# force priv parsed
229235
options |= lib.LY_CTX_SET_PRIV_PARSED
230236

0 commit comments

Comments
 (0)