-
Notifications
You must be signed in to change notification settings - Fork 41
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
RPC error "expecting </configuration>" returned on use of GetConfig #18
Comments
It might be a bug. Thanks for catching this and I'll take a look at it! |
Actually, I see the problem. You have the parameters backwards. The "section" is supposed to be the second (optional) parameter. If you just specify the following: config, err := jnpr.GetConfig("text") Then you will get the entire config, vs something like: config, err := jnpr.GetConfig("text", "interfaces") I will have to work on the MX parsing, as it's not coming through as it should. Everything else should work ok - I tested it on a QFX, EX, and SRX. |
OK, I think I know what might have happened. I stumbled upon your library from this blog entry. One of the examples on the page is the following:
I just used that example as a start for my program and didn't double check with the GoDoc documentation. The RPC error returned wasn't obviously clear (to me), so it didn't dawn on me to double-check the docs to make sure I was using the function correctly. Switching the argument order in my function call made it work, as you explained. Thanks for looking into it! Do you need me to test anything with an MX? Thanks, |
Ah...forgot to update my blog when I changed the function parameters around :) Thanks a lot! Yeah, if you wouldn't mind testing, that would be great. I spent just a couple minutes diving into it yesterday, and apparently the XML response on the "get-software-information" RPC call is different than that of the other platforms. |
I tested using |
Do you have dual routing engines? |
Yes. |
I'm running 14.2R5.8 on our MX104's and get an error. Must be tied to the model. I'll dig into it more. Thanks for the continued effort! |
My pleasure! |
@scottdware if you can provide me with the sanitized XML output of the equivalent SSH command, and the error you get from go-junos, I can try to fix it. I don't have access to any dual-RE MX gear, though. |
Hi,
Whenever I try to retrieve a Junos config using:
I always get this error:
netconf rpc [error]: syntax error, expecting </configuration>
.This doesn't seem to be device-specific as I get the same error on SRX, MX and QFX.
Is this a know bug or simply an error on my part?
I used
go get
about a week ago so the go-junos code I'm using should be fairly recent.Thanks,
-Martin
The text was updated successfully, but these errors were encountered: