napalm-base icon indicating copy to clipboard operation
napalm-base copied to clipboard

Enhance `get_arp_table` and `get_mac_address_table` with filtering arguments

Open kbirkeland opened this issue 8 years ago • 6 comments

I have to deal with some rather large ARP tables (>20k), so it would be nice to have some filtering built into the API.

I propose the following arguments for get_arp_table:

  • ip
  • mac
  • interface

and the following arguments for get_mac_address_table:

  • mac
  • interface
  • vlan

kbirkeland avatar Mar 01 '17 21:03 kbirkeland

I am going to approve this request, it makes sense to me. Let's see what @dbarrosop and @ktbyers think about that as well.

mirceaulinic avatar Mar 01 '17 22:03 mirceaulinic

Yes, I think this is a good idea.

ktbyers avatar Mar 01 '17 23:03 ktbyers

+1

dbarrosop avatar Mar 03 '17 08:03 dbarrosop

Hi @kbirkeland - this API change is approved. I have created the issues for each driver. As any API change, we must synchronise all drivers and apply the changed concomitantly. Would you be able to help with this?

Thanks!

mirceaulinic avatar Mar 17 '17 18:03 mirceaulinic

Yeah, I can help with this, but I don't have access to a VM for all the driver types. What's the best course of action for those? Just raise NotImplementedError?

kbirkeland avatar Mar 21 '17 12:03 kbirkeland

Hi @kbirkeland - no problem about the platforms you don't have, please contribute as much as you are able to. Thanks!

mirceaulinic avatar Mar 21 '17 12:03 mirceaulinic