-
Notifications
You must be signed in to change notification settings - Fork 76
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
Schema Ambiguity Error with openconfig-system re: NTP #334
Comments
This is a topic that comes back now and then, see eg #330, which changed the behavior in 5.7.
Therefore, more work is needed to properly resolve it. Until then, please use the work-around. |
Ok, I added this patch, but there is more to it...
So, while the patch does allow entering the command, the autogenerated CLI seems to omit the entire YANG hierarchy within the server container. Thus, I cannot create the requisite target of the leafref and therefore the error above. |
I see the issue has something to do with the autocli code generated from a type in openconfig-inet-types.yang:
where both ip-address and domain-name are patterns that somehow interfere. |
This resulted in a rather large CLIgen update, see |
I've tested this some more, and it's unclear to me how the YANG-based automatic CLI could make use of this in a fine-grained manner. I do see that With mode set to 2, and absent any
Looking further into the RFC 7950, I find the following in 9.12:
So, it seems that preference mode 1 might be more aligned with the RFC intention. I've adjusted It seems, with this particular schema ambiguity, the parser does not show completions when the first alternative is taken, though it is an interior node in the schema:
But, I can change the working point and see the completions:
When providing a value that does not match the first alternative, but rather the second and final, things work as expected:
|
Can confirm, I'm using the ietf-system yang model, which is very similar. Still see the "is ambiguous" output with latest |
We have the exact same problem with ntp servers in ietf-system as in clicon#334 Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
vagrant@ubuntu1804.localdomain / # set system ntp servers server 1.2.3.4
CLI syntax error: "set system ntp servers server 1.2.3.4" is ambiguous
Using a clixon.xml with the following YANG configuration:
The openconfig-system revision I'm using is 2021-07-20, and I do not see anything of interest in the YANG file itself.
Sure enough, when I print the parse trees, there is a duplicate:
However, when I debug clixon_cli on startup, the autocli does not seem to reveal any duplication.
The text was updated successfully, but these errors were encountered: