scaleway / netbox-netprod-importer

Poll data from network devices in production and import it into netbox
GNU General Public License v3.0
101 stars 31 forks source link

Interconnection fail - object has no attribute 'interface_connection' #23

Closed rogeriosims closed 5 years ago

rogeriosims commented 5 years ago

when the interconnection is made the switch identifies the neighbors, I have the device configured and the Gi0 port configured on the device (Cisco AirCap AP), but the importer fails with the following error:

DEBUG: urllib3.connectionpool: http: //172.28.49.200: 80 "GET / api / dcim / devices /? Name =AP-09A & limit = 50 HTTP / 1.1" 200 1157 DEBUG: urllib3.connectionpool: http: //172.28.49.200: 80 "GET / api / dcim / interfaces /? Device_id = 36 & limit = 50 HTTP / 1.1" 200 546 DEBUG: urllib3.connectionpool: http: //172.28.49.200: 80 "GET / api / dcim / interfaces / 1065 /? Limit = 50 HTTP / 1.1" 200 529 DEBUG: urllib3.connectionpool: http: //172.28.49.200: 80 "GET / api / dcim / interfaces / 1463 /? Limit = 50 HTTP / 1.1" 200 494 DEBUG: netbox_importer: Error with interco {'local_port': 'GigabitEthernet1 / 0/15', 'hostname': 'AP-09A', 'port': 'Gi0'}: 'NetboxMapper_Interfaces_DcimInterfaces1463' object has no attribute 'interface_connection'

Can you help me?

aruhier commented 5 years ago

Hi @rogeriosims, Thanks a lot for the bugreport. It has already been fixed in master, it is due to a change of how netbox handles interconnections since v2.5 (that now has a notion of cables).

I will push a new release soon, what should fix your issue. For now you can install netbox-netprod-importer from this repository.