Skip to content

Commit 7492978

Browse files
authored
Version 2.1.0
2 parents 5fdba1f + bb9317d commit 7492978

30 files changed

+267
-183
lines changed

.github/workflows/commit.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ jobs:
2121
python -m pip install --upgrade pip
2222
python -m pip install --upgrade setuptools wheel
2323
python -m pip install -r requirements/dev.txt
24-
- name: Run black
25-
run: black --check --diff --color .
24+
- name: Run ruff format
25+
run: ruff format .
2626
- name: Run ruff
2727
run: ruff .
2828

.pre-commit-config.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@ repos:
55
- id: check-yaml
66
- id: end-of-file-fixer
77
- id: trailing-whitespace
8-
- repo: https://github.com/psf/black
9-
rev: 23.1.0
10-
hooks:
11-
- id: black
12-
args: [--check, --diff, --color, .]
138
- repo: https://github.com/astral-sh/ruff-pre-commit
14-
rev: v0.0.280
9+
rev: v0.1.2
1510
hooks:
1611
- id: ruff
1712
args: [netbox_config_diff]
13+
- id: ruff-format
14+
exclude: migrations

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[![NetBox version](https://img.shields.io/badge/NetBox-3.5|3.6-blue.svg)](https://github.com/netbox-community/netbox)
22
[![Supported Versions](https://img.shields.io/pypi/pyversions/netbox-config-diff.svg)](https://pypi.org/project/netbox-config-diff/)
33
[![PyPI version](https://badge.fury.io/py/netbox-config-diff.svg)](https://badge.fury.io/py/netbox-config-diff)
4-
[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
54
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
65
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
76
[![CI](https://github.com/miaow2/netbox-config-diff/actions/workflows/commit.yaml/badge.svg?branch=develop)](https://github.com/miaow2/netbox-config-diff/actions)
@@ -78,6 +77,7 @@ PLUGINS_CONFIG = {
7877
"netbox_config_diff": {
7978
"USERNAME": "foo",
8079
"PASSWORD": "bar",
80+
"AUTH_SECONDARY": "foobar", # define here password for accessing Privileged EXEC mode, this variable is optional
8181
},
8282
}
8383
```
@@ -120,6 +120,14 @@ No diff
120120

121121
![Screenshot of the compliance ok](docs/media/screenshots/compliance-ok.png)
122122

123+
Configuration request
124+
125+
![Screenshot of the CR](docs/media/screenshots/cr-created.png)
126+
127+
Completed Configuration request
128+
129+
![Screenshot of the completed CR](docs/media/screenshots/cr-completed.png)
130+
123131
## Credits
124132

125133
Based on the NetBox plugin tutorial:

docs/changelog.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Changelog
22

3+
## 2.1.0 (2023-10-26)
4+
5+
* [#35](https://github.com/miaow2/netbox-config-diff/issues/35) Add ability to define password for accessing priviliged exec mode
6+
* [#37](https://github.com/miaow2/netbox-config-diff/issues/37) Add `DeviceRole` field to `CollectDiffScript`
7+
* [#38](https://github.com/miaow2/netbox-config-diff/issues/38) Remove config template filter for devices filed in forms
8+
* [#39](https://github.com/miaow2/netbox-config-diff/issues/39) Add `Status` field to `CollectDiffScript`
9+
* [#43](https://github.com/miaow2/netbox-config-diff/issues/43) `ConfigDiffScript` does not create empty changelog entries
10+
11+
## 2.0.1 (2023-10-22)
12+
13+
* [#33](https://github.com/miaow2/netbox-config-diff/issues/33) Fix failing migrations on fresh database install
14+
315
## 2.0.0 (2023-10-18)
416

517
* [#25](https://github.com/miaow2/netbox-config-diff/issues/25) Add configuration management

docs/colliecting-diffs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ You can find scripts list in navbar `Customization -> Scripts`.
2828

2929
![Screenshot of the scripts list](media/screenshots/script-list.png)
3030

31-
In the script, you can define a site, on which devices run compliance, or devices.
32-
If you define both fields, script will run only on devices from `Devices` field
31+
In the script, you can define a site or role, on which devices run compliance, or devices.
32+
If you define all fields, script will run only on devices from `Devices` field
3333

3434
!!! warning
35-
Script runs only on devices with status `Active`, assigned Primary IP, Config Template, Platform and PlatformSetting
35+
Script runs only on devices with assigned Primary IP, Platform and PlatformSetting
3636

3737
If you have configs in NetBox DataSource, you can define it, the script instead of connecting to devices will find configs in DataSource by device's names.
3838

docs/configuratiom-management.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ And rendered config template with substitute
5959
Now you let's create `Configuration Request` with devices you want to configure.
6060

6161
!!! warning
62-
For request only accepts devices with `Active` status and assigned Platform, Primary IP, Config Template and PlatformSetting
62+
For request only accepts devices with `Active` status and assigned Platform, Primary IP, and PlatformSetting
6363

6464
Find `Configuration Requests` in navbar.
6565

47.3 KB
Loading

docs/media/screenshots/cr-created.png

41.3 KB
Loading

docs/media/screenshots/script.png

5.27 KB
Loading

docs/secrets.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ You can store credentials for devices authentification in NetBox secrets [plugin
44

55
Read NetBox secrets docs for more info.
66

7-
In plugin variables define secrets roles for username (`USER_SECRET_ROLE`) and password (`PASSWORD_SECRET_ROLE`).
7+
In plugin variables define secrets roles for username (`USER_SECRET_ROLE`), password (`PASSWORD_SECRET_ROLE`) and
8+
password (`SECOND_AUTH_SECRET_ROLE`) for Privileged EXEC mode.
89

910
Default values for this variables are:
1011

@@ -13,6 +14,7 @@ PLUGINS_CONFIG = {
1314
"netbox_config_diff": {
1415
"USER_SECRET_ROLE": "Username",
1516
"PASSWORD_SECRET_ROLE": "Password",
17+
"SECOND_AUTH_SECRET_ROLE": "Second Auth",
1618
},
1719
}
1820
```

0 commit comments

Comments
 (0)