nautobot/nautobot-app-ssot

AristaCV 2.7.0 - ObjectAlreadyExists on IpAddresssToInterface

etiennelatulippe opened this issue · 0 comments

Environment

  • Python version: 3.11.9
  • Nautobot version: 2.2.8
  • nautobot-ssot version: 2.7.0

Got this error on the CVaas to Nautobot integration sync:


{
  "exc_message": [
    "Objects 10.x.x.x/24__NAMESPACE__DEVICE__VLAN already present",
    [
      "model_flags",
      []
    ],
    [
      "diff_sync",
      null
    ],
    [
      "address",
      "10.x.x.x/24"
    ],
    [
      "namespace",
      "NAMESCAPE"
    ],
    [
      "device",
      "DEVICE"
    ],
    [
      "interface",
      "VLAN"
    ],
    [
      "primary",
      false
    ],
    [
      "uuid",
      "xxxx-xxx-xx"
    ]
  ],
  "exc_module": "diffsync.exceptions",
  "exc_type": "ObjectAlreadyExists"
}

Expected Behavior

I think that we should skip the IpAddresssToInterface object creation if it already exists.

Observed Behavior

The integration doesn't catch the exception.

https://github.com/nautobot/nautobot-app-ssot/blob/develop/nautobot_ssot/integrations/aristacv/diffsync/adapters/nautobot.py#L146

Steps to Reproduce

  1. Got IpAddresssToInterface objects that already exist.
  2. Sync from CVaaS to Nautobot.