From 1bb4f52a9976976b5a1b9bee4a450a1802e8a13c Mon Sep 17 00:00:00 2001 From: Josh VanDeraa Date: Fri, 5 Nov 2021 17:09:29 -0500 Subject: [PATCH 1/2] Updates versioning config to read from pyproject. --- nautobot_device_lifecycle_mgmt/__init__.py | 12 +++++++++--- pyproject.toml | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/nautobot_device_lifecycle_mgmt/__init__.py b/nautobot_device_lifecycle_mgmt/__init__.py index 965a6048..1a591b9b 100644 --- a/nautobot_device_lifecycle_mgmt/__init__.py +++ b/nautobot_device_lifecycle_mgmt/__init__.py @@ -1,6 +1,11 @@ """Plugin declaration for the Device LifeCycle Management.""" +try: + from importlib import metadata +except ImportError: + # Python version < 3.8 + import importlib_metadata as metadata -__version__ = "0.1.0-beta.0" +__version__ = metadata.version(__name__) from django.db.models.signals import post_migrate @@ -13,9 +18,10 @@ class DeviceLifeCycleConfig(PluginConfig): name = "nautobot_device_lifecycle_mgmt" verbose_name = "Nautobot Device Lifecycle Management" version = __version__ - author = "Mikhail Yohman" + author = "Network to Code" + author_email = "opensource@networktocode.com" description = "Manages device lifecycle of Nautobot Devices and Components." - base_url = "device-lifecycle" + base_url = "nautobot-device-lifecycle-mgmt" required_settings = [] min_version = "1.0.0" max_version = "1.9999" diff --git a/pyproject.toml b/pyproject.toml index 9cb6074f..307eb90e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "nautobot-device-lifecycle-mgmt" -version = "0.2.1" +version = "0.2.2" description = "Manages device lifecycles for platforms and software." authors = [ "Josh Silvas ", From f51ef0a39465bc41188b7cc5e00b3bbd0b0a6fe2 Mon Sep 17 00:00:00 2001 From: Josh VanDeraa Date: Fri, 5 Nov 2021 17:10:41 -0500 Subject: [PATCH 2/2] Documentation updates --- README.md | 7 +----- docs/add_information.md | 2 +- docs/images/install_from_repo.md | 42 -------------------------------- 3 files changed, 2 insertions(+), 49 deletions(-) delete mode 100644 docs/images/install_from_repo.md diff --git a/README.md b/README.md index f971f669..2786b67d 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,7 @@ A plugin for [Nautobot](https://github.com/nautobot/nautobot) to manage device l ## Installation -### Pre-Publicly Available Installation - -For notes how to [install the plugin from a Git Repository](docs/images/install_from_repo.md). - -After completing the install of the plugin from Git repository continue to the next [install step](#installation-continued). -### Public Installation +### Installation The plugin is available as a Python package in pypi and can be installed with pip diff --git a/docs/add_information.md b/docs/add_information.md index 75ac63cd..ba028138 100644 --- a/docs/add_information.md +++ b/docs/add_information.md @@ -1,6 +1,6 @@ # Adding Data to Device Life Cycle Plugin -To add data into the Device Life Cycle Plugin, you need to either add it manually throught the UI, or through the REST API endpoint. In this current version there is no synchronization of data from a vendor API endpoint, but this may be a feature request in the future. +To add data into the Device Life Cycle Plugin, you need to either add it manually throughout the UI, or through the REST API endpoint. In this current version there is no synchronization of data from a vendor API endpoint, but this may be a feature request in the future. ## Plugin API Definition diff --git a/docs/images/install_from_repo.md b/docs/images/install_from_repo.md deleted file mode 100644 index 9754a50f..00000000 --- a/docs/images/install_from_repo.md +++ /dev/null @@ -1,42 +0,0 @@ -# Install from Repo - -To install from the repository first make sure the [prerequisites](#prerequisites) are completed. Then continue on for the technical installation. - -## Prerequisites - -1. NTC has been given a Github account to add to the appropriate group -2. [Github Personal Access Token created for your account](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token) - - -## Installation from Git - -1. Log into the user account used to install Nautobot, if following the Nautobot install documentation it is the `nautobot` user -``` -sudo -iu nautobot -``` -2. Execute pip install of Device Lifecycle Management Plugin using the HTTPS url and Personal Access Token -``` -pip install git+https://github.com/networktocode/nautobot-plugin-device-lifecycle-mgmt.git@v0.1.0 -``` - -**Example Output** -``` -nautobot@nautobot-host$ pip install git+https://github.com/networktocode/nautobot-plugin-device-lifecycle-mgmt.git -Collecting git+https://github.com/networktocode/nautobot-plugin-device-lifecycle-mgmt.git - Cloning https://github.com/networktocode/nautobot-plugin-device-lifecycle-mgmt.git to /tmp/pip-req-build-5p5b8zum - Running command git clone -q https://github.com/networktocode/nautobot-plugin-device-lifecycle-mgmt.git /tmp/pip-req-build-5p5b8zum -Username for 'https://github.com': jvanderaa -Password for 'https://jvanderaa@github.com': - Installing build dependencies ... done - Getting requirements to build wheel ... done - Preparing wheel metadata ... done -Building wheels for collected packages: nautobot-device-lifecycle-mgmt - Building wheel for nautobot-device-lifecycle-mgmt (PEP 517) ... done - Created wheel for nautobot-device-lifecycle-mgmt: filename=nautobot_device_lifecycle_mgmt-0.1.0-py3-none-any.whl size=43330 sha256=44ce2be2bc7c91ebea2a8a70ef65c39d2fe11e2130e1b4539d5c6734fe634ca8 - Stored in directory: /tmp/pip-ephem-wheel-cache-dpwds_ms/wheels/41/a6/d3/7eade40ff7bc4e1fd033f123c289c96d571ea581dc6ec1ea27 -Successfully built nautobot-device-lifecycle-mgmt -Installing collected packages: nautobot-device-lifecycle-mgmt -Successfully installed nautobot-device-lifecycle-mgmt-0.1.0 -``` - -Return [Home](../../README.md) to continue the installation process.