nautobot / nautobot-app-ssot

Single Source of Truth for Nautobot
https://docs.nautobot.com/projects/ssot/en/latest/
Other
38 stars 41 forks source link

Meraki Integration Failing Loading Prefixes with Multiple Assigned Locations #593

Open jdrew82 opened 4 weeks ago

jdrew82 commented 4 weeks ago

Environment

Expected Behavior

Expect Meraki integration to complete loading Prefixes with assigned Locations.

Observed Behavior

See error when loading Prefix with multiple Locations assigned:

  File "/usr/local/lib/python3.10/site-packages/nautobot_ssot/jobs/base.py", line 171, in sync_data
    self.load_target_adapter()
  File "/usr/local/lib/python3.10/site-packages/nautobot_ssot/integrations/meraki/jobs.py", line 144, in load_target_adapter
    self.target_adapter.load()
  File "/usr/local/lib/python3.10/site-packages/nautobot_ssot/integrations/meraki/diffsync/adapters/nautobot.py", line 360, in load
    self.load_prefixes()
  File "/usr/local/lib/python3.10/site-packages/nautobot_ssot/integrations/meraki/diffsync/adapters/nautobot.py", line 191, in load_prefixes
    location=prefix.location.name if prefix.location else "",
  File "/usr/local/lib/python3.10/site-packages/nautobot/ipam/models.py", line 687, in location
    raise self.locations.model.MultipleObjectsReturned(
nautobot.dcim.models.locations.Location.MultipleObjectsReturned: Multiple Location objects returned. Please refer to locations.

Steps to Reproduce

  1. Install Nautobot and SSoT.
  2. Enable Meraki integration and configure to communicate to Meraki.
  3. Run Job with Prefixes that have multiple assigned locations.