Skip to content

Commit 1c9187d

Browse files
committed
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.
1 parent 3072af0 commit 1c9187d

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
@@ -195,6 +195,8 @@ def __init__(
195195
leafref_extended: bool = False,
196196
leafref_linking: bool = False,
197197
builtin_plugins_only: bool = False,
198+
all_implemented: bool = False,
199+
enable_imp_features: bool = False,
198200
yanglib_path: Optional[str] = None,
199201
yanglib_fmt: str = "json",
200202
cdata=None, # C type: "struct ly_ctx *"
@@ -217,6 +219,10 @@ def __init__(
217219
options |= lib.LY_CTX_LEAFREF_LINKING
218220
if builtin_plugins_only:
219221
options |= lib.LY_CTX_BUILTIN_PLUGINS_ONLY
222+
if all_implemented:
223+
options |= lib.LY_CTX_ALL_IMPLEMENTED
224+
if enable_imp_features:
225+
options |= lib.LY_CTX_ENABLE_IMP_FEATURES
220226
# force priv parsed
221227
options |= lib.LY_CTX_SET_PRIV_PARSED
222228

0 commit comments

Comments
 (0)