Skip to content
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

Documentation Drift #70

Merged
merged 42 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
604a212
chore: Add template files
snaselj Oct 25, 2023
18bfdff
Add a metric for software versions. (#36)
Kircheneer Dec 2, 2022
815255c
Update __init__.py (#45)
jedelman8 Dec 20, 2022
a87bbc3
Change CODEOWNERS. (#43)
Kircheneer Jan 3, 2023
6b2a942
Add upstream testing changes.
bryanculver Dec 5, 2022
b6df07e
Test the workflow
bryanculver Dec 5, 2022
577fab8
fix: Align with the latest template
snaselj Mar 10, 2023
33789c0
chore: Disable upstream tests on push
snaselj Mar 10, 2023
7439776
bump: Minimal Nautobot v1.4
snaselj Mar 10, 2023
139ae06
chore: poetry lock --no-update
snaselj Mar 10, 2023
61ab6f4
chore: Fix versions for invoke
snaselj Mar 10, 2023
0a78d21
fix: Update versions for unittest
snaselj Mar 10, 2023
783b411
[NCLOUD-926] Add screenshots (#51)
dscodi Jun 27, 2023
36a4bf6
Removes RQ management command.
Kircheneer Aug 9, 2023
0c12100
Removes RQ metric.
Kircheneer Aug 9, 2023
820f74d
Bumps Nautobot version to 2.0.0-beta2.
Kircheneer Aug 9, 2023
882699d
Adds 'logs' invoke task.
Kircheneer Aug 9, 2023
06ee293
Fixes Nautobot 2.0 compatibility.
Kircheneer Aug 9, 2023
9253d37
Fixes syntax in docker-compose file.
Kircheneer Aug 9, 2023
0f25e9a
Fixes test matrix version.
Kircheneer Aug 9, 2023
6afd751
Updates ubuntu version in CI.
Kircheneer Aug 16, 2023
deb034a
Prepare release 3.0.0-beta.1
Kircheneer Aug 16, 2023
db06982
bump: `nautobot` to `2.0.0rc1`
snaselj Aug 21, 2023
4aa5dc7
Bump: Nautobot v2.0.0rc2
snaselj Aug 25, 2023
0ea8cbc
Align versions (#57)
snaselj Sep 11, 2023
764acc6
prepares release 2.1.0
Kircheneer Sep 29, 2023
8ca3465
updates gh-action-setup-poetry-environment from v1 to v5
Kircheneer Sep 29, 2023
176d2d5
deprecates Python 3.7
Kircheneer Sep 29, 2023
bb66918
Updating to 2.0.0
smk4664 Sep 29, 2023
368822c
Revert dockerfile changes per Bryan Culver
smk4664 Sep 29, 2023
a952fe6
Aligning with CI Standards.
smk4664 Sep 29, 2023
92f8a40
Fix Changelog
smk4664 Sep 29, 2023
c0221a2
Update to Nautobot 2.0.0 for invoke.
smk4664 Sep 29, 2023
cbb1ec6
Fix CI secret.
smk4664 Sep 29, 2023
27cc93c
Release 2.1.1 (#60)
smk4664 Sep 29, 2023
64f30c7
Update nautobot_capacity_metrics/__init__.py
chadell Sep 29, 2023
c027617
Allow plugin models to be reported. (#68)
Kircheneer Oct 17, 2023
27e71dc
Cookie initialy baked by NetworkToCode Cookie Drift Manager Tool
snaselj Oct 25, 2023
1a90de7
chore: Manual fixes
snaselj Oct 25, 2023
5468141
chore: Disable CI mysql
snaselj Oct 25, 2023
1fb66ac
Merge branch 'develop' into driftmanager-rebase
whitej6 Nov 27, 2023
bb08f02
Merge branch 'driftmanager-rebase' into u/snaselj-drift-manager-docs
whitej6 Nov 27, 2023
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
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jobs:
- name: "Check out repository code"
uses: "actions/checkout@v4"
- name: "Setup environment"

uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Checking: poetry lock file"
run: "poetry run invoke lock --check"
Expand Down Expand Up @@ -182,9 +183,9 @@ jobs:
- python-version: "3.11"
db-backend: "postgresql"
nautobot-version: "2.0.0"
- python-version: "3.11"
db-backend: "mysql"
nautobot-version: "stable"
# - python-version: "3.11"
# db-backend: "mysql"
# nautobot-version: "stable"
runs-on: "ubuntu-22.04"
env:
INVOKE_NAUTOBOT_CAPACITY_METRICS_PYTHON_VER: "${{ matrix.python-version }}"
Expand Down
8 changes: 8 additions & 0 deletions docs/admin/compatibility_matrix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Compatibility Matrix

!!! warning "Developer Note - Remove Me!"
Explain how the release models of the plugin and of Nautobot work together, how releases are supported, how features and older releases are deprecated etc.

| Metrics & Monitoring Extension Plugin Version | Nautobot First Support Version | Nautobot Last Support Version |
| ------------- | -------------------- | ------------- |
| 1.0.X | 2.0.0 | 1.99.99 |
81 changes: 81 additions & 0 deletions docs/admin/install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Installing the App in Nautobot

Here you will find detailed instructions on how to **install** and **configure** the App within your Nautobot environment.

!!! warning "Developer Note - Remove Me!"
Detailed instructions on installing the App. You will need to update this section based on any additional dependencies or prerequisites.

## Prerequisites

- The plugin is compatible with Nautobot 2.0.0 and higher.
- Databases supported: PostgreSQL, MySQL

!!! note
Please check the [dedicated page](compatibility_matrix.md) for a full compatibility matrix and the deprecation policy.

### Access Requirements

!!! warning "Developer Note - Remove Me!"
What external systems (if any) it needs access to in order to work.

## Install Guide

!!! note
Plugins can be installed manually or using Python's `pip`. See the [nautobot documentation](https://nautobot.readthedocs.io/en/latest/plugins/#install-the-package) for more details. The pip package name for this plugin is [`nautobot-capacity-metrics`](https://pypi.org/project/nautobot-capacity-metrics/).

The plugin is available as a Python package via PyPI and can be installed with `pip`:

```shell
pip install nautobot-capacity-metrics
```

To ensure Metrics & Monitoring Extension Plugin 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-capacity-metrics` package:

```shell
echo nautobot-capacity-metrics >> local_requirements.txt
```

Once installed, the plugin needs to be enabled in your Nautobot configuration. The following block of code below shows the additional configuration required to be added to your `nautobot_config.py` file:

- Append `"nautobot_capacity_metrics"` to the `PLUGINS` list.
- Append the `"nautobot_capacity_metrics"` dictionary to the `PLUGINS_CONFIG` dictionary and override any defaults.

```python
# In your nautobot_config.py
PLUGINS = ["nautobot_capacity_metrics"]

# PLUGINS_CONFIG = {
# "nautobot_capacity_metrics": {
# ADD YOUR SETTINGS HERE
# }
# }
```

Once the Nautobot configuration is updated, run the Post Upgrade command (`nautobot-server post_upgrade`) to run migrations and clear any cache:

```shell
nautobot-server post_upgrade
```

Then restart (if necessary) the Nautobot services which may include:

- Nautobot
- Nautobot Workers
- Nautobot Scheduler

```shell
sudo systemctl restart nautobot nautobot-worker nautobot-scheduler
```

## App Configuration

!!! warning "Developer Note - Remove Me!"
Any configuration required to get the App set up. Edit the table below as per the examples provided.

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

| Key | Example | Default | Description |
| ------- | ------ | -------- | ------------------------------------- |
| `enable_backup` | `True` | `True` | A boolean to represent whether or not to run backup configurations within the plugin. |
| `platform_slug_map` | `{"cisco_wlc": "cisco_aireos"}` | `None` | A dictionary in which the key is the platform slug and the value is what netutils uses in any "network_os" parameter. |
| `per_feature_bar_width` | `0.15` | `0.15` | The width of the table bar within the overview report |
3 changes: 3 additions & 0 deletions docs/admin/release_notes/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Release Notes

All the published release notes can be found via the navigation menu. All patch releases are included in the same minor release (e.g. `v1.2`) document.
48 changes: 48 additions & 0 deletions docs/admin/release_notes/version_1.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# v1.0 Release Notes

!!! warning "Developer Note - Remove Me!"
Guiding Principles:

- Changelogs are for humans, not machines.
- There should be an entry for every single version.
- The same types of changes should be grouped.
- Versions and sections should be linkable.
- The latest version comes first.
- The release date of each version is displayed.
- Mention whether you follow Semantic Versioning.

Types of changes:

- `Added` for new features.
- `Changed` for changes in existing functionality.
- `Deprecated` for soon-to-be removed features.
- `Removed` for now removed features.
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.


This document describes all new features and changes in the release `1.0`. 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
- Achieved in this `x.y` release
- Changes to compatibility with Nautobot and/or other plugins, libraries etc.

## [v1.0.1] - 2021-09-08

### Added

### Changed

### Fixed

- [#123](https://github.com/nautobot/nautobot-plugin-capacity-metrics/issues/123) Fixed Tag filtering not working in job launch form

## [v1.0.0] - 2021-08-03

### Added

### Changed

### Fixed
18 changes: 18 additions & 0 deletions docs/admin/uninstall.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Uninstall the App from Nautobot

Here you will find any steps necessary to cleanly remove the App from your Nautobot environment.

## Database Cleanup

Prior to removing the plugin from the `nautobot_config.py`, run the following command to roll back any migration specific to this plugin.

```shell
nautobot-server migrate nautobot_plugin_capacity_metrics zero
```

!!! warning "Developer Note - Remove Me!"
Any other cleanup operations to ensure the database is clean after the app is removed. Is there anything else that needs cleaning up, such as CFs, relationships, etc. if they're no longer desired?

## Remove App configuration

Remove the configuration you added in `nautobot_config.py` from `PLUGINS` & `PLUGINS_CONFIG`.
10 changes: 10 additions & 0 deletions docs/admin/upgrade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Upgrading the App

Here you will find any steps necessary to upgrade the App in your Nautobot environment.

## Upgrade Guide

!!! warning "Developer Note - Remove Me!"
Add more detailed steps on how the app is upgraded in an existing Nautobot setup and any version specifics (such as upgrading between major versions with breaking changes).

When a new release comes out it may be necessary to run a migration of the database to account for any changes in the data models used by this plugin. Execute the command `nautobot-server post-upgrade` within the runtime environment of your Nautobot installation after updating the `nautobot-capacity-metrics` package via `pip`.
7 changes: 7 additions & 0 deletions docs/dev/arch_decision.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Architecture Decision Records

The intention is to document deviations from a standard Model View Controller (MVC) design.

!!! warning "Developer Note - Remove Me!"
Optional page, remove if not applicable.
For examples see [Golden Config](https://github.com/nautobot/nautobot-plugin-golden-config/tree/develop/docs/dev/dev_adr.md) and [nautobot-plugin-reservation](https://github.com/networktocode/nautobot-plugin-reservation/blob/develop/docs/dev/dev_adr.md).
5 changes: 5 additions & 0 deletions docs/dev/code_reference/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Metrics & Monitoring Extension Plugin API Package

::: nautobot_capacity_metrics.api
options:
show_submodules: True
6 changes: 6 additions & 0 deletions docs/dev/code_reference/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Code Reference

Auto-generated code reference documentation from docstrings.

!!! warning "Developer Note - Remove Me!"
Uses [mkdocstrings](https://mkdocstrings.github.io/) syntax to auto-generate code documentation from docstrings. Two example pages are provided ([api](api.md) and [package](package.md)), add new stubs for each module or package that you think has relevant documentation.
1 change: 1 addition & 0 deletions docs/dev/code_reference/package.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: nautobot_capacity_metrics
24 changes: 24 additions & 0 deletions docs/dev/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Contributing to the App

!!! warning "Developer Note - Remove Me!"
Information on how to contribute fixes, functionality, or documentation changes back to the project.

The project is packaged with a light [development environment](dev_environment.md) based on `docker-compose` to help with the local development of the project and to run tests.

The project is following Network to Code software development guidelines and is leveraging the following:

- Python linting and formatting: `black`, `pylint`, `bandit`, `flake8`, and `pydocstyle`.
- YAML linting is done with `yamllint`.
- Django unit test to ensure the plugin is working properly.

Documentation is built using [mkdocs](https://www.mkdocs.org/). The [Docker based development environment](dev_environment.md#docker-development-environment) automatically starts a container hosting a live version of the documentation website on [http://localhost:8001](http://localhost:8001) that auto-refreshes when you make any changes to your local files.

## Branching Policy

!!! warning "Developer Note - Remove Me!"
What branching policy is used for this project and where contributions should be made.

## Release Policy

!!! warning "Developer Note - Remove Me!"
How new versions are released.
Loading