-
Notifications
You must be signed in to change notification settings - Fork 342
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
Get full RPC response in cli function #1315
base: master
Are you sure you want to change the base?
Conversation
Hi @dkaplan1 we are seeing one warning for following line of code. can be changed to Please check if it can be fixed, otherwise the cli response has the full response.
Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check if we can change the following line from
if rsp.tag == "output" and rsp.getparent():
to
if rsp.tag in "output" and rsp.getparent() is not None:
Thanks for the review @chidanandpujar, updated. |
Hi @dkaplan1
Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
junos-eznc
'sexecute
function only returns the first child element, described inpy-junos-eznc/lib/jnpr/junos/device.py
Lines 896 to 901 in a64698b
Normally this isn't an issue, since commands return the full payload in one
<output>
as part of a<rpc-reply>
i.e.However, for some commands, like
show system core-dumps
, the<rpc-reply>
contains multiple<output>
s.In these cases, only selecting the first element means that we only select
and
cli
returns justinstead of the full output.
To fix this I'm proposing to get the parent of output message (if one exists) so that the full output of the command is returned.