Uploaded some stuff to github

Started by dlots, February 14, 2017, 06:23:02 PM

Previous topic - Next topic

dlots

https://github.com/GoreNetwork/
I put 2 new programs on here, both are still kinda beta.

1 takes a traceroute (or list of IPs), SSHs to all the devices, pulls the CPU info, and interfaces.  It then makes an HTTP page that shows all your interfaces (that are decently in use), Mb/s In and out, and error rates in/out.

The other I am working on to update IOSs, currently some stuff is hard-coded that shouldn't be like directory names ('flash' vs 'bootflash') etc

wintermute000

great work on the first one! will steal :)

look @ textfsm for next time, would abstract a lot of your manual kirk byers course style line stripping functions etc

EOS


dlots

Thank you
I will look into textfsm!
I really hate all the split work I had to do!

that1guy15

Nice dude!

I agree TextFSM is a good option. Just starting to dig through it myself.
That1guy15
@that1guy_15
blog.movingonesandzeros.net

wintermute000

#5
that1guy, you cna extend textfsm automagicallyt via ansible with ntc-ansible :)


and check out ntc-check in my github

that1guy15

Quote from: wintermute000 on February 15, 2017, 05:09:58 PM
that1guy, you cna extend textfsm automagicallyt via ansible with ntc-ansible :)


and check out ntc-check in my github

Yeah that is where Im running into it and starting to dig. The ntc-ansible show_command module is limited to specific commands and is missing output that I need. So I gotta add to it.

Yes good idea I need to review your stuff again to see if it fits in here. Thanks!
That1guy15
@that1guy_15
blog.movingonesandzeros.net

wintermute000

#7
Do your own textfsm template and submit a pull request to the ntc-templates repo
https://github.com/networktocode/ntc-templates


I'd leave it to edelmen and co thou to modify the python for ntc-ansible to parse for the correct command / invoke the correct textfsm template


It ain't hard to call textfsm natively





        # CONVERT TO STRING AND REMOVE LINE BREAKS
        output = ('\n'.join(map(str.rstrip, show_output)))
        template = open("get-bgp-routes.template")
        re_table = textfsm.TextFSM(template)
        fsm_results = re_table.ParseText(output)