-
Notifications
You must be signed in to change notification settings - Fork 48
Addition of get_eigrp_neighbors() #197
base: develop
Are you sure you want to change the base?
Conversation
Addition of eigrp_config_neighbors dict to models.py Addition of test_get_eigrp_neighbors() to test/base.py
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 to me!
But please write the same test also for the new testing framework: https://github.com/napalm-automation/napalm-base/blob/develop/napalm_base/test/getters.py
I would incline to write only for the new one, but as you already did it also for the old one, we can leave it there.
Thanks!
raise SkipTest() | ||
|
||
assert isinstance(get_eigrp_neighbors, dict) | ||
assert self._test_model(models.eigrp_config_neighbors, get_eigrp_neighbors) |
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.
newline please
All doable, based on the comments from @dbarrosop in #183 I will wait until I have an actual implementation before my next PR. Thanks guys |
Hi @WilliamMarti - how is this going? Just checking if you need any help with the implementation. |
it would be helpful if we also can get something like get_vlan and get_interfaces_descriptions because that would help us lot in Network automation project, i am not a developer i am new to this but i am trying to wrap my head around how to write those modules so I can also contribute towards that. Any help is appreciated. I wanna work on this if somebody can point me right direction. |
@icmp-echo you have some info here: https://napalm.readthedocs.io/en/latest/contributing/index.html#proposing-a-new-method Btw, |
@dbarrosop Thank you for responding, I really appreciate it. salt -G 'os:junos and interface:fe-0/0/5' grains.get description we dont have a grain for description yet, but i envision to pull that off same with the vlans as well, once we have get_vlan it would be easy to write the grains on top of that. but this a good start. Thank you. |
That looks like a salt thing, I don't think we need a method for that. @mirceaulinic can you comment on this? You are the resident salt expert here ;) @icmp-echo we should also move this topic to a dedicate issue now that I realized. Would you mind creating a new issue to track that? |
I see what you are trying to achieve @icmp-echo. Searching for a particular detail indeed is very useful in production networks especially when it grows that much that you can't keep in mind all the details.
As an aside, check this out too: https://docs.saltstack.com/en/develop/ref/runners/all/salt.runners.bgp.html. You can also use the grains to achieve this, but I would not recommend. Salt impresses with its speed and caching the interfaces under grains would slow down a bit the matching if you have a device with many interfaces. Grains should have a very simple structure. But if you really want, you can, by writing a custom grains modules in your envirnment: https://docs.saltstack.com/en/develop/topics/grains/index.html#writing-grains def interfaces_grain(proxy):
if proxy['napalm.initialized']:
intrf = proxy['napalm.call']('get_interfaces')
if intrf:
return {'interfaces_details': intrf.get('out', {})} And then you can select your devices like: |
@mirceaulinic this is awesome feature, and more I learn about salt more I fall in love with its capacity and power it posses, thank you for your awesome response, It a lot for me to process and think in your one response, but again thanks alot. |
new issue #260 was opened for follow up @dbarrosop . Thanks. |
Hi @WilliamMarti - continuing from #197 (comment): are you still working on this? |
Discussion at #183.
Starting with just the get_eigrp_neighbors() method for now to get my feet wet with the code base before I get too deep.