From f47b352c481e8c20b659ea3133703c9d3161f268 Mon Sep 17 00:00:00 2001 From: Adam Byczkowski Date: Thu, 19 Aug 2021 11:32:13 -0500 Subject: [PATCH 1/8] Added default import values --- README.md | 33 ++++++++++++++----- development/docker-compose.requirements.yml | 2 -- .../diffsync/fromcv/models.py | 25 ++++++++++---- nautobot_ssot_aristacv/diffsync/nbutils.py | 23 +++++++++++++ nautobot_ssot_aristacv/signals.py | 2 +- 5 files changed, 68 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 45ace67..131dc90 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ A plugin for [Nautobot](https://github.com/nautobot/nautobot) that allows synchr | CloudVision System Tags | Nautobot Device Custom Field | |-------------------------|------------------------------| | topology_network_type | Topology Network Typ | -| mlag | MLAG | +| mlag | mlag | | mpls | mpls | | model | Device Platform* | | systype | Systype | @@ -56,7 +56,7 @@ To ensure Nautobot to Arista CloudVision Sync is automatically re-installed duri # echo nautobot_ssot_aristacv >> local_requirements.txt ``` -Once installed, the plugin needs to be enabled in your `nautobot_configuration.py` +Once installed, the plugin needs to be enabled in your `nautobot_configuration.py` and plugin settings need to be defined. ```python # In your configuration.py @@ -67,11 +67,23 @@ PLUGINS = ["nautobot_ssot", "nautobot_ssot_aristacv"] # ADD YOUR SETTINGS HERE # } # "nautobot_ssot_aristacv": { -# ADD YOUR SETTINGS HERE +# "cvaas_token": "", +# "cvp_host": "", +# "cvp_user": "", +# "cvp_password": "", +# "insecure": "", +# "from_cloudvision_default_site": "", +# "from_cloudvision_default_device_role": "", +# "from_cloudvision_default_device_role_color": "", +# "from_cloudvision_default_device_status": "", +# "from_cloudvision_default_device_status_color": "", +# "delete_devices_on_sync_cv_source": "" # } # } ``` +> All plugin settings are defined in the picture above as an example. Only some will be needed as described below. + Upon installation, this plugin creates the following custom fields in Nautobot: - `arista_bgp` @@ -104,14 +116,19 @@ To connect to a cloud instance of CloudVision you must set the following variabl When syncing from CloudVision, this plugin will create new devices that do not exist in Nautobot. In order for this to work properly, you must provide the following default value sin the nautobot config file. -- `from_cloudvision_default_site` string: The default site used when syncing creates new devices in Nautobot. -- `from_cloudvision_default_device_role` string: The default device role used when the syncing creates new devices in Nautobot. -- `from_cloudvision_default_device_role_color` string: The default color to assign to the default role. -- `from_cloudvision_default_device_status`: string: The default status used when the syncing creates new devices in Nautobot. +- `from_cloudvision_default_site` string: The default site used when syncing creates new devices in Nautobot. Defaults to `cloudvision_imported`. +- `from_cloudvision_default_device_role` string: The default device role used when the syncing creates new devices in Nautobot. Defaults to `network`. +- `from_cloudvision_default_device_role_color` string: The default color to assign to the default role. Defaults to `ff0000`. +- `from_cloudvision_default_device_status`: string: The default status used when the syncing creates new devices in Nautobot. Defaults to `cloudvision_imported`. +- `from_cloudvision_default_device_status_color`: string: The default color to assign to the default status. Defaults to `ff0000`. + +> When these variables are not defined in the plugin settings, the plugin will use the default values mentioned. Lastly, when a device exists in Nautobot but not in CloudVision, this plugin can either delete or leave the device in Nautobot. That behavior can be set with the following variable in the nautobot config file. -- `delete_devices_on_sync_cv_source` boolean (default False): If true, this will delete devices in Nautbot that do not exist in CloudVision when syncing from CloudVision. +- `delete_devices_on_sync_cv_source` boolean (default False): If true, this will delete devices in Nautbot that do not exist in CloudVision when syncing from CloudVision. Defaults to `False`. + +> when this variable is not defined in the plugin settings, the plugin will default to using `False`. ## Usage diff --git a/development/docker-compose.requirements.yml b/development/docker-compose.requirements.yml index 175cd29..dfc2353 100644 --- a/development/docker-compose.requirements.yml +++ b/development/docker-compose.requirements.yml @@ -19,7 +19,5 @@ services: env_file: - "dev.env" - "creds.env" - ports: - - "6379:6379" volumes: postgres_data: {} diff --git a/nautobot_ssot_aristacv/diffsync/fromcv/models.py b/nautobot_ssot_aristacv/diffsync/fromcv/models.py index 69566b0..48ff19f 100644 --- a/nautobot_ssot_aristacv/diffsync/fromcv/models.py +++ b/nautobot_ssot_aristacv/diffsync/fromcv/models.py @@ -4,13 +4,20 @@ from django.conf import settings from nautobot.dcim.models import Device as NautobotDevice from nautobot.dcim.models import Platform as NautobotPlatform -from nautobot.extras.models.statuses import Status from typing import List, Optional import nautobot_ssot_aristacv.diffsync.nbutils as nbutils import nautobot_ssot_aristacv.diffsync.cvutils as cvutils import distutils +DEFAULT_SITE = "cloudvision_imported" +DEFAULT_DEVICE_ROLE = "network" +DEFAULT_DEVICE_ROLE_COLOR = "ff0000" +DEFAULT_DEVICE_STATUS = "cloudvision_imported" +DEFAULT_DEVICE_STATUS_COLOR = "ff0000" +DEFAULT_DELETE_DEVICES_ON_SYNC = False + + class Device(DiffSyncModel): """Device Model.""" @@ -28,7 +35,7 @@ class Device(DiffSyncModel): def create(cls, diffsync, ids, attrs): """Create device object in Nautobot.""" configs = settings.PLUGINS_CONFIG.get("nautobot_ssot_aristacv", {}) - default_site_object = nbutils.verify_site(configs.get("from_cloudvision_default_site")) + default_site_object = nbutils.verify_site(configs.get("from_cloudvision_default_site", DEFAULT_SITE)) cvutils.connect() device_dict = next((device for device in cvutils.get_devices() if device["hostname"] == ids["name"]), {}) @@ -36,11 +43,17 @@ def create(cls, diffsync, ids, attrs): device_type_object = nbutils.verify_device_type_object(device_type_cv) device_role_object = nbutils.verify_device_role_object( - configs.get("from_cloudvision_default_device_role"), - configs.get("from_cloudvision_default_device_role_color"), + configs.get("from_cloudvision_default_device_role", DEFAULT_DEVICE_ROLE), + configs.get("from_cloudvision_default_device_role_color", DEFAULT_DEVICE_ROLE_COLOR), ) + + device_status = nbutils.verify_device_status( + configs.get("from_cloudvision_default_device_status", DEFAULT_DEVICE_STATUS), + configs.get("from_cloudvision_default_device_status_color", DEFAULT_DEVICE_STATUS_COLOR), + ) + new_device = NautobotDevice( - status=Status.objects.get(name=configs.get("from_cloudvision_default_device_status")), + status=device_status, device_type=device_type_object, device_role=device_role_object, site=default_site_object, @@ -59,7 +72,7 @@ def update(self, diffsync, attrs): def delete(self): """Delete device object in Nautobot.""" configs = settings.PLUGINS_CONFIG.get("nautobot_ssot_aristacv", {}) - if configs.get("delete_devices_on_sync"): + if configs.get("delete_devices_on_sync", DEFAULT_DELETE_DEVICES_ON_SYNC): self.diffsync.job.log_warning(message=f"Device {self.name} will be deleted per plugin settings.") device = NautobotDevice.objects.get(name=self.name) device.delete() diff --git a/nautobot_ssot_aristacv/diffsync/nbutils.py b/nautobot_ssot_aristacv/diffsync/nbutils.py index aaf9ffa..e7a2e30 100644 --- a/nautobot_ssot_aristacv/diffsync/nbutils.py +++ b/nautobot_ssot_aristacv/diffsync/nbutils.py @@ -2,6 +2,7 @@ from nautobot.dcim.models import DeviceType, DeviceRole, Site, Manufacturer from nautobot.extras.models.statuses import Status from nautobot.extras.models.customfields import CustomField +from django.contrib.contenttypes.models import ContentType def verify_site(site_name): @@ -58,6 +59,28 @@ def verify_device_role_object(role_name, role_color): return role_obj +def verify_device_status(device_status, device_status_color): + """Verifies device status object exists in Nautobot. If not, creates specified device status. + + Args: + device_status (str): Status name. + device_status_color (str): Status color. + """ + try: + status_obj = Status.objects.get(name=device_status) + except Status.DoesNotExist: + dcim_device = ContentType.objects.get(app_label="dcim", model="device") + status_obj = Status( + name=device_status, + slug=device_status.lower(), + color=device_status_color, + description="Devices imported from CloudVision.", + ) + status_obj.validated_save() + status_obj.content_types.set([dcim_device]) + return status_obj + + def assign_arista_cf(device): """Assigns arista custom fields to device.""" for cf in CustomField.objects.filter(name__contains="arista"): diff --git a/nautobot_ssot_aristacv/signals.py b/nautobot_ssot_aristacv/signals.py index 4d50394..5bc231f 100644 --- a/nautobot_ssot_aristacv/signals.py +++ b/nautobot_ssot_aristacv/signals.py @@ -54,7 +54,7 @@ def post_migrate_create_custom_fields(apps, **kwargs): { "name": "arista_mlag", "type": CustomFieldTypeChoices.TYPE_TEXT, - "label": "MLAG", + "label": "mlag", }, { "name": "arista_tapagg", From 3fc27bb2e31d11003e236b9bea2f4f20b8c52e71 Mon Sep 17 00:00:00 2001 From: Adam Byczkowski Date: Thu, 19 Aug 2021 12:06:21 -0500 Subject: [PATCH 2/8] Added defaults to configuration table --- nautobot_ssot_aristacv/jobs.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/nautobot_ssot_aristacv/jobs.py b/nautobot_ssot_aristacv/jobs.py index 93c7ea2..e8acf84 100644 --- a/nautobot_ssot_aristacv/jobs.py +++ b/nautobot_ssot_aristacv/jobs.py @@ -18,6 +18,7 @@ from nautobot_ssot_aristacv.diffsync.fromcv.cloudvision import CloudVision as C from nautobot_ssot_aristacv.diffsync.fromcv.nautobot import Nautobot as N +from nautobot_ssot_aristacv.diffsync.fromcv.models import DEFAULT_SITE, DEFAULT_DEVICE_ROLE, DEFAULT_DEVICE_ROLE_COLOR, DEFAULT_DEVICE_STATUS, DEFAULT_DEVICE_STATUS_COLOR, DEFAULT_DELETE_DEVICES_ON_SYNC import nautobot_ssot_aristacv.diffsync.cvutils as cvutils @@ -44,21 +45,23 @@ def config_information(cls): "CloudVision host": configs.get("cvp_host"), "Username": configs.get("cvp_user"), "Insecure": configs.get("insecure"), - "Delete devices on sync": configs.get("delete_devices_on_sync"), - "New device default site": configs.get("from_cloudvision_default_site"), - "New device default role": configs.get("from_cloudvision_default_device_role"), - "New device default role color": configs.get("from_cloudvision_default_device_role_color"), - "New device default status": configs.get("from_cloudvision_default_device_status") + "Delete devices on sync": configs.get("delete_devices_on_sync", str(DEFAULT_DELETE_DEVICES_ON_SYNC)), + "New device default site": configs.get("from_cloudvision_default_site", DEFAULT_SITE), + "New device default role": configs.get("from_cloudvision_default_device_role", DEFAULT_DEVICE_ROLE), + "New device default role color": configs.get("from_cloudvision_default_device_role_color", DEFAULT_DEVICE_ROLE_COLOR), + "New device default status": configs.get("from_cloudvision_default_device_status", DEFAULT_DEVICE_STATUS), + "New device default status color": configs.get("from_cloudvision_default_device_status", DEFAULT_DEVICE_STATUS_COLOR) # Password is intentionally omitted! } return { "Server type": "CVaaS", "CloudVision host": "www.arista.io", - "Delete_devices_on_sync": configs.get("delete_devices_on_sync"), - "New device default site": configs.get("from_cloudvision_default_site"), - "New device default role": configs.get("from_cloudvision_default_device_role"), - "New device default role color": configs.get("from_cloudvision_default_device_role_color"), - "New device default status": configs.get("from_cloudvision_default_device_status") + "Delete_devices_on_sync": configs.get("delete_devices_on_sync", str(DEFAULT_DELETE_DEVICES_ON_SYNC)), + "New device default site": configs.get("from_cloudvision_default_site", DEFAULT_SITE), + "New device default role": configs.get("from_cloudvision_default_device_role", DEFAULT_DEVICE_ROLE), + "New device default role color": configs.get("from_cloudvision_default_device_role_color", DEFAULT_DEVICE_ROLE_COLOR), + "New device default status": configs.get("from_cloudvision_default_device_status", DEFAULT_DEVICE_STATUS), + "New device default status color": configs.get("from_cloudvision_default_device_status", DEFAULT_DEVICE_STATUS_COLOR) # Token is intentionally omitted! } From 722760bc01f30ad8cae3ea7253c28c610b2fe9e3 Mon Sep 17 00:00:00 2001 From: Adam Byczkowski Date: Thu, 19 Aug 2021 12:07:55 -0500 Subject: [PATCH 3/8] Blackened --- nautobot_ssot_aristacv/jobs.py | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/nautobot_ssot_aristacv/jobs.py b/nautobot_ssot_aristacv/jobs.py index e8acf84..95da5db 100644 --- a/nautobot_ssot_aristacv/jobs.py +++ b/nautobot_ssot_aristacv/jobs.py @@ -18,7 +18,14 @@ from nautobot_ssot_aristacv.diffsync.fromcv.cloudvision import CloudVision as C from nautobot_ssot_aristacv.diffsync.fromcv.nautobot import Nautobot as N -from nautobot_ssot_aristacv.diffsync.fromcv.models import DEFAULT_SITE, DEFAULT_DEVICE_ROLE, DEFAULT_DEVICE_ROLE_COLOR, DEFAULT_DEVICE_STATUS, DEFAULT_DEVICE_STATUS_COLOR, DEFAULT_DELETE_DEVICES_ON_SYNC +from nautobot_ssot_aristacv.diffsync.fromcv.models import ( + DEFAULT_SITE, + DEFAULT_DEVICE_ROLE, + DEFAULT_DEVICE_ROLE_COLOR, + DEFAULT_DEVICE_STATUS, + DEFAULT_DEVICE_STATUS_COLOR, + DEFAULT_DELETE_DEVICES_ON_SYNC, +) import nautobot_ssot_aristacv.diffsync.cvutils as cvutils @@ -48,9 +55,15 @@ def config_information(cls): "Delete devices on sync": configs.get("delete_devices_on_sync", str(DEFAULT_DELETE_DEVICES_ON_SYNC)), "New device default site": configs.get("from_cloudvision_default_site", DEFAULT_SITE), "New device default role": configs.get("from_cloudvision_default_device_role", DEFAULT_DEVICE_ROLE), - "New device default role color": configs.get("from_cloudvision_default_device_role_color", DEFAULT_DEVICE_ROLE_COLOR), - "New device default status": configs.get("from_cloudvision_default_device_status", DEFAULT_DEVICE_STATUS), - "New device default status color": configs.get("from_cloudvision_default_device_status", DEFAULT_DEVICE_STATUS_COLOR) + "New device default role color": configs.get( + "from_cloudvision_default_device_role_color", DEFAULT_DEVICE_ROLE_COLOR + ), + "New device default status": configs.get( + "from_cloudvision_default_device_status", DEFAULT_DEVICE_STATUS + ), + "New device default status color": configs.get( + "from_cloudvision_default_device_status", DEFAULT_DEVICE_STATUS_COLOR + ) # Password is intentionally omitted! } return { @@ -59,9 +72,13 @@ def config_information(cls): "Delete_devices_on_sync": configs.get("delete_devices_on_sync", str(DEFAULT_DELETE_DEVICES_ON_SYNC)), "New device default site": configs.get("from_cloudvision_default_site", DEFAULT_SITE), "New device default role": configs.get("from_cloudvision_default_device_role", DEFAULT_DEVICE_ROLE), - "New device default role color": configs.get("from_cloudvision_default_device_role_color", DEFAULT_DEVICE_ROLE_COLOR), + "New device default role color": configs.get( + "from_cloudvision_default_device_role_color", DEFAULT_DEVICE_ROLE_COLOR + ), "New device default status": configs.get("from_cloudvision_default_device_status", DEFAULT_DEVICE_STATUS), - "New device default status color": configs.get("from_cloudvision_default_device_status", DEFAULT_DEVICE_STATUS_COLOR) + "New device default status color": configs.get( + "from_cloudvision_default_device_status", DEFAULT_DEVICE_STATUS_COLOR + ) # Token is intentionally omitted! } From b0cbda03a1986769e3a0527b48315d2f4e1bfd7b Mon Sep 17 00:00:00 2001 From: Adam Byczkowski Date: Thu, 19 Aug 2021 20:07:47 -0500 Subject: [PATCH 4/8] Updated per Chips suggestion --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 131dc90..c82a876 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ To connect to a cloud instance of CloudVision you must set the following variabl - `cvaas_token` string: Token to be used when connected to CloudVision as a Service. -When syncing from CloudVision, this plugin will create new devices that do not exist in Nautobot. In order for this to work properly, you must provide the following default value sin the nautobot config file. +When syncing from CloudVision, this plugin will create new devices that do not exist in Nautobot. In order for this to work properly, you must provide the following default values in the nautobot config file. - `from_cloudvision_default_site` string: The default site used when syncing creates new devices in Nautobot. Defaults to `cloudvision_imported`. - `from_cloudvision_default_device_role` string: The default device role used when the syncing creates new devices in Nautobot. Defaults to `network`. @@ -126,9 +126,9 @@ When syncing from CloudVision, this plugin will create new devices that do not e Lastly, when a device exists in Nautobot but not in CloudVision, this plugin can either delete or leave the device in Nautobot. That behavior can be set with the following variable in the nautobot config file. -- `delete_devices_on_sync_cv_source` boolean (default False): If true, this will delete devices in Nautbot that do not exist in CloudVision when syncing from CloudVision. Defaults to `False`. +- `delete_devices_on_sync_cv_source` boolean (default False): If true, this will delete devices in Nautobot with device type manufacturer set to Arista that do not exist in CloudVision when syncing from CloudVision. Defaults to `False`. -> when this variable is not defined in the plugin settings, the plugin will default to using `False`. +> When this variable is not defined in the plugin settings, the plugin will default to using `False`. ## Usage From 4bee1a132e3dafb011831a3b68b248ad5b0e3047 Mon Sep 17 00:00:00 2001 From: Adam Byczkowski Date: Mon, 23 Aug 2021 15:16:49 -0500 Subject: [PATCH 5/8] Added tables in README --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c82a876..9ed12d8 100644 --- a/README.md +++ b/README.md @@ -4,16 +4,16 @@ A plugin for [Nautobot](https://github.com/nautobot/nautobot) that allows synchr | CloudVision System Tags | Nautobot Device Custom Field | |-------------------------|------------------------------| -| topology_network_type | Topology Network Typ | +| topology_network_type | Topology Network Type | | mlag | mlag | | mpls | mpls | | model | Device Platform* | -| systype | Systype | +| systype | systype | | serialnumber | Device Serial Number | | pimbidir | pimbidir | | sflow | sFlow | -| eostrain | eostrain | -| tapagg | tapagg | +| eostrain | EOS Train | +| tapagg | TAP Aggregation | | pim | pim | | bgp | bgp | | terminattr | TerminAttr Version | From 76876efb5f99304df2c8709632d74d1ce29c7a9b Mon Sep 17 00:00:00 2001 From: Adam Byczkowski Date: Mon, 23 Aug 2021 15:29:56 -0500 Subject: [PATCH 6/8] Added tabled --- README.md | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 9ed12d8..b39c122 100644 --- a/README.md +++ b/README.md @@ -105,28 +105,36 @@ Upon installation, this plugin creates the following custom fields in Nautobot: The plugin can connect to either on-premise or a cloud instance of CloudVision. To connect to an on-premise instance you must set the following variables in the nautobot configuration file. -- `cvp_host` string: The hostname or address of the onprem instance of CloudVision -- `cvp_user` string: The username used to connect to the onprem instance CloudVision. -- `cvp_password` string: The password used to connect to the onprem instance CloudVision. -- `insecure` boolean: If true, the plugin will download the certificate from CloudVision and trusted for gRPC. +| Configuration Variable | Type | Usage | +|------------------------|---------|--------------------------------------------------------------------------------------------------| +| cvp_host | string | Hostname or ip address of the onprem instance of CloudVision. | +| cvp_user | string | The username used to connect to the onprem instance of CloudVision. | +| cvp_password | string | The password used by the user specified above. | +| insecure | boolean | If true, the plugin will download the certificate from CloudVision and trust it for gRPC calls. | To connect to a cloud instance of CloudVision you must set the following variable: -- `cvaas_token` string: Token to be used when connected to CloudVision as a Service. +| Configuration Variable | Type | Usage | +|------------------------|--------|---------------------------------------------------------------| +| cvaas_token | string | Token to be used when connecting to CloudVision as a Service. | When syncing from CloudVision, this plugin will create new devices that do not exist in Nautobot. In order for this to work properly, you must provide the following default values in the nautobot config file. -- `from_cloudvision_default_site` string: The default site used when syncing creates new devices in Nautobot. Defaults to `cloudvision_imported`. -- `from_cloudvision_default_device_role` string: The default device role used when the syncing creates new devices in Nautobot. Defaults to `network`. -- `from_cloudvision_default_device_role_color` string: The default color to assign to the default role. Defaults to `ff0000`. -- `from_cloudvision_default_device_status`: string: The default status used when the syncing creates new devices in Nautobot. Defaults to `cloudvision_imported`. -- `from_cloudvision_default_device_status_color`: string: The default color to assign to the default status. Defaults to `ff0000`. +| Configuration Variable | Type | Usage | Default | +|----------------------------------------------|--------|------------------------------------------------------------|----------------------| +| from_cloudvision_default_site | string | Default site created when syncing new devices to Nautobot. | cloudvision_imported | +| from_cloudvision_default_device_role | string | Default role created when syncing new devices to Nautobot. | network | +| from_cloudvision_default_device_role_color | string | Default role color used for default role. | ff0000 | +| from_cloudvision_default_device_status | string | Default status used when syncing new devices to Nautobot. | cloudvision_imported | +| from_cloudvision_default_device_status_color | string | Default status color used for default status. | ff0000 | > When these variables are not defined in the plugin settings, the plugin will use the default values mentioned. Lastly, when a device exists in Nautobot but not in CloudVision, this plugin can either delete or leave the device in Nautobot. That behavior can be set with the following variable in the nautobot config file. -- `delete_devices_on_sync_cv_source` boolean (default False): If true, this will delete devices in Nautobot with device type manufacturer set to Arista that do not exist in CloudVision when syncing from CloudVision. Defaults to `False`. +| Configuration Variable | Type | Usage | Default | +|---------------------------------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------| +| de;ete_deices_on_sync_cv_source | boolean | If true, devices in Nautobot with device type manufacturer name set to Arista that do not exist in CloudVision but do exist in Nautobot upon sync will be deleted. | False | > When this variable is not defined in the plugin settings, the plugin will default to using `False`. From 24b967cafd8fc9d5f94213473c216237cd175536 Mon Sep 17 00:00:00 2001 From: Chip Nielsen Date: Mon, 23 Aug 2021 13:38:52 -0700 Subject: [PATCH 7/8] Minor README updates --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b39c122..b8a203f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Nautobot to Arista CloudVision Sync -A plugin for [Nautobot](https://github.com/nautobot/nautobot) that allows synchronization of data directly between CloudVision and Nautobot. It synchronizes user device tags from Nautobot into CloudVision while using devices and system tags from CloudVision to ensure device syncronization and populate device metadata. Here is a table showing the data mappings when syncing from CloudVision. +A plugin for [Nautobot](https://github.com/nautobot/nautobot) that allows synchronization of data directly between CloudVision and Nautobot. It synchronizes user device tags from Nautobot into CloudVision while using devices and system tags from CloudVision to ensure device synchronization and populate device metadata. Here is a table showing the data mappings when syncing from CloudVision. | CloudVision System Tags | Nautobot Device Custom Field | |-------------------------|------------------------------| @@ -87,7 +87,7 @@ PLUGINS = ["nautobot_ssot", "nautobot_ssot_aristacv"] Upon installation, this plugin creates the following custom fields in Nautobot: - `arista_bgp` -- `arists_eos` +- `arista_eos` - `arista_eostrain` - `arista_mlag` - `arista_mpls` @@ -103,7 +103,7 @@ Upon installation, this plugin creates the following custom fields in Nautobot: > While these contain the prefix "arista" in the custom field admin portal, when looking at them on a device the prefix is removed. -The plugin can connect to either on-premise or a cloud instance of CloudVision. To connect to an on-premise instance you must set the following variables in the nautobot configuration file. +The plugin can connect to either on-premise or a cloud instance of CloudVision. To connect to an on-premise instance, you must set the following variables in the Nautobot configuration file. | Configuration Variable | Type | Usage | |------------------------|---------|--------------------------------------------------------------------------------------------------| @@ -118,7 +118,7 @@ To connect to a cloud instance of CloudVision you must set the following variabl |------------------------|--------|---------------------------------------------------------------| | cvaas_token | string | Token to be used when connecting to CloudVision as a Service. | -When syncing from CloudVision, this plugin will create new devices that do not exist in Nautobot. In order for this to work properly, you must provide the following default values in the nautobot config file. +When syncing from CloudVision, this plugin will create new Arista devices that do not exist in Nautobot. In order for this to work properly, you must provide the following default values in the nautobot config file. | Configuration Variable | Type | Usage | Default | |----------------------------------------------|--------|------------------------------------------------------------|----------------------| @@ -130,7 +130,7 @@ When syncing from CloudVision, this plugin will create new devices that do not e > When these variables are not defined in the plugin settings, the plugin will use the default values mentioned. -Lastly, when a device exists in Nautobot but not in CloudVision, this plugin can either delete or leave the device in Nautobot. That behavior can be set with the following variable in the nautobot config file. +Lastly, when an Arista device exists in Nautobot but not in CloudVision, this plugin can either delete or leave the device in Nautobot. That behavior can be set with the following variable in the nautobot config file. | Configuration Variable | Type | Usage | Default | |---------------------------------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------| From 35f1c44e11cfd8bda6abf2ec071c80b5f0717d36 Mon Sep 17 00:00:00 2001 From: Adam Byczkowski Date: Tue, 24 Aug 2021 11:09:34 -0500 Subject: [PATCH 8/8] Updated version --- nautobot_ssot_aristacv/__init__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nautobot_ssot_aristacv/__init__.py b/nautobot_ssot_aristacv/__init__.py index 41f7b68..4febf83 100644 --- a/nautobot_ssot_aristacv/__init__.py +++ b/nautobot_ssot_aristacv/__init__.py @@ -1,6 +1,6 @@ """Plugin declaration for aristacv_sync.""" -__version__ = "0.1.0" +__version__ = "1.0.1" import os diff --git a/pyproject.toml b/pyproject.toml index ec20e83..3971220 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "nautobot-ssot-aristacv" -version = "0.1.0" +version = "1.0.1" description = "Nautobot SSoT Arista CloudVision" authors = ["Network to Code, LLC "]