Skip to content

Commit

Permalink
Merge pull request #207 from nautobot/patch-fix_ssot_adapter
Browse files Browse the repository at this point in the history
Fix SSoT Adapter
  • Loading branch information
jdrew82 authored Dec 18, 2024
2 parents 14f350a + e40326f commit 42e5dd8
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

from diffsync import Adapter

from {{ cookiecutter.app_name }}.diffsync.models import DiffsyncDevice
from {{ cookiecutter.app_name }}.diffsync.models import DeviceSSoTModel


class {{ cookiecutter.system_of_record_camel }}RemoteAdapter(Adapter):
"""DiffSync adapter for {{ cookiecutter.system_of_record }}."""

device = DiffsyncDevice
device = DeviceSSoTModel

top_level = ["device"]

Expand All @@ -17,7 +17,7 @@ def __init__(self, *args, job=None, sync=None, client=None, **kwargs):
Args:
job (object, optional): {{ cookiecutter.system_of_record }} job. Defaults to None.
sync (object, optional): {{ cookiecutter.system_of_record }} DiffSync. Defaults to None.
sync (object, optional): {{ cookiecutter.system_of_record }} SSoT. Defaults to None.
client (object): {{ cookiecutter.system_of_record }} API client connection object.
"""
super().__init__(*args, **kwargs)
Expand All @@ -26,19 +26,19 @@ def __init__(self, *args, job=None, sync=None, client=None, **kwargs):
self.conn = client

def load(self):
"""Load data from {{ cookiecutter.system_of_record }} into DiffSync models."""
"""Load data from {{ cookiecutter.system_of_record }} into SSoT models."""
raise NotImplementedError()


class {{ cookiecutter.system_of_record_camel }}NautobotAdapter(NautobotAdapter):
"""DiffSync adapter for Nautobot."""

device = NautobotDevice
device = DeviceSSoTModel

top_level = ["device"]

{% if cookiecutter.direction_of_sync == "From Nautobot" %}
def load(self):
"""Load data from Nautobot into DiffSync models."""
"""Load data from Nautobot into SSoT models."""
raise NotImplementedError()
{% endif %}

0 comments on commit 42e5dd8

Please sign in to comment.