Skip to main content

Nautobot's Welcome Wizard

Project description

Welcome Wizard

Code Style Coverage

A plugin for Nautobot.

Wecome Wizard GIF

Overview

The Welcome Wizard is an open-source Nautobot Plugin with the goal to assist users with the necessary initial steps in populating data within Nautobot.

The Welcome Wizard adds four (4) key features:

Import Wizard

Welcome Wizard uses the Import Wizard to allow ease of adding community defined Device Types and Manufacturers into Nautobot. This is built upon the git datasources feature of Nautobot.

Quick-Start Settings

Welcome Wizard includes by default the DeviceType-library, but this can be disabled and a custom library can be used instead.

Helpful Middleware

Welcome Wizard includes banners in forms to alert the user when required form fields have no associated resources in Nautobot.

Welcome Wizard Dashboard

The Welcome Wizard Dashboard contains a list of common Nautobot Data Models that many other Nautobot models require. This page allows ease of adding items to Nautobot or, if supported, importing them. This ties all of the features together.1

Installation

Installing the Nautobot Welcome Wizard follows the Plugin Installation.

The plugin is available as a Python package in pypi and can be installed with pip

pip install nautobot-welcome-wizard

The plugin is compatible with Nautobot 1.0.0b4 and higher

To ensure Welcome Wizard is automatically re-installed during future upgrades, create a file named local_requirements.txt (if not already existing) in the Nautobot root directory (alongside requirements.txt) and list the nautobot-welcome-wizard package:

# echo nautobot-welcome-wizard >> local_requirements.txt

Once installed, the plugin needs to be enabled in your nautobot_config.py

# In your nautobot_config.py
PLUGINS = ["welcome_wizard"]

# PLUGINS_CONFIG = {
#   "welcome_wizard": {
#     "enable_devicetype-library": True
#   }
# }

The plugin behavior can be controlled with the following list of settings:

  • enable_devicetype-library: If enabled the device type git repository will be automatically added for you.

After updating nautobot_config.py, you will need to run nautobot-server migrate and then reload the nautobot service and the nautobot-worker service.

Usage

Log in to Nautobot and you will be guided through Banners on the top of the pages.

Contributing

Pull Requests are welcome and automatically built and tested against multiple versions of Python and Nautobot through TravisCI.

The project is packaged with a light development environment based on docker-compose to help with the local development of the project and to run the tests within TravisCI.

The project is following Network to Code's software development guideline and is leveraging:

  • Black, Pylint, Bandit and pydocstyle for Python linting and formatting.
  • Django unit test to ensure the plugin is working properly.

Development Environment

The development environment can be used in 2 ways. First, with a local poetry environment if you wish to develop outside of docker, and second, inside of a docker container. The below commands will start the Nautobot server listening on port 8080.

Local Poetry Development Environment

  1. Copy development/creds.example.env to development/creds.env (This file will be ignored by git and docker)
  2. Uncomment the POSTGRES_HOST, REDIS_HOST, and NAUTOBOT_ROOT variables in development/creds.env
  3. Create an invoke.yml with the following contents at the root of the repo:
---
welcome_wizard:
  local: true
  compose_files:
    - "docker-compose.requirements.yml"
  1. Run the following commands:
poetry shell
poetry install
export $(cat development/dev.env | xargs)
export $(cat development/creds.env | xargs)
  1. You can now run nautobot-server commands as you would from the Nautobot documentation. For example, to start the development server:
nautobot-server runserver 0.0.0.0:8080 --insecure

Docker Development Environment

This project is managed by Python Poetry and has a few requirements to setup your development environment:

  1. Install Poetry, see the Poetry Documentation for your operating system.
  2. Install Docker, see the Docker documentation for your operating system.

Once you have Poetry and Docker installed you can run the following commands to install all other development dependencies in an isolated python virtual environment:

poetry shell
poetry install
invoke start

CLI Helper Commands

The project includes a CLI helper based on invoke to help setup the development environment. The commands are listed below in 3 categories dev environment, utility and testing.

Each command can be executed with invoke <command>. Environment variables INVOKE_WELCOME_WIZARD_PYTHON_VER and INVOKE_WELCOME_WIZARD_NAUTOBOT_VER may be specified to override the default versions. Each command also has its own help invoke <command> --help

Docker dev environment

  build            Build all docker images.
  debug            Start Nautobot and its dependencies in debug mode.
  destroy          Destroy all containers and volumes.
  restart          Restart Nautobot and its dependencies.
  start            Start Nautobot and its dependencies in detached mode.
  stop             Stop Nautobot and its dependencies.

Utility

  cli              Launch a bash shell inside the running Nautobot container.
  create-user      Create a new user in django (default: admin), will prompt for password.
  makemigrations   Run Make Migration in Django.
  nbshell          Launch a nbshell session.

Testing

  bandit           Run bandit to validate basic static code security analysis.
  black            Run black to check that Python files adhere to its style standards.
  flake8           This will run flake8 for the specified name and Python version.
  pydocstyle       Run pydocstyle to validate docstring formatting adheres to NTC defined standards.
  pylint           Run pylint code analysis.
  tests            Run all tests for this plugin.
  unittest         Run Django unit tests for the plugin.

Questions

For any questions or comments, please check the FAQ first and feel free to swing by the Network to Code slack channel (channel #networktocode). Sign up here

Screenshots

Welcome Wizard Banner
Welcome Wizard Middleware
Welcome Wizard Dashboard
Welcome Wizard Completions Welcome Wizard Import Device Types

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nautobot-welcome-wizard-1.0.1.tar.gz (23.6 kB view details)

Uploaded Source

Built Distribution

nautobot_welcome_wizard-1.0.1-py3-none-any.whl (34.9 kB view details)

Uploaded Python 3

File details

Details for the file nautobot-welcome-wizard-1.0.1.tar.gz.

File metadata

  • Download URL: nautobot-welcome-wizard-1.0.1.tar.gz
  • Upload date:
  • Size: 23.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.6.7 Linux/4.15.0-1077-gcp

File hashes

Hashes for nautobot-welcome-wizard-1.0.1.tar.gz
Algorithm Hash digest
SHA256 f52a20a308192fc67ffecd682b5acb53fab9032895bfb59b32286a9b8b3c31a0
MD5 359f9967f875a3a63413b30607f04103
BLAKE2b-256 70ccaa5a5082c22f4bdf9317a48a79deb43e60f8156f1d904be6b0854245b364

See more details on using hashes here.

File details

Details for the file nautobot_welcome_wizard-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for nautobot_welcome_wizard-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f34814d84ec172d7e64a47ba74b5a151a6c90fbc1e399f5cd2026fd93ac5d137
MD5 1efdf01eda25f349b88143f12fff8a65
BLAKE2b-256 b69ac49e1f1c1863cd67ece16ed2d4521b6a906fbce2da0cac3e2cce85be4f7e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page