napalm-automation/napalm

ios: get_interfaces() last_flap - not implemented

Aperta

#1006 aperta il 25 giu 2019

 (2 commenti) (0 reazioni) (0 assegnatari)Python (553 fork)batch import
featuregood first issuehelp wantedios

Metriche repository

Star
 (2145 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Description of Issue/Question

Drivers do not have last_flap attribute calculated for get_interfaces(). I believe a good source of this would be the "last input / last output / last output hang" data that is seen via a show interface command typically. In fact it might make better sense to add these 3 values to the dictionary rather than try to leverage the single unimplemented last_flap attribute.

The new attributes could be parsed via a textfsm template with something like this. ^\s+Last\s+input\s+${LAST_INPUT},\s+output\s+${LAST_OUTPUT},\s+output\s+hang\s+${LAST_OUTPUT_HANG}\s*$$

the new proposed attributes could be:

  • last_input
  • last_output
  • last_output_hang

These are valid for Cisco based devices, but i am not sure about non Cisco devices. If they are available, I would recommend this change across all drivers for consistency.

Did you follow the steps from https://github.com/napalm-automation/napalm#faq

(Place an x between the square brackets where applicable)

  • Yes
  • No

Setup

win10 python 3.7.2

napalm version

(Paste verbatim output from pip freeze | grep napalm between quotes below)

napalm==2.4.0

Network operating system version

(Paste verbatim output from show version - or equivalent - between quotes below)

n/a

Steps to Reproduce the Issue

always reproducible since the library has not implemented this feature yet.

Error Traceback

(Paste the complete traceback of the exception between quotes below)

n/a

Guida contributor