Skip to content

[WIP] Draft / prototype for device discovery #354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 8 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions nautobot_device_onboarding/choices.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
"""Choices used througout the app."""
from nautobot.core.choices import ChoiceSet


SSOT_JOB_TO_COMMAND_CHOICE = (
("sync_devices", "Sync Devices"),
("sync_network_data", "Sync Network Data"),
("both", "Both"),
)


class AutodiscoveryProtocolTypeChoices(ChoiceSet):
"""Auto Discovery Protocol Type Choices."""

SSH = "ssh"

CHOICES = (
(SSH, "ssh"),
)
8 changes: 8 additions & 0 deletions nautobot_device_onboarding/constants.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
"""Constants for nautobot_device_onboarding app."""

from django.conf import settings
from netutils.data_files.protocol_mappings import PROTOCOLS as NETUTILS_PROTOCOLS

from .choices import AutodiscoveryProtocolTypeChoices


NETMIKO_EXTRAS = (
settings.PLUGINS_CONFIG.get("nautobot_plugin_nornir", {})
Expand Down Expand Up @@ -50,3 +54,7 @@

# The git repository data source folder name for custom command mappers.
ONBOARDING_COMMAND_MAPPERS_REPOSITORY_FOLDER = "onboarding_command_mappers"

AUTODISCOVERY_PORTS = {
AutodiscoveryProtocolTypeChoices.SSH: [NETUTILS_PROTOCOLS["ssh"]["port_number"]],
}
Loading
Loading