napalm-automation / napalm

Network Automation and Programmability Abstraction Layer with Multivendor support
Apache License 2.0
2.23k stars 549 forks source link

Interface speed is returned as a float instead of an integer, which conflicts with the documentation. #1801

Open Punicaa opened 1 year ago

Punicaa commented 1 year ago

Description of Issue/Question

Speed is returned as a float where according to the manual it should be an integer, this appears to be vendor independent as it happens on Juniper and Arista:

# napalm --user <user>--vendor eos <device> call get_interfaces
Enter password:
{
    "Ethernet8": {
        "is_up": false,
        "is_enabled": true,
        "description": "",
        "last_flapped": 1663056216.0141013,
        "mtu": 10178,
        "speed": 10000.0,
        "mac_address": "28:99:3A:41:E3:A7"
    },

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

(Place an x between the square brackets where applicable)

Setup

napalm version

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

napalm==4.0.0

Network operating system version

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

EOS 4.23.0.1F

Steps to Reproduce the Issue

napalm --user <user> --vendor eos <device> call get_interfaces

Error Traceback

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

N/A
network-shark commented 1 year ago

@Punicaa See https://github.com/napalm-automation/napalm/pull/1478

And I thought it was fixed by https://github.com/napalm-automation/napalm/pull/1650

But the documentation is still wrong @ktbyers any idea why

https://napalm.readthedocs.io/en/latest/base.htmlhighlight=get_interfaces#napalm.base.base.NetworkDriver.get_interfaces

is not updated ?

Punicaa commented 1 year ago

Thanks. Should we leave this open until the docs have been updated?

M0NsTeRRR commented 1 year ago

Hello @network-shark @Punicaa,

You need to use "develop" documentation not "latest" as my fix was merged into develop branch. https://napalm.readthedocs.io/en/develop/

Regards,