-
Notifications
You must be signed in to change notification settings - Fork 73
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
Clixon CLI issue: when I try to print the value of the leaf node nothing appeared #345
Comments
Cannot recreate it, need some more info.
|
so when I type in cli console "show system" I see output like
but when I type command "show system name" I don't see any output |
I was able to fix the issue by editing |
Ok, in which file/function? Is this a patch that should be committed? |
I am still curious on some details on this.
If I interpret your issue report correctly, you want to do:
is that correct? |
I see you probably use |
OK, recreated it with @datamodelshow and text format. |
Thanks a lot for the patch. I have verified - the issue was fixed. In our *.cli file, we are using @datamodelstate. As I am understanding this is the same as @datamodelshow but with the state. So, your assumption was right. I also have yet one question. I typed "show system" to print "system" container and received the output
Here "radio-bridge-tg-system" is the module name. The problem is that our current CLI, that based on the old version of the clixon library, returns a value without a module name prefix. So my question is which variant right? Is it possible to enable or disable the appearance of the "prefix" by a configuration for consistency with previous behaviour? |
OK, I can add a compile-time option TEXT_SYNTAX_NOPREFIX for backward compatible. |
Problem is it may not be parseable. |
…compile-time option `TEXT_SYNTAX_NOPREFIX` See #345
See patch regarding backward-compatible text format output |
I used command CLI command "show system name" . "name" is the nested leaf value in the "system" container node. The right output should be in my case
MH-T280@00000000>show system name
name 00000000;
MH-T280@00000000>
but I got nothing.
If I try to print the whole container it did fine:
MH-T280@00000000>show system
radio-bridge-tg-system:system {
name 00000000;
reboot-needed false;
control {
soft-watchdog-enabled true;
}
state {
product MH-T280;
<.... other output>
I also enabled detailed logs in clixon_backend app and found log strings that can be considered RPC i/o between CLI client and clixon_backend:
clicon_msg_decode <nc:filter nc:type="xpath" nc:select="/rb-tg-sys:system/rb-tg-sys:name" xmlns:rb-tg-sys="http://siklu.com/yang/tg/system"/>
<..... a lot of other output>
from_client_msg cbret:00000000](http://siklu.com/yang/tg/system%22%3E%3Cname%3E00000000%3C/name%3E%3C/system%3E%3C/data%3E%3C/rpc-reply%3E)
Based on this I supposes that maybe CLI client receives valid RPC response but not display it properly.
Also, I've found that this issue appeared after Changed C-API for xml translation/print the internal cxobj tree data structure to other formats commit.
The text was updated successfully, but these errors were encountered: