-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #429 from nautobot/develop
Release v2.6.0
- Loading branch information
Showing
39 changed files
with
1,568 additions
and
635 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Created release for 2.6.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
"""Executes a job locally for testing purposes. | ||
To run this script use the following command: | ||
``` | ||
invoke nbshell \ | ||
--plain \ | ||
--file development/run_example_job.py \ | ||
--env RUN_SSOT_TARGET_JOB=False \ | ||
--env RUN_SSOT_JOB_DRY_RUN=True | ||
``` | ||
Passing environment variables to the script is optional. The script will default to running the data source job with a dry run enabled. | ||
""" | ||
|
||
import json | ||
import os | ||
|
||
from django.core.management import call_command | ||
from nautobot.core.settings_funcs import is_truthy | ||
from nautobot.extras.choices import SecretsGroupAccessTypeChoices | ||
from nautobot.extras.choices import SecretsGroupSecretTypeChoices | ||
from nautobot.extras.models import ExternalIntegration | ||
from nautobot.extras.models import Job | ||
from nautobot.extras.models import Secret | ||
from nautobot.extras.models import SecretsGroup | ||
from nautobot.extras.models import SecretsGroupAssociation | ||
|
||
_TOKEN = 40 * "a" | ||
os.environ["NAUTOBOT_DEMO_TOKEN"] = _TOKEN | ||
|
||
_NAUTOBOT_DEMO_URL = "https://demo.nautobot.com" | ||
_DRY_RUN = is_truthy(os.getenv("RUN_SSOT_JOB_DRY_RUN", "True")) | ||
|
||
module_name = "nautobot_ssot.jobs.examples" | ||
is_target_job = is_truthy(os.getenv("RUN_SSOT_TARGET_JOB", "False")) | ||
job_class_name = "ExampleDataTarget" if is_target_job else "ExampleDataSource" | ||
|
||
job = Job.objects.get(module_name=module_name, job_class_name=job_class_name) | ||
if not job.enabled: | ||
job.enabled = True | ||
job.validated_save() | ||
|
||
nautobot_demo, created = ExternalIntegration.objects.get_or_create( | ||
name="Nautobot Demo", | ||
defaults={ | ||
"remote_url": _NAUTOBOT_DEMO_URL, | ||
"verify_ssl": False, | ||
}, | ||
) | ||
|
||
if created: | ||
secret = Secret.objects.create( | ||
name="nautobot-demo-token", | ||
provider="environment-variable", | ||
parameters={"variable": "NAUTOBOT_DEMO_TOKEN"}, | ||
) | ||
secrets_group = SecretsGroup.objects.create(name="Nautobot Demo Group") | ||
SecretsGroupAssociation.objects.create( | ||
secret=secret, | ||
secrets_group=secrets_group, | ||
access_type=SecretsGroupAccessTypeChoices.TYPE_HTTP, | ||
secret_type=SecretsGroupSecretTypeChoices.TYPE_TOKEN, | ||
) | ||
nautobot_demo.secrets_group = secrets_group | ||
nautobot_demo.validated_save() | ||
|
||
data: dict = { | ||
"debug": True, | ||
"dryrun": _DRY_RUN, | ||
"memory_profiling": False, | ||
} | ||
|
||
if is_target_job: | ||
data["target"] = str(nautobot_demo.pk) | ||
data["target_url"] = _NAUTOBOT_DEMO_URL | ||
data["target_token"] = _TOKEN | ||
else: | ||
data["source"] = str(nautobot_demo.pk) | ||
data["source_url"] = _NAUTOBOT_DEMO_URL | ||
data["source_token"] = _TOKEN | ||
|
||
call_command( | ||
"runjob", | ||
f"{module_name}.{job_class_name}", | ||
data=json.dumps(data), | ||
username="admin", | ||
local=True, # Enable to run the job locally (not as a celery task) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
# v2.6 Release Notes | ||
|
||
## [v2.6.0 (2024-04-16)](https://github.com/nautobot/nautobot-app-ssot/releases/tag/v2.6.0) | ||
|
||
### Added | ||
|
||
- [#367](https://github.com/nautobot/nautobot-app-ssot/issues/367) - Added support of Roles, Platforms, Manufacturers, DeviceTypes, and Devices to example Jobs. | ||
|
||
### Changed | ||
|
||
- [#398](https://github.com/nautobot/nautobot-app-ssot/issues/398) - Changed Arista Cloud Vision jobs to optionally use ExternalIntegration. | ||
- [#414](https://github.com/nautobot/nautobot-app-ssot/issues/414) - Changed IPFabric interface media matching to fall back on interface names. | ||
|
||
### Fixed | ||
|
||
- [#367](https://github.com/nautobot/nautobot-app-ssot/issues/367) - Fixed issues with example Jobs. | ||
- [#407](https://github.com/nautobot/nautobot-app-ssot/issues/407) - Fixed logic check for 'hide_example_jobs' when defined, and also set to False. | ||
- [#409](https://github.com/nautobot/nautobot-app-ssot/issues/409) - Fixed tagging and custom field updates for Nautobot objects synced to/from Infoblox. | ||
- [#413](https://github.com/nautobot/nautobot-app-ssot/issues/413) - Fixed method of retrieving objects from IPFabric's technology categories. | ||
|
||
### Housekeeping | ||
|
||
- [#418](https://github.com/nautobot/nautobot-app-ssot/issues/418) - Unpins multiple dependencies. | ||
- [#421](https://github.com/nautobot/nautobot-app-ssot/issues/421) - Opened prometheus-client dependency range and removed direct drf-spectacular dependency. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.