networktocode / ntc-ansible

Multi-vendor network modules
Other
278 stars 112 forks source link

show ip route for ios #10

Closed jedelman8 closed 9 years ago

jedelman8 commented 9 years ago

Hey @ubajze can you re-submit a PR for the show ip route command you did? I merged it, but then realized it had a few items that needed correction.

  1. Can you follow the proper format for the .parsed file? It should be a list of dictionaries. Check out the samples and let me know if you have questions.
  2. For routes that have multiple routes/next-hops, etc., can you try and use filldown in TextFSM such that there is a FULL entry for every route, and not a list embedded as a return value?
ubajze commented 9 years ago

Hello

  1. I will create the proper format.
  2. I don't think that this could be solved with current template. As far as I know, the value does not support two options (filldown and required). I already have required option on network value to filter out only valid lines. I think that I will have to rework the template. Do you think that it is better to have full entry for routes with multiple next-hops (equal and unequal load-balancing)?

I will try to find some free time in the following days to update the code.

jedelman8 commented 9 years ago

I'll need to think about it, but definitely open to options.

mzbenami commented 9 years ago

Hi @ubajze,

I recently submitted an updated nxos_show_ip_route that treats each route as it's own row, regardless of multipathing. Maybe it can help you with the ios counterpart. From the TextFSM wiki (https://code.google.com/p/textfsm/wiki/TextFSMHowto) it seems like Filldown and Required are not mutually exclusive (Fillup and Required are, though) so you may not have a problem there.

ubajze commented 9 years ago

Hi

I went through the documentation again, and I found some features that I was not aware before. I created a new template and I was able to simplify the template a little bit. I have followed the recommendations (separate routes for load-balanced routes). I have also append two raw files and two parsed files (proper format). If you find out any bug, please let me know.

Uros

jedelman8 commented 9 years ago

Looks like the show ip route ios template was merged last week. Thanks @ubajze !