Open
Description
>>> with sess.get_data_ly("/*") as data:
... data.print_file(sys.stdout, fmt="json", pretty=True)
...
{
}
>>> with sess.get_data_ly("/ietf-hardware:*") as data:
... data.print_file(sys.stdout, fmt="json", pretty=True)
...
{
"ietf-hardware:hardware": {
"component": [
{
...
}
]
}
}
>>> with sess.get_data_ly("/*") as data:
... data.print_file(sys.stdout, fmt="json", pretty=True, with_siblings=True)
...
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "/opt/venv/rmi/lib/python3.11/site-packages/libyang/data.py", line 676, in print_file
raise self.context.error("cannot print node")
libyang.util.LibyangError: cannot print node
>>>
I'm not sure why the first call returns an empty object, as ietf-hardware
contains data? And with the with_siblings
option set, the call is crashing.
Metadata
Metadata
Assignees
Labels
No labels