You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today, libyang-python only supports XPATH expressions. There is a need to alternatively support RESTCONF compliant path expression, as specified in rfc8040.
Only list-key values are provided (no attribute names)
For lists with multiple keys, comma is used as separator while key values will follow the same order as in the YANG key statement
Example with multiple keys:
In YANG the statement key: "p1 p2 p3 p4" for list mylist occurs. To access an object with p1="bla" and p4="bing" one would use the following URL path statement .../mylist=bla,,,bing/...
Rational:
To convert a RESTCONF URL/PATH to XPATH is rather complex, because one needs to understand the list keys (aka requires to know the corresponding YANG file). As libyang has the knowledge the recommendation is to support URL style (model-path) out-of-the-box.
The text was updated successfully, but these errors were encountered:
is that something that libyang supports? If not, it must be first supported by the C library. This project is only a python wrapper/binding on top of it.
Today, libyang-python only supports XPATH expressions. There is a need to alternatively support RESTCONF compliant path expression, as specified in rfc8040.
XPATH expression example:
/nokia-conf:configure/port[port-id=1/1/1]
Corresponding RESTCONF URL syntax
/nokia-conf:configure/port=1%2F1%2F1
Usage information:
Example with multiple keys:
In YANG the statement
key: "p1 p2 p3 p4"
for listmylist
occurs. To access an object with p1="bla" and p4="bing" one would use the following URL path statement.../mylist=bla,,,bing/...
Rational:
To convert a RESTCONF URL/PATH to XPATH is rather complex, because one needs to understand the list keys (aka requires to know the corresponding YANG file). As libyang has the knowledge the recommendation is to support URL style (model-path) out-of-the-box.
The text was updated successfully, but these errors were encountered: