Skip to content
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

It would be very nice to add a raw RPC method for the netconf driver #54

Closed
idqdq opened this issue Nov 12, 2021 · 2 comments
Closed

It would be very nice to add a raw RPC method for the netconf driver #54

idqdq opened this issue Nov 12, 2021 · 2 comments

Comments

@idqdq
Copy link

idqdq commented Nov 12, 2021

Hi Carl
I like scrapli very match, very appreciate your job 🥇
It is the number one toolkit for me in my network automation journey
Recently I've got a task to make a script that kills ipsec sessions from one Juniper SRX device
And I've made it just in a couple of minutes using the scraply_netconf library

But then I thought what if I want to hand over my script to some guys related to that Ipsec issues
But they are working on windows platform and know nothing on python, venv, bash, etc

And then I remembered there is scrapligo project that does all that scrapli do but using golang
Seems it fits my needs.
Unfortunately I almost don't know golang but the task is pretty simple so It is not that hard to do it on any language

This was intro and now back to the issue,
actually there are two issues I've ran into with my task

I found out scrapligo has no RPC method I getting used to use with scrapli to perform raw rpc requests

as a workaround I took the method d.BuildCommitElem() from payload.go file as a temlpate,
and replaced the XMLName data with XMLName xml.Name xml:"clear-ike-security-association"
now It worked but seems like a routh hack and looks ugly

So this is the Issue:
Please, could you please add the RPC method like we all have in the python based scrapli_netconf lib?

Thanks
with best regards
Nikolay Ryzhkov

p.s the second issue I ran into is on the way :)

@carlmontanari
Copy link
Contributor

Hey Nikolay -- I think this is a good idea. It will be a while till I get to it, but I will keep this open to remind me 😁

@carlmontanari carlmontanari mentioned this issue Nov 25, 2021
@carlmontanari
Copy link
Contributor

carlmontanari commented Nov 25, 2021

Hey again Nikolay! Just opened a PR for this. Wasn't too hard but had to remember how all the netconf bits work 🙃

Will close this and maybe you can chime in on the PR if that works for ya?

Thanks dude!

Carl

EDIT: #59 <- PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants