Getting this traceback while running netbox-sync:
2022-04-12 12:14:15,381 - INFO: Finished querying necessary objects from NetBox
2022-04-12 12:14:15,381 - DEBUG: Start resolving relations
...
2022-04-12 12:14:17,322 - INFO: resolving 2 of ipam.fhrpgroup
Traceback (most recent call last):
File "/opt/git/netbox-sync/netbox-sync.py", line 145, in
main()
File "/opt/git/netbox-sync/netbox-sync.py", line 113, in main
inventory.resolve_relations()
File "/opt/git/netbox-sync/module/netbox/inventory.py", line 216, in resolve_relations
this_object.resolve_relations()
File "/opt/git/netbox-sync/module/netbox/object_classes.py", line 1555, in resolve_relations
self.data["assigned_object_id"] = self.inventory.get_by_id(self.data_model_relation.get(o_type), nb_id=o_id)
File "/opt/git/netbox-sync/module/netbox/inventory.py", line 62, in get_by_id
(object_type.name, NetBoxObject.name))
AttributeError: 'NoneType' object has no attribute 'name'
An extra info log line at the top of NBIPAddress.resolve_relations finds this is happening when trying to resolve ipam.fhrpgroup 2, which is the first fhrpgroup it tries to resolve.
the data_model doesn't seem to have an assigned_object_id for ipam.fhrpgroup, which could be (multiple, but usually 2) NBInterface or NBVMInterface:
...
"assigned_object_type": ["dcim.interface", "virtualization.vminterface", "ipam.fhrpgroup"],
"assigned_object_id": [NBInterface, NBVMInterface],
Getting this traceback while running netbox-sync:
2022-04-12 12:14:15,381 - INFO: Finished querying necessary objects from NetBox
2022-04-12 12:14:15,381 - DEBUG: Start resolving relations
...
2022-04-12 12:14:17,322 - INFO: resolving 2 of ipam.fhrpgroup
Traceback (most recent call last):
File "/opt/git/netbox-sync/netbox-sync.py", line 145, in
main()
File "/opt/git/netbox-sync/netbox-sync.py", line 113, in main
inventory.resolve_relations()
File "/opt/git/netbox-sync/module/netbox/inventory.py", line 216, in resolve_relations
this_object.resolve_relations()
File "/opt/git/netbox-sync/module/netbox/object_classes.py", line 1555, in resolve_relations
self.data["assigned_object_id"] = self.inventory.get_by_id(self.data_model_relation.get(o_type), nb_id=o_id)
File "/opt/git/netbox-sync/module/netbox/inventory.py", line 62, in get_by_id
(object_type.name, NetBoxObject.name))
AttributeError: 'NoneType' object has no attribute 'name'
An extra info log line at the top of NBIPAddress.resolve_relations finds this is happening when trying to resolve ipam.fhrpgroup 2, which is the first fhrpgroup it tries to resolve.
the data_model doesn't seem to have an assigned_object_id for ipam.fhrpgroup, which could be (multiple, but usually 2) NBInterface or NBVMInterface:
...
"assigned_object_type": ["dcim.interface", "virtualization.vminterface", "ipam.fhrpgroup"],
"assigned_object_id": [NBInterface, NBVMInterface],