Skip to content

Commit

Permalink
Merge pull request #412 from nautobot/release-v2.2.1
Browse files Browse the repository at this point in the history
Release v2.2.1
  • Loading branch information
smk4664 authored Jan 29, 2025
2 parents 1e45ede + e409911 commit 53e860e
Show file tree
Hide file tree
Showing 43 changed files with 1,760 additions and 1,314 deletions.
6 changes: 0 additions & 6 deletions .bandit.yml

This file was deleted.

11 changes: 6 additions & 5 deletions .cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,23 @@
"max_nautobot_version": "2.9999",
"camel_name": "NautobotDeviceLifecycleManagement",
"project_short_description": "Device Lifecycle Management",
"model_class_name": "None",
"model_class_name": "HardwareLCM",
"open_source_license": "Apache-2.0",
"docs_base_url": "https://docs.nautobot.com",
"docs_app_url": "https://docs.nautobot.com/projects/device-lifecycle/en/latest",
"_drift_manager": {
"template": "https://github.com/nautobot/cookiecutter-nautobot-app.git",
"template_dir": "nautobot-app",
"template_ref": "refs/tags/nautobot-app-v2.3.2",
"template_ref": "refs/tags/nautobot-app-v2.4.1",
"cookie_dir": "",
"branch_prefix": "drift-manager",
"pull_request_strategy": "create",
"post_actions": [
"black"
"ruff",
"poetry"
],
"draft": true,
"baked_commit_ref": "3f6783c6371261fc6cffe4247c4ae238ce1284cb"
"draft": false,
"baked_commit_ref": "304a9faa5035b6192406467e56e1f6b8bbd1e815"
}
}
}
File renamed without changes.
26 changes: 21 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v6"
with:
poetry-version: "1.8.5"
- name: "Linting: ruff format"
run: "poetry run invoke ruff --action format"
ruff-lint:
Expand All @@ -36,6 +38,8 @@ jobs:
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v6"
with:
poetry-version: "1.8.5"
- name: "Linting: ruff"
run: "poetry run invoke ruff --action lint"
check-docs-build:
Expand All @@ -47,6 +51,8 @@ jobs:
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v6"
with:
poetry-version: "1.8.5"
- name: "Check Docs Build"
run: "poetry run invoke build-and-check-docs"
poetry:
Expand All @@ -58,6 +64,8 @@ jobs:
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v6"
with:
poetry-version: "1.8.5"
- name: "Checking: poetry lock file"
run: "poetry run invoke lock --check"
yamllint:
Expand All @@ -69,6 +77,8 @@ jobs:
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v6"
with:
poetry-version: "1.8.5"
- name: "Linting: yamllint"
run: "poetry run invoke yamllint"
check-in-docker:
Expand All @@ -91,6 +101,8 @@ jobs:
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v6"
with:
poetry-version: "1.8.5"
- name: "Constrain Nautobot version and regenerate lock file"
env:
INVOKE_NAUTOBOT_DEVICE_LIFECYCLE_MGMT_LOCAL: "true"
Expand Down Expand Up @@ -134,9 +146,9 @@ jobs:
- python-version: "3.11"
db-backend: "postgresql"
nautobot-version: "2.0.0"
# - python-version: "3.12"
# db-backend: "mysql"
# nautobot-version: "stable"
- python-version: "3.12"
db-backend: "mysql"
nautobot-version: "stable"
runs-on: "ubuntu-22.04"
env:
INVOKE_NAUTOBOT_DEVICE_LIFECYCLE_MGMT_PYTHON_VER: "${{ matrix.python-version }}"
Expand All @@ -146,6 +158,8 @@ jobs:
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v6"
with:
poetry-version: "1.8.5"
- name: "Constrain Nautobot version and regenerate lock file"
env:
INVOKE_NAUTOBOT_DEVICE_LIFECYCLE_MGMT_LOCAL: "true"
Expand Down Expand Up @@ -176,9 +190,9 @@ jobs:
- name: "Run Tests"
run: "poetry run invoke unittest"
changelog:
if: |
if: >
contains(fromJson('["develop","ltm-1.6"]'), github.base_ref) &&
(github.head_ref != 'main')
(github.head_ref != 'main') && (!startsWith(github.head_ref, 'release'))
runs-on: "ubuntu-22.04"
steps:
- name: "Check out repository code"
Expand All @@ -187,6 +201,8 @@ jobs:
fetch-depth: "0"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v6"
with:
poetry-version: "1.8.5"
- name: "Check for changelog entry"
run: |
git fetch --no-tags origin +refs/heads/${{ github.base_ref }}:refs/remotes/origin/${{ github.base_ref }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/upstream_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ name: "Nautobot Upstream Monitor"
on: # yamllint disable-line rule:truthy rule:comments
schedule:
- cron: "0 4 */2 * *" # every other day at midnight
workflow_dispatch:

jobs:
upstream-test:
uses: "nautobot/nautobot/.github/workflows/plugin_upstream_testing_base.yml@develop"
with: # Below could potentially be collapsed into a single argument if a concrete relationship between both is enforced
invoke_context_name: "NAUTOBOT_DEVICE_LIFECYCLE_MGMT"
plugin_name: "nautobot-app-device-lifecycle-mgmt"
plugin_name: "nautobot-device-lifecycle-mgmt"
2 changes: 1 addition & 1 deletion .yamllint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
extends: "default"
rules:
comments: "enable"
empty-values: "enable"
empty-values: "disable"
indentation:
indent-sequences: "consistent"
line-length: "disable"
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Apache Software License 2.0

Copyright (c) 2024, Network to Code, LLC
Copyright (c) 2025, Network to Code, LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<img src="https://raw.githubusercontent.com/nautobot/nautobot-app-device-lifecycle-mgmt/develop/docs/images/icon-DeviceLifecycle.png" class="logo" height="200px">
<br>
<a href="https://github.com/nautobot/nautobot-app-device-lifecycle-mgmt/actions"><img src="https://github.com/nautobot/nautobot-app-device-lifecycle-mgmt/actions/workflows/ci.yml/badge.svg?branch=main"></a>
<a href="https://docs.nautobot.com/projects/device-lifecycle/en/latest/"><img src="https://readthedocs.org/projects/nautobot-plugin-nautobot-device-lifecycle-mgmt/badge/"></a>
<a href="https://docs.nautobot.com/projects/device-lifecycle/en/latest/"><img src="https://readthedocs.org/projects/nautobot-plugin-device-lifecycle-mgmt/badge/"></a>
<a href="https://pypi.org/project/nautobot-device-lifecycle-mgmt/"><img src="https://img.shields.io/pypi/v/nautobot-device-lifecycle-mgmt"></a>
<a href="https://pypi.org/project/nautobot-device-lifecycle-mgmt/"><img src="https://img.shields.io/pypi/dm/nautobot-device-lifecycle-mgmt"></a>
<br>
Expand Down
6 changes: 4 additions & 2 deletions development/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,16 @@ WORKDIR /source
COPY . /source

# Build args must be declared in each stage
ARG NAUTOBOT_VER
ARG PYTHON_VER

# Constrain the Nautobot version to NAUTOBOT_VER
# Constrain the Nautobot version to NAUTOBOT_VER, fall back to installing from git branch if not available on PyPi
# In CI, this should be done outside of the Dockerfile to prevent cross-compile build failures
ARG CI
RUN if [ -z "${CI+x}" ]; then \
INSTALLED_NAUTOBOT_VER=$(pip show nautobot | grep "^Version" | sed "s/Version: //"); \
poetry add --lock nautobot@${INSTALLED_NAUTOBOT_VER} --python ${PYTHON_VER}; fi
poetry add --lock nautobot@${INSTALLED_NAUTOBOT_VER} --python ${PYTHON_VER} || \
poetry add --lock git+https://github.com/nautobot/nautobot.git#${NAUTOBOT_VER} --python ${PYTHON_VER}; fi

# Install the app
RUN poetry install --extras all --with dev
Expand Down
1 change: 1 addition & 0 deletions development/development.env
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ NAUTOBOT_BANNER_TOP="Local"
NAUTOBOT_CHANGELOG_RETENTION=0

NAUTOBOT_DEBUG=True
NAUTOBOT_LOG_DEPRECATION_WARNINGS=True
NAUTOBOT_LOG_LEVEL=DEBUG
NAUTOBOT_METRICS_ENABLED=True
NAUTOBOT_NAPALM_TIMEOUT=5
Expand Down
6 changes: 4 additions & 2 deletions development/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ services:
volumes:
- "./nautobot_config.py:/opt/nautobot/nautobot_config.py"
- "../:/source"
# To expose postgres or redis to the host uncomment the following
# postgres:
# To expose postgres (5432), myql (3306) on db service or redis (6379) to the host uncomment the
# following. Ensure to match the 2 idented spaces which to have the service nested under services.
# db:
# ports:
# - "5432:5432"
# - "3306:3306"
# redis:
# ports:
# - "6379:6379"
7 changes: 7 additions & 0 deletions development/docker-compose.mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ services:
- "development.env"
- "creds.env"
- "development_mysql.env"
beat:
environment:
- "NAUTOBOT_DB_ENGINE=django.db.backends.mysql"
env_file:
- "development.env"
- "creds.env"
- "development_mysql.env"
db:
image: "mysql:8"
command:
Expand Down
14 changes: 3 additions & 11 deletions development/nautobot_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import sys

from nautobot.core.settings import * # noqa: F403 # pylint: disable=wildcard-import,unused-wildcard-import
from nautobot.core.settings_funcs import is_truthy, parse_redis_connection
from nautobot.core.settings_funcs import is_truthy

#
# Debug
Expand Down Expand Up @@ -65,16 +65,8 @@
#

# The django-redis cache is used to establish concurrent locks using Redis.
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": parse_redis_connection(redis_database=0),
"TIMEOUT": 300,
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
},
}
}
# Inherited from nautobot.core.settings
# CACHES = {....}

