nautobot / nautobot-app-ssot

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

ServiceNow 2.X fails #449

Open itdependsnetworks opened 6 months ago

itdependsnetworks commented 6 months ago

Environment

Expected Behavior

Working job

Observed Behavior

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/celery/app/trace.py", line 477, in trace_task
    R = retval = fun(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/nautobot/extras/jobs.py", line 153, in __call__
    return self.run(*args, **deserialized_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/nautobot/.local/lib/python3.11/site-packages/nautobot_ssot/integrations/servicenow/jobs.py", line 89, in run
    super().run(dryrun, memory_profiling, *args, **kwargs)
  File "/opt/nautobot/.local/lib/python3.11/site-packages/nautobot_ssot/jobs/base.py", line 317, in run
    self.sync_data(memory_profiling)
  File "/opt/nautobot/.local/lib/python3.11/site-packages/nautobot_ssot/jobs/base.py", line 145, in sync_data
    self.load_target_adapter()
  File "/opt/nautobot/.local/lib/python3.11/site-packages/nautobot_ssot/integrations/servicenow/jobs.py", line 82, in load_target_adapter
    self.target_adapter.load()
  File "/opt/nautobot/.local/lib/python3.11/site-packages/nautobot_ssot/integrations/servicenow/diffsync/adapter_servicenow.py", line 83, in load
    ancestor = self.site_filter.region
               ^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Location' object has no attribute 'region'

Has not been updated to be 2.x compatible since it is referencing region.

Steps to Reproduce

  1. Run ServiceNow job
bryanculver commented 1 month ago

@itdependsnetworks I'm guessing "ServiceNow 2.X fails" means "ServiceNow SSoT Integration needs to be made compatible with Nautobot 2.X", not "ServiceNow SSoT Integration needs to be made compatible with ServiceNow 2.X"

bryanculver commented 1 month ago

We should add developer docs on how to setup a ServiceNow instance for testing or at least how to access an existing ServiceNow instance.