New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with path statements in RPC #662
Comments
Hi Italo, Let me simplify your yang model module mod1 {
yang-version 1.1;
namespace "urn:mod1";
prefix m;
rpc myrpc {
input {
container ic {
leaf inputnode {
type string;
}
}
}
output {
leaf outputnode {
when "/myrpc/ic/inputnode='xxx'";
type string;
}
}
}
augment /myrpc/input/ic {
leaf il {
type leafref {
path "/myrpc/ic/inputnode";
}
}
}
}
I explored the RFC7950 carefully, finally I find the following:
In pyang 1.7.5, the XPath expression is not well validated, so the "input" is not checked correctly. The current version of pyang is checked correctly. The yang model provided above is accepted by current pyang version. Please try it. |
Fixing issue #76 as suggested in mbj4668/pyang#662 (comment)
Fixing issue #76, as suggested in: - mbj4668/pyang#662 (comment) - https://mailarchive.ietf.org/arch/msg/netmod/3vmzza2QQ2ZVxUOU_daRTZDt0P8/ Co-authored-by: sergiobelotti <sergio.belotti@nokia.com>
* Update ietf-te-path-computation.yang Fixing issue #76 as suggested in mbj4668/pyang#662 (comment) Updated based on the feedbacks from Martin Björklund: https://mailarchive.ietf.org/arch/msg/netmod/3vmzza2QQ2ZVxUOU_daRTZDt0P8/ Updated to address YD review comments (open issue #83 ) Updated YANG model: - to address Tom Petch's comments (#82) - to clean-up the use of groupings (#84 (comment)) Updated as proposed in #77 (comment) Update to address review comment: #84 (comment) Co-authored-by: sergiobelotti <sergio.belotti@nokia.com>
We have found some issues with RPC XPaths when developing the YANG code for https://tools.ietf.org/html/draft-ietf-teas-yang-path-computation
As discussed during the TEAS WG session in IETF 108, this issue has been raised on pyang github.
The following code is accepted by pyang 1.75 but not by pyang 2.1:
The following code instead is accepted by pyang 2.1 but not by pyang 1.7.5:
Moreover the following when statement, which is quite useful to constraint which information is provided by the RPC output based on some attributes in the RPC input, is accepted by pyang 1.7.5 but not accepted by pyang 2.1;
The text was updated successfully, but these errors were encountered: