nautobot/nautobot-app-ssot

Job Cisco ACI Data Source Fail with error KeyError: 'vrf'

Cymmus opened this issue · 2 comments

Environment

  • Python version: 3.11.9
  • Nautobot version: 2.2.3
  • nautobot-ssot version: 2.6.1

Expected Behavior

Job should work properly and sync information from ACI

Observed Behavior

Job failed with error KeyError: 'vrf'

Steps to Reproduce

I have nautobot in a container with the following config for the Ssot plugin:

PLUGINS_CONFIG = {
    "nautobot_ssot": {
        # Enable Cisco ACI integration
        "enable_aci": True,
        # URL and credentials should be configured as environment variables on the host system
        "aci_apics": {x: os.environ[x] for x in os.environ if "APIC" in x},
        # Tag which will be created and applied to all synchronized objects.
        "aci_tag": "ACI",
        # Manufacturer name. Specify existing, or a new one with this name will be created.
        "aci_manufacturer_name": "Cisco",
        # Exclude any tenants you would not like to bring over from ACI.
        "aci_ignore_tenants": ["mgmt", "infra"],
        # The below value will appear in the Comments field on objects created in Nautobot
        "aci_comments": "Created by ACI SSoT Integration",
     }
}

But when the job try to sync the BridgeDomain/Prefixes it failed to do so because the tenant mgmt is not correctly ignored.

In the file nautobot_ssot/integrations/aci/diffsync/adapters/aci at line 258 (branch develop) the "if" condition to check the tenant that should be ignore is not working properly.

the variable "tenant_name" at line 253 include the tenant_prefix wich make the condition at line 258 irrelevant.

This might be addressed with #486

@Cymmus I'm going to assume this issue has been resolved with #486. We can reopen it if the issue persists.