#
# Celery settings are not defined here because they can be overloaded with
Expand Down
15 changes: 15 additions & 0 deletions development/towncrier_template.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@

# v{{ versiondata.version.split(".")[:2] | join(".") }} Release Notes

This document describes all new features and changes in the release. The format is based on [Keep a
Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic
Versioning](https://semver.org/spec/v2.0.0.html).

## Release Overview

- Major features or milestones
- Changes to compatibility with Nautobot and/or other apps, libraries etc.

{% if render_title %}
## [v{{ versiondata.version }} ({{ versiondata.date }})](https://github.com/nautobot/nautobot-app-device-lifecycle-mgmt/releases/tag/v{{ versiondata.version}})

Expand All @@ -12,7 +23,11 @@
{% if definitions[category]['showcontent'] %}
{% for text, values in sections[section][category].items() %}
{% for item in text.split('\n') %}
{% if values %}
- {{ values|join(', ') }} - {{ item.strip() }}
{% else %}
- {{ item.strip() }}
{% endif %}
{% endfor %}
{% endfor %}

Expand Down
18 changes: 18 additions & 0 deletions docs/admin/release_notes/version_2.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,24 @@ This document describes all new features and changes in the release `2.2`. The f

This release adds support for Python 3.12 and Django 4.

## [v2.2.1 (2025-01-29)](https://github.com/nautobot/nautobot-app-device-lifecycle-mgmt/releases/tag/v2.2.1)

### Changed

- [#261](https://github.com/nautobot/nautobot-app-device-lifecycle-mgmt/issues/261) - Updated template extensions to align with standard Nautobot UI views.

### Fixed

- [#255](https://github.com/nautobot/nautobot-app-device-lifecycle-mgmt/issues/255) - Add status to bulk update for CVE. Fix CVE status filter.
- [#392](https://github.com/nautobot/nautobot-app-device-lifecycle-mgmt/issues/392) - Add Tags to the appropriate APIs.

### Housekeeping

- [#261](https://github.com/nautobot/nautobot-app-device-lifecycle-mgmt/issues/261) - Added management command `generate_app_test_data` to generate sample data for development environments.
- [#375](https://github.com/nautobot/nautobot-app-device-lifecycle-mgmt/issues/375) - Main to Develop post 2.2.0 release.
- [#385](https://github.com/nautobot/nautobot-app-device-lifecycle-mgmt/issues/385) - Changed model_class_name in .cookiecutter.json to a valid model to help with drift management.
- [#410](https://github.com/nautobot/nautobot-app-device-lifecycle-mgmt/issues/410) - Fixed mysql tests and reenabled mysql tests in CI.

## [v2.2.0 (2024-09-07)](https://github.com/nautobot/nautobot-app-device-lifecycle-mgmt/releases/tag/v2.2.0)

### Added
Expand Down
24 changes: 7 additions & 17 deletions docs/dev/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,24 +49,14 @@ The branching policy includes the following tenets:

Device Lifecycle Management will observe semantic versioning, as of 1.0. This may result in a quick turnaround in minor versions to keep pace with an ever-growing feature set.

### Backporting to Older Releases

If you are backporting any fixes to a prior major or minor version of this app, please open an issue, comment on an existing issue, or post in the [Network to Code Slack](https://networktocode.slack.com/) (channel `#nautobot`).

We will create a `release-X.Y` branch for you to open your PR against and cut a new release once the PR is successfully merged.

## Release Policy

Device Lifecycle Management has currently no intended scheduled release schedule, and will release new features in minor versions.

When a new release, from `develop` to `main`, is created the following should happen.

- A release PR is created from `develop` with:
- Update the release notes in `docs/admin/release_notes/version_<major>.<minor>.md` file to reflect the changes.
- Change the version from `<major>.<minor>.<patch>-beta` to `<major>.<minor>.<patch>` in `pyproject.toml`.
- Set the PR to the `main` branch.
- Ensure the tests for the PR pass.
- Merge the PR.
- Create a new tag:
- The tag should be in the form of `v<major>.<minor>.<patch>`.
- The title should be in the form of `v<major>.<minor>.<patch>`.
- The description should be the changes that were added to the `version_<major>.<minor>.md` document.
- If merged into `main`, then push from `main` to `develop`, in order to retain the merge commit created when the PR was merged
- A post release PR is created with:
- Change the version from `<major>.<minor>.<patch>` to `<major>.<minor>.<patch + 1>-beta` in both `pyproject.toml` and `nautobot.__init__.__version__`.
- Set the PR to the proper branch, `develop`.
- Once tests pass, merge.
The steps taken by maintainers when creating a new release are documented in the [release checklist](./release_checklist.md).
15 changes: 15 additions & 0 deletions docs/dev/dev_environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -482,3 +482,18 @@ invoke generate-app-config-schema
```

This command can only guess the schema, so it's up to the developer to manually update the schema as needed.

### Test Data Generation

To quickly generate test data for developing against this app, you can use the following commands:

```bash
nautobot-server generate_test_data --flush
nautobot-server generate_dlm_test_data
nautobot-server createsuperuser
```

!!! danger
The `--flush` flag will completely empty your database and replace it with test data. This command should never be run in a production environment.

This uses the [`generate_test_data`](https://docs.nautobot.com/projects/core/en/stable/user-guide/administration/tools/nautobot-server/#generate_test_data) management command from Nautobot core to generate the Statuses, Platforms, Device Types, Devices, etc. Nautobot version 2.2.0 is the minimum version required for devices to be generated. If using an older version of Nautobot, you'll need to create devices manually after running `nautobot-server generate_test_data`.
Loading

0 comments on commit 53e860e

Please sign in to comment.