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

Next 2.0 #575

Merged
merged 70 commits into from
Oct 1, 2023
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
8eb97ee
Update version statements
jmcgill298 Jul 28, 2023
65ce1f2
Replace broken imports
jmcgill298 Jul 31, 2023
ff5e5a2
Swap Region/Site to Location
jmcgill298 Aug 9, 2023
914054c
Fix/skip test cases
jmcgill298 Aug 14, 2023
f93a72f
Merge pull request #547 from nautobot/jmcgill/NP-62/modify-import-sta…
jmcgill298 Sep 5, 2023
b808c3a
Change filters for 2.x
jmcgill298 Sep 6, 2023
f5026cf
Merge pull request #565 from nautobot/jmcgill/2.x-filters
jmcgill298 Sep 6, 2023
d74a53d
Remove scope property
jmcgill298 Sep 6, 2023
bc4d9f7
Merge pull request #568 from nautobot/jmcgill/2.x-remove-scope-property
jmcgill298 Sep 6, 2023
0d12d61
Remove code around csv import/export per 2.x changes
jmcgill298 Sep 2, 2023
ab7cb45
Merge pull request #569 from nautobot/jmcgill/2.x-remove-csv-import-e…
jmcgill298 Sep 6, 2023
571dd95
Change some platform slug uses to network_driver
jmcgill298 Sep 6, 2023
93b95e0
Remove remaining references to slugs in core models
jmcgill298 Sep 7, 2023
537c16f
Merge pull request #570 from nautobot/jmcgill/2.x-remove-slugs
jmcgill298 Sep 7, 2023
b912a14
Switch tag filter to tags
jmcgill298 Sep 7, 2023
82fe01e
Merge pull request #571 from nautobot/jmcgill/2.x-tag-to-tags
jmcgill298 Sep 7, 2023
7158511
Remove custom get_absolute_url method
jmcgill298 Sep 7, 2023
2e7e29a
Merge pull request #572 from nautobot/jmcgill/2.x-use-default-get-abs…
jmcgill298 Sep 7, 2023
ba064e4
Merge branch 'next' into next-2.0
itdependsnetworks Sep 8, 2023
8773faf
Remove management command, move to new dispatcher method, fix job log…
itdependsnetworks Sep 10, 2023
718b18e
Cookie initialy baked by NetworkToCode Cookie Drift Manager Tool (#583)
snaselj Sep 13, 2023
2096a5c
Jmcgill/2.x jobs rebase (#595)
jmcgill298 Sep 16, 2023
e5d400c
todos updates (#598)
itdependsnetworks Sep 16, 2023
59f04ee
Merge branch 'next-2.0' into next
itdependsnetworks Sep 16, 2023
649bead
Merge pull request #599 from itdependsnetworks/next-2.0-potential
itdependsnetworks Sep 16, 2023
9ab2d8f
stopping point
itdependsnetworks Sep 16, 2023
580aa44
More updates for 2.0
itdependsnetworks Sep 17, 2023
95d2e83
Move to new dispatcher, move compliant to device tab, update location…
itdependsnetworks Sep 18, 2023
01f8cf0
bump versions
itdependsnetworks Sep 18, 2023
75dbdd4
remove platform mapping.
itdependsnetworks Sep 18, 2023
c244736
Remove slugs added by Config Remediation work (#602)
jmcgill298 Sep 19, 2023
1c2d7ad
Logging updates, active tab fix, add default_deploy_status,
itdependsnetworks Sep 21, 2023
b1054e1
Merge branch 'next-2.0' into next-merge-conflicts
itdependsnetworks Sep 23, 2023
49eaf77
Merge pull request #614 from nautobot/next-merge-conflicts
itdependsnetworks Sep 23, 2023
3534ead
fix links
itdependsnetworks Sep 21, 2023
5830850
Migrate config compliance and golden config views to viewsets, upgrad…
itdependsnetworks Sep 25, 2023
017d5e1
General cleanup from linters (#615)
jmcgill298 Sep 27, 2023
c2fbe75
Revert list view actions to views, fix logging, dispatcher, call jobs…
itdependsnetworks Sep 27, 2023
88c86b2
Re-lock, and use hyperlinked_object
itdependsnetworks Sep 28, 2023
eb554d1
fix GoldenConfigSettingForm
HanlinMiao Sep 28, 2023
a9412cd
downgrade django-pivot to 1.8.1
HanlinMiao Sep 28, 2023
843f920
Fix failing notes_url test (#625)
gsnider2195 Sep 28, 2023
35f87ec
bump version, remove slugify, remove commit from config deploy, simpl…
itdependsnetworks Sep 28, 2023
cffb979
Fix some more tests for 2.0 (#631)
gsnider2195 Sep 29, 2023
2a03d2f
Update git, logger bug, update processor
itdependsnetworks Sep 29, 2023
9aef080
logger updates, add to request object, linter
itdependsnetworks Sep 29, 2023
276b558
audit linkable retrieve links, link configs vs show them
itdependsnetworks Sep 29, 2023
74e0adf
fix status link
itdependsnetworks Sep 29, 2023
6700ab2
Fix execute menu, extra context in GC overview, expanded to support RC4
bryanculver Sep 29, 2023
2820741
update gitrepo flow, switch to core get_app_settings_or_config, updat…
itdependsnetworks Sep 29, 2023
d49a25e
Invert Completed logic
itdependsnetworks Sep 29, 2023
cfb8c3d
fix git tests
gsnider2195 Sep 29, 2023
78d640d
Rename network_driver_mapper to network_driver_mappings (#639)
mzbroch Sep 29, 2023
78b5bb4
Add logic to warn when GoldenConfig is out of sync (#629)
jmcgill298 Sep 29, 2023
73fa533
update & clean up processor logic, fix reference to .url
itdependsnetworks Sep 29, 2023
96611a2
fix datasources yaml key to network_driver but backwards to _slug
jeffkala Sep 29, 2023
f939026
fix datasources
jeffkala Sep 29, 2023
25bcb64
fix js issue where was too greedy in selection, add copy button
itdependsnetworks Sep 29, 2023
d96f64a
few additional fixes adn cleanups
jeffkala Sep 29, 2023
88eead8
Merge branch 'next-2.0' of github.com:nautobot/nautobot-plugin-golden…
jeffkala Sep 29, 2023
9c59044
fix black
jeffkala Sep 29, 2023
481c380
fix filtering on configplans
jeffkala Sep 29, 2023
81db93d
Add back constance code and clean up json view code (#642)
itdependsnetworks Sep 30, 2023
8a3bd1b
version update and remove json/yaml toggle
itdependsnetworks Sep 30, 2023
e4f2944
linting updates
itdependsnetworks Sep 30, 2023
eb02065
fix api that populates filterform for plan and deploy results
jeffkala Sep 30, 2023
a7d5647
Start on migration/release docs, make booleans more consistent, add e…
itdependsnetworks Sep 30, 2023
d40b64a
Migration docs updates, 2.0 release notes, remove dispatcher references
itdependsnetworks Oct 1, 2023
70aa4b3
add custom dispatcher docs, update secrets docs, add constance docs, …
itdependsnetworks Oct 1, 2023
f5f4a91
update dependencies, fix or skip tests, minor doc updates
itdependsnetworks Oct 1, 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
2 changes: 1 addition & 1 deletion .bandit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
# No need to check for security issues in the test scripts!
exclude_dirs:
- "./nautobot_golden_config/tests/"

- "./.venv/"
skips:
- "B404"
33 changes: 33 additions & 0 deletions .cookiecutter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"cookiecutter": {
"codeowner_github_usernames": "@itdependsnetworks @jeffkala @nkallergis",
"full_name": "Network to Code, LLC",
"email": "[email protected]",
"github_org": "nautobot",
"plugin_name": "nautobot_golden_config",
"verbose_name": "Golden Config",
"plugin_slug": "nautobot-golden-config",
"project_slug": "nautobot-plugin-golden-config",
"repo_url": "https://github.com/nautobot/nautobot-plugin-golden-config",
"base_url": "golden-config",
"min_nautobot_version": "1.4.0",
"max_nautobot_version": "1.9999",
"nautobot_version": "latest",
"camel_name": "NautobotGoldenConfig",
"project_short_description": "A plugin for configuration on nautobot",
"version": "1.0.0",
"model_class_name": "None",
"open_source_license": "Apache-2.0",
"docs_base_url": "https://docs.nautobot.com",
"docs_app_url": "https://docs.nautobot.com/projects/golden-config/en/latest",
"_drift_manager": {
"template": "https://github.com/nautobot/cookiecutter-nautobot-app.git",
"template_dir": "nautobot-app",
"template_ref": "develop",
"cookie_dir": "",
"branch_prefix": "drift-manager",
"pull_request_strategy": "create",
"post_actions": []
}
}
}
27 changes: 27 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Docker related
development/Dockerfile
development/docker-compose*.yml
development/*.env
*.env
environments/

# Python
**/*.pyc
**/*.pyo
**/__pycache__/
**/.pytest_cache/
**/.venv/


# Other
docs/_build
FAQ.md
.git/
.gitignore
.github
tasks.py
LICENSE
**/*.log
**/.vscode/
invoke*.yml
tasks.py
17 changes: 14 additions & 3 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
[flake8]
# E501: Line length is enforced by Black, so flake8 doesn't need to check it
# W503: Black disagrees with this rule, as does PEP 8; Black wins
ignore = E501, W503
ignore =
E501, # Line length is enforced by Black, so flake8 doesn't need to check it
W503, # Black disagrees with this rule, as does PEP 8; Black wins
# TODO: Review the following rules, not in the template
F811,
F401,
F405,
E203,
itdependsnetworks marked this conversation as resolved.
Show resolved Hide resolved
exclude =
migrations,
__pycache__,
manage.py,
settings.py,
.venv
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Default owners for all files in this repository
# Default owner(s) of all files in this repository
* @itdependsnetworks @jeffkala @nkallergis
16 changes: 8 additions & 8 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,16 @@ about: Report a reproducible bug in the current release of nautobot-golden-confi

### Environment
* Python version: <!-- Example: 3.7.7 -->
* Nautobot version: <!-- Example: 1.0.1 -->
* Nautobot version: <!-- Example: 1.4.0 -->
* nautobot-golden-config version: <!-- Example: 1.0.0 -->

<!-- What did you expect to happen? -->
### Expected Behavior


<!-- What happened instead? -->
### Observed Behavior

<!--
Describe in detail the exact steps that someone else can take to reproduce
this bug using the current release.
Expand All @@ -16,10 +23,3 @@ about: Report a reproducible bug in the current release of nautobot-golden-confi
1.
2.
3.

<!-- What did you expect to happen? -->
### Expected Behavior


<!-- What happened instead? -->
### Observed Behavior
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
name: ✨ Feature Request
about: Propose a new feature or enhancement

---

### Environment
* Python version: <!-- Example: 3.7.7 -->
* Nautobot version: <!-- Example: 1.0.1 -->
* Nautobot version: <!-- Example: 1.4.0 -->
* nautobot-golden-config version: <!-- Example: 1.0.0 -->

<!--
Expand Down
10 changes: 10 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## New Pull Request

Have you:
- [ ] Updated the README if necessary?
- [ ] Updated any configuration settings?
- [ ] Written a unit test?

## Change Notes

## Justification
40 changes: 22 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
name: "CI"
concurrency: # Cancel any existing runs of this workflow for this same PR
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
on: # yamllint disable-line rule:truthy rule:comments
push:
branches:
Expand All @@ -10,7 +13,7 @@ on: # yamllint disable-line rule:truthy rule:comments
pull_request: ~

env:
PLUGIN_NAME: "nautobot-golden-config"
PLUGIN_NAME: "nautobot-plugin-golden-config"

jobs:
black:
Expand All @@ -19,7 +22,7 @@ jobs:
INVOKE_NAUTOBOT_GOLDEN_CONFIG_LOCAL: "True"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v2"
uses: "actions/checkout@v3"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Linting: black"
Expand All @@ -30,7 +33,7 @@ jobs:
INVOKE_NAUTOBOT_GOLDEN_CONFIG_LOCAL: "True"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v2"
uses: "actions/checkout@v3"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Linting: bandit"
Expand All @@ -41,7 +44,7 @@ jobs:
INVOKE_NAUTOBOT_GOLDEN_CONFIG_LOCAL: "True"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v2"
uses: "actions/checkout@v3"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Linting: pydocstyle"
Expand All @@ -52,7 +55,7 @@ jobs:
INVOKE_NAUTOBOT_GOLDEN_CONFIG_LOCAL: "True"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v2"
uses: "actions/checkout@v3"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Linting: flake8"
Expand All @@ -63,7 +66,7 @@ jobs:
INVOKE_NAUTOBOT_GOLDEN_CONFIG_LOCAL: "True"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v2"
uses: "actions/checkout@v3"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Linting: yamllint"
Expand All @@ -80,13 +83,13 @@ jobs:
fail-fast: true
matrix:
python-version: ["3.11"]
nautobot-version: ["1.6.1"]
nautobot-version: ["2.0.0-rc.2"]
env:
INVOKE_NAUTOBOT_GOLDEN_CONFIG_PYTHON_VER: "${{ matrix.python-version }}"
INVOKE_NAUTOBOT_GOLDEN_CONFIG_NAUTOBOT_VER: "${{ matrix.nautobot-version }}"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v2"
uses: "actions/checkout@v3"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Set up Docker Buildx"
Expand Down Expand Up @@ -118,18 +121,18 @@ jobs:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
db-backend: ["postgresql"]
nautobot-version: ["latest"]
nautobot-version: ["2.0.0-rc.2"] # ["latest"]
# The include is a method to limit the amount of jobs ran. This essentially
# means that in addition to standard postgres and stable, also the lowest
# supported version and with mysql
include:
- python-version: "3.11"
db-backend: "postgresql"
nautobot-version: "1.6.1"
- python-version: "3.8"
db-backend: "mysql"
nautobot-version: "1.6.1"
nautobot-version: "2.0.0-rc.2"
- python-version: "3.11"
db-backend: "mysql"
nautobot-version: "2.0.0-rc.2"
- python-version: "3.8"
db-backend: "mysql"
nautobot-version: "latest"
runs-on: "ubuntu-20.04"
Expand All @@ -138,7 +141,7 @@ jobs:
INVOKE_NAUTOBOT_GOLDEN_CONFIG_NAUTOBOT_VER: "${{ matrix.nautobot-version }}"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v2"
uses: "actions/checkout@v3"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Set up Docker Buildx"
Expand Down Expand Up @@ -173,7 +176,7 @@ jobs:
if: "startsWith(github.ref, 'refs/tags/v')"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v2"
uses: "actions/checkout@v3"
- name: "Set up Python"
uses: "actions/setup-python@v2"
with:
Expand Down Expand Up @@ -202,7 +205,7 @@ jobs:
if: "startsWith(github.ref, 'refs/tags/v')"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v2"
uses: "actions/checkout@v3"
- name: "Set up Python"
uses: "actions/setup-python@v2"
with:
Expand All @@ -226,7 +229,7 @@ jobs:
- "publish_pypi"
runs-on: "ubuntu-20.04"
env:
SLACK_WEBHOOK_URL: "${{ '{{ secrets.SLACK_WEBHOOK_URL }}' }}"
SLACK_WEBHOOK_URL: "${{ secrets.SLACK_WEBHOOK_URL }}"
SLACK_MESSAGE: >-
*NOTIFICATION: NEW-RELEASE-PUBLISHED*\n
Repository: <${{ github.server_url }}/${{ github.repository }}|${{ github.repository }}>\n
Expand All @@ -236,11 +239,12 @@ jobs:
- name: "Send a notification to Slack"
# ENVs cannot be used directly in job.if. This is a workaround to check
# if SLACK_WEBHOOK_URL is present.
if: "${{ env.SLACK_WEBHOOK_URL != '' }}"
if: "env.SLACK_WEBHOOK_URL != ''"
uses: "slackapi/[email protected]"
with:
payload: |
{
"text": "${{ env.SLACK_MESSAGE }}",
"blocks": [
{
"type": "section",
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/rebake.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: "Rebake Cookie"
on: # yamllint disable-line rule:truthy
schedule:
# Every Saturday at 5:00 am UTC
- cron: "0 5 * * 6"
workflow_dispatch:
inputs:
template-ref:
description: "The branch or tag to use for the template, using the value from .cookiecutter.json when empty"
default: ""
jobs:
rebake:
runs-on: "ubuntu-22.04"
permissions:
actions: "write"
contents: "write"
packages: "read"
pull-requests: "write"
container: "ghcr.io/nautobot/cookiecutter-nautobot-app-drift-manager/prod:latest"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
steps:
- name: "Configure"
id: "config"
run: |
export REBAKE_ARGS='--push'
if [[ ${{ github.event_name }} == 'workflow_dispatch' ]]; then
export REBAKE_ARGS="$REBAKE_ARGS --template-ref='${{ github.event.inputs.template-ref }}'"
fi
echo "rebake-args='$REBAKE_ARGS'" >> $GITHUB_OUTPUT
- name: "Rebake"
run: |
python -m ntc_cookie_drift_manager rebake ${{ steps.config.outputs.rebake-args }} '${{ github.repositoryUrl }}'
6 changes: 3 additions & 3 deletions .github/workflows/upstream_testing.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: "Nautobot Upstream Testing"
name: "Nautobot Upstream Monitor"

on: # yamllint disable-line rule:truthy rule:comments
on: # yamllint disable-line rule:truthy rule:comments
schedule:
- cron: "0 4 */2 * *" # every other day at midnight

Expand All @@ -10,4 +10,4 @@ jobs:
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_GOLDEN_CONFIG"
plugin_name: "nautobot-golden-config"
plugin_name: "nautobot-plugin-golden-config"
25 changes: 14 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# Specific ignores
nautobot_backup.dump
.creds.env
creds.env
nautobot_golden_config/transposer.py
docker-compose.override.yml
packages/
invoke.yml
golden-config/

# Ansible Retry Files
*.retry
Expand Down Expand Up @@ -201,9 +195,6 @@ $RECYCLE.BIN/
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# Jetbrains IDE configs
.idea/

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
Expand Down Expand Up @@ -305,4 +296,16 @@ fabric.properties

### vscode ###
.vscode/*
*.code-workspace
*.code-workspace

# Rando
creds.env
development/*.txt

# Invoke overrides
invoke.yml

# Docs
public
/compose.yaml
/dump.sql
Loading
Loading