Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_mac_address_table() - ValueError: invalid literal for int() with base 10: '-' #13

Open
vojtulan opened this issue Apr 2, 2022 · 0 comments

Comments

@vojtulan
Copy link

vojtulan commented Apr 2, 2022

When trying to get mac address table an error occured:

Python 3.8.10 (default, Mar 15 2022, 12:22:08)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from napalm import get_network_driver
>>> driver = get_network_driver("ce")
>>> device = driver(hostname=ip, username=username, password=password)
>>> device.open()
>>> print(device.get_mac_address_table()


Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/altepro/.local/lib/python3.8/site-packages/napalm_ce/ce.py", line 778, in get_mac_address_table
    'vlan': int(mac_info[1]),
ValueError: invalid literal for int() with base 10: '-'

On the Switch:

<ce_switch>display mac-address
Flags: * - Backup
       # - forwarding logical interface, operations cannot be performed based
           on the interface.
BD   : bridge-domain   Age : dynamic MAC learned time in seconds
-------------------------------------------------------------------------------
MAC Address    VLAN/VSI/BD   Learned-From        Type                Age
-------------------------------------------------------------------------------
0006-f61b-2fc1 -/-/100       172.29.252.4        evn                   -
0008-2fcd-3e41 -/-/100       172.29.252.8        evn                   -
0008-2fcd-f8c1 -/-/100       172.29.252.8        evn                   -
000d-29b8-9140 -/-/100       172.29.252.1        evn                   -
001b-0dfd-d241 -/-/100       172.29.252.8        evn                   -
001e-bd4c-57c1 -/-/100       172.29.252.8        evn                   -
001e-bd4c-6041 -/-/100       172.29.252.8        evn                   -
001e-bd4c-adc1 -/-/100       172.29.252.8        evn                   -
001f-c99b-4b41 -/-/100       172.29.252.8        evn                   -
.
.
.
0027-90b6-2fc1 -/-/100       172.29.252.8        evn                   -
0030-4f46-a279 -/-/100       172.29.252.8        evn                   -
0030-4f46-a33c -/-/100       172.29.252.1        evn                   -
0038-df06-7d51 -/-/100       172.29.252.7        evn                   -
0038-dfd8-a0f8 -/-/100       Eth-Trunk21         dynamic        31373845
0038-dfd8-a47b -/-/100       172.29.252.8        evn                   -
3cec-ef75-cbc9 -/-/409       172.29.252.1        evn                   -
3cec-ef75-cbe6 -/-/409       172.29.252.1        evn                   -
3cec-ef75-cbef -/-/409       172.29.252.1        evn                   -
3cec-ef75-cc21 -/-/409       172.29.252.5        evn                   -
-------------------------------------------------------------------------------
Total items: 3811

Any help ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant