napalm-automation-community / napalm-dellos10

NAPALM Driver for Dell EMC OS10 Enterprise
http://dellos10-napalm.readthedocs.io/en/latest/
Apache License 2.0
10 stars 11 forks source link

get_interfaces() doesnt return the mtu #32

Open muhammad-rafi opened 3 years ago

muhammad-rafi commented 3 years ago

HI,

I have created several script for different device types to pull the interfaces stats which should also includes MTU Size of the interface but apparently for dellos10, this value doesnt seems to be there via get_interfaces(), is it possible to add that in the output dictionary ? like we have for nxos, iosxr and iosxe.

Please see the current output, what does it look like

{
    "ethernet1/1/1": {
        "last_flapped": 68.0,
        "description": "Ethernet1/1/1",
        "is_enabled": false,
        "mac_address": "64:00:6a:d6:a1:a1",
        "is_up": false,
        "speed": 0
    },
    "ethernet1/1/2": {
        "last_flapped": 68.0,
        "description": "Ethernet1/1/2",
        "is_enabled": false,
        "mac_address": "64:00:6a:d6:a1:a2",
        "is_up": false,
        "speed": 0
    },

However, it does present in the xml on the device itself

<?xml version="1.0"?>
<rpc-reply>
  <data>
    <interfaces>
      <interface>
        <name>ethernet1/1/1</name>
        <description>Ethernet1/1/1</description>
        <type>ianaift:ethernetCsmacd</type>
        <enabled>false</enabled>
        <mtu>9216</mtu>
        <mac-learn>HW</mac-learn>
        <mode>MODE_L2</mode>
        <load-interval>299</load-interval>

output omitted 

here is the information for the switch

Dell EMC Networking OS10 Enterprise
Copyright (c) 1999-2020 by Dell Inc. All Rights Reserved.
OS Version: 10.5.2.0
Build Version: 10.5.2.0.232
Build Time: 2020-09-24T18:40:26+0000
System Type: S3048-ON
Architecture: x86_64
Up Time: 8 weeks 2 days 05:05:17
Shourai commented 2 years ago

Also thought it was strange that MTU wasn't displayed. However it seems just after the release op PyPI the following commit was made: https://github.com/napalm-automation-community/napalm-dellos10/commit/af95e7ae611ae4ac990f01d43ddebd5d515f450c Which added the MTU to get_interfaces.

You could either install the package from git or wait until the pypi release is updated.