napalm-automation-community / napalm-panos

NAPALM driver for PAN-OS
Apache License 2.0
29 stars 31 forks source link

Unk interface gets invalid literal for int() #100

Closed jvanderaa closed 2 years ago

jvanderaa commented 2 years ago

Environment

Expected Behavior

Expected get_interfaces() to work

Observed Behavior

In [45]: device.get_interfaces()
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-45-89ef61d8d3bf> in <module>
----> 1 device.get_interfaces()

~/.cache/pypoetry/virtualenvs/sandbox-python-Fd9X2G4n-py3.8/lib/python3.8/site-packages/napalm_panos/panos.py in get_interfaces(self)
    566                 interface["speed"] = 0
    567             else:
--> 568                 interface["speed"] = int(interface["speed"])
    569             interface["mac_address"] = standardize_mac(interface_info.get("mac"))
    570             interface["description"] = "N/A"

Steps to Reproduce

  1. Connect NAPALM-PANOS to a VM PANOS device
  2. Execute the get_interfaces() getter
  3. See the error