nautobot_ssot_ipfabric.diffsync.diffsync_models

DiffSyncModel subclasses for Nautobot-to-IPFabric data sync.

Module Contents

Classes

DiffSyncExtras

Additional components to mix and subclass from with DiffSyncModel.

Location

Location model.

Device

Device model.

Interface

Interface model.

Vlan

VLAN model.

Attributes

CONFIG

DEFAULT_DEVICE_ROLE

DEFAULT_DEVICE_ROLE_COLOR

DEFAULT_DEVICE_STATUS

DEFAULT_DEVICE_STATUS_COLOR

DEFAULT_INTERFACE_MAC

SAFE_DELETE_SITE_STATUS

SAFE_DELETE_DEVICE_STATUS

SAFE_DELETE_IPADDRESS_STATUS

SAFE_DELETE_VLAN_STATUS

nautobot_ssot_ipfabric.diffsync.diffsync_models.CONFIG
nautobot_ssot_ipfabric.diffsync.diffsync_models.DEFAULT_DEVICE_ROLE
nautobot_ssot_ipfabric.diffsync.diffsync_models.DEFAULT_DEVICE_ROLE_COLOR
nautobot_ssot_ipfabric.diffsync.diffsync_models.DEFAULT_DEVICE_STATUS
nautobot_ssot_ipfabric.diffsync.diffsync_models.DEFAULT_DEVICE_STATUS_COLOR
nautobot_ssot_ipfabric.diffsync.diffsync_models.DEFAULT_INTERFACE_MAC
nautobot_ssot_ipfabric.diffsync.diffsync_models.SAFE_DELETE_SITE_STATUS
nautobot_ssot_ipfabric.diffsync.diffsync_models.SAFE_DELETE_DEVICE_STATUS
nautobot_ssot_ipfabric.diffsync.diffsync_models.SAFE_DELETE_IPADDRESS_STATUS
nautobot_ssot_ipfabric.diffsync.diffsync_models.SAFE_DELETE_VLAN_STATUS
class nautobot_ssot_ipfabric.diffsync.diffsync_models.DiffSyncExtras

Bases: diffsync.DiffSyncModel

Additional components to mix and subclass from with DiffSyncModel.

safe_delete_mode :ClassVar[bool] = True
safe_delete(nautobot_object: Any, safe_delete_status: Optional[str] = None)

Safe delete an object, by adding tags or changing it’s default status.

Args:

nautobot_object (Any): Any type of Nautobot object safe_delete_status (Optional[str], optional): Status name, optional as some objects don’t have status field. Defaults to None.

class nautobot_ssot_ipfabric.diffsync.diffsync_models.Location

Bases: DiffSyncExtras

Location model.

_modelname = location
_identifiers = ['name']
_attributes = ['site_id', 'status']
_children
name :str
site_id :Optional[str]
status :str
devices :List[Device]
vlans :List[Vlan]
classmethod create(diffsync, ids, attrs)

Create Site in Nautobot.

delete() Optional[diffsync.DiffSyncModel]

Delete Site in Nautobot.

update(attrs)

Update Site Object in Nautobot.

class nautobot_ssot_ipfabric.diffsync.diffsync_models.Device

Bases: DiffSyncExtras

Device model.

_modelname = device
_identifiers = ['name']
_attributes = ['location_name', 'model', 'vendor', 'serial_number', 'role', 'status']
_children
name :str
location_name :Optional[str]
model :Optional[str]
vendor :Optional[str]
serial_number :Optional[str]
role :Optional[str]
status :Optional[str]
mgmt_address :Optional[str]
interfaces :List[Interface]
classmethod create(diffsync, ids, attrs)

Create Device in Nautobot under its parent site.

delete() Optional[diffsync.DiffSyncModel]

Delete device in Nautobot.

update(attrs)

Update devices in Nautbot based on Source.

class nautobot_ssot_ipfabric.diffsync.diffsync_models.Interface

Bases: DiffSyncExtras

Interface model.

_modelname = interface
_identifiers = ['name', 'device_name']
_shortname = ['name']
_attributes = ['description', 'enabled', 'mac_address', 'mtu', 'type', 'mgmt_only', 'ip_address',...
name :str
device_name :str
description :Optional[str]
enabled :Optional[bool]
mac_address :Optional[str]
mtu :Optional[int]
type :Optional[str]
mgmt_only :Optional[bool]
ip_address :Optional[str]
subnet_mask :Optional[str]
ip_is_primary :Optional[bool]
status :str
classmethod create(diffsync, ids, attrs)

Create interface in Nautobot under its parent device.

delete() Optional[diffsync.DiffSyncModel]

Delete Interface Object.

update(attrs)

Update Interface object in Nautobot.

class nautobot_ssot_ipfabric.diffsync.diffsync_models.Vlan

Bases: DiffSyncExtras

VLAN model.

_modelname = vlan
_identifiers = ['name', 'site']
_shortname = ['name']
_attributes = ['vid', 'status', 'description']
name :str
vid :int
status :str
site :str
description :Optional[str]
vlan_pk :Optional[uuid.UUID]
classmethod create(diffsync, ids, attrs)

Create VLANs in Nautobot under the site.

delete() Optional[diffsync.DiffSyncModel]

Delete.

update(attrs)

Update VLAN object in Nautobot.