Skip to content

Commit a824336

Browse files
authored
Merge pull request #171 from nautobot/develop
v2 release
2 parents 984965b + fe3f83c commit a824336

File tree

109 files changed

+4952
-5289
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+4952
-5289
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ jobs:
7676
strategy:
7777
fail-fast: true
7878
matrix:
79-
python-version: ["3.7"]
80-
nautobot-version: ["1.4.1"]
79+
python-version: ["3.11"]
80+
nautobot-version: ["2.0.0"]
8181
env:
8282
INVOKE_NAUTOBOT_FIREWALL_MODELS_PYTHON_VER: "${{ matrix.python-version }}"
8383
INVOKE_NAUTOBOT_FIREWALL_MODELS_NAUTOBOT_VER: "${{ matrix.nautobot-version }}"
@@ -113,23 +113,22 @@ jobs:
113113
strategy:
114114
fail-fast: true
115115
matrix:
116-
python-version: ["3.7", "3.8", "3.9", "3.10"]
116+
python-version: ["3.8"]
117117
db-backend: ["postgresql"]
118-
nautobot-version: ["latest"]
118+
nautobot-version: ["2.0.0"]
119119
# The include is a method to limit the amount of jobs ran. This essentially
120120
# means that in addition to standard postgres and stable, also the lowest
121121
# supported version and with mysql
122122
include:
123-
- python-version: "3.10"
123+
- python-version: "3.11"
124124
db-backend: "postgresql"
125-
nautobot-version: "1.4.1"
126-
# TODO: Include the following, once mysql is working on CI
127-
# - python-version: "3.7"
128-
# db-backend: "mysql"
129-
# nautobot-version: "1.4.1"
130-
# - python-version: "3.10"
131-
# db-backend: "mysql"
132-
# nautobot-version: "latest"
125+
nautobot-version: "2.0.0"
126+
- python-version: "3.11"
127+
db-backend: "postgresql"
128+
nautobot-version: "stable"
129+
# - python-version: "3.11"
130+
# db-backend: "mysql"
131+
# nautobot-version: "2.0.0-rc.4"
133132
runs-on: "ubuntu-20.04"
134133
env:
135134
INVOKE_NAUTOBOT_FIREWALL_MODELS_PYTHON_VER: "${{ matrix.python-version }}"

development/Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
# -------------------------------------------------------------------------------------
77
# !!! USE CAUTION WHEN MODIFYING LINES BELOW
88

9-
# Accepts a desired Nautobot version as build argument, default to 1.5
10-
ARG NAUTOBOT_VER="1.4"
9+
# Accepts a desired Nautobot version as build argument, default to `2.0.0-rc.2`
10+
ARG NAUTOBOT_VER="2.0.0"
1111

12-
# Accepts a desired Python version as build argument, default to 3.8
13-
ARG PYTHON_VER="3.8"
12+
# Accepts a desired Python version as build argument, default to 3.11
13+
ARG PYTHON_VER="3.11"
1414

1515
# Retrieve published development image of Nautobot base which should include most CI dependencies
1616
FROM ghcr.io/nautobot/nautobot-dev:${NAUTOBOT_VER}-py${PYTHON_VER}
@@ -26,7 +26,7 @@ ENV NAUTOBOT_ROOT ${NAUTOBOT_ROOT}
2626
# and CI and local development may have a newer version of Poetry
2727
# Since this is only used for development and we don't ship this container, pinning Poetry back is not expressly necessary
2828
# We also don't need virtual environments in container
29-
RUN curl -sSL https://install.python-poetry.org | python3 - && \
29+
RUN which poetry || curl -sSL https://install.python-poetry.org | python3 - && \
3030
poetry config virtualenvs.create false
3131

3232
# !!! USE CAUTION WHEN MODIFYING LINES ABOVE
@@ -68,7 +68,7 @@ RUN sort poetry_freeze_base.txt poetry_freeze_all.txt | uniq -u > poetry_freeze_
6868

6969
# Install all local project as editable, constrained on Nautobot version, to get any additional
7070
# direct dependencies of the app
71-
RUN pip install -c constraints.txt -e .
71+
RUN pip install -c constraints.txt -e .[all]
7272

7373
# Install any dev dependencies frozen from Poetry
7474
# Can be improved in Poetry 1.2 which allows `poetry install --only dev`

development/development_mysql.env

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
# Custom ENVs for Mysql
22
# Due to docker image limitations for Mysql, we need "root" user to create more than one database table
33
NAUTOBOT_DB_USER=root
4-
MYSQL_USER=${NAUTOBOT_DB_USER}

development/nautobot_config.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@
8080
"handlers": {
8181
"normal_console": {
8282
"level": "INFO",
83-
"class": "rq.utils.ColorizingStreamHandler",
83+
"class": "logging.StreamHandler",
8484
"formatter": "normal",
8585
},
8686
"verbose_console": {
8787
"level": "DEBUG",
88-
"class": "rq.utils.ColorizingStreamHandler",
88+
"class": "logging.StreamHandler",
8989
"formatter": "verbose",
9090
},
9191
},
@@ -95,10 +95,6 @@
9595
"handlers": ["verbose_console" if DEBUG else "normal_console"],
9696
"level": LOG_LEVEL,
9797
},
98-
"rq.worker": {
99-
"handlers": ["verbose_console" if DEBUG else "normal_console"],
100-
"level": LOG_LEVEL,
101-
},
10298
},
10399
}
104100

docs/admin/compatibility_matrix.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
| 1.0.X | 1.2.0 | 1.5.99 |
66
| 1.1.X | 1.4.0 | 1.5.99 |
77
| 1.2.X | 1.4.0 | 1.5.99 |
8+
| 2.0.X | 2.0.0 | 2.9999 |

docs/admin/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Here you will find detailed instructions on how to **install** and **configure**
44

55
## Prerequisites
66

7-
- The plugin is compatible with Nautobot 1.4.0 and higher.
7+
- The plugin is compatible with Nautobot 2.0.0 and higher.
88
- Databases supported: PostgreSQL, MySQL
99

1010
!!! note
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# v2.0 Release Notes
2+
3+
This document describes all new features and changes in the release `2.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).
4+
5+
## v2.0.0 - 2023-05-03
6+
7+
### Changed
8+
9+
- [#167](https://github.com/nautobot/nautobot-plugin-firewall-models/pull/167) Nautobot 2.0.0 as minimum dependency
10+
- [#167](https://github.com/nautobot/nautobot-plugin-firewall-models/pull/167) Substantial updates to API
11+
- [#167](https://github.com/nautobot/nautobot-plugin-firewall-models/pull/167) on_delete=PROTECT was moved from the model custom through field to a DB signal
12+
13+
### Added
14+
15+
- [#167](https://github.com/nautobot/nautobot-plugin-firewall-models/pull/167) Added support for Python 3.11
16+
17+
### Removed
18+
19+
- [#167](https://github.com/nautobot/nautobot-plugin-firewall-models/pull/167) Dropped support for Python 3.7

docs/admin/upgrade.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

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

5+
## Upgrade Nautobot 1.X to Nautobot 2.X
6+
7+
As part of the upgrade for Nautobot 2.0 it is recommended to perform a stepped upgrade by first upgrading Nautobot the lastest stable release within these constraints `>=1.6.2,<2.0.0`. After performing the initial upgrade of Nautobot you will need to run `nautobot-server populate_platform_network_driver --no-use-napalm-driver-field`. This will populate the `network_driver` attribute on Platform objects from the `slug` field.
8+
59
## Upgrade Guide
610

711
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-firewall-models` package via `pip`.

docs/user/capirca.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Service Group | *.svc
3535
* An object (policy, policy rule, src-addr, dst-addr, etc.) is put into and out of use based on whether or not the status is `active` or as defined in your plugin configuration
3636
* Anything other than active or defined in plugin setting `allowed_status` is ignored
3737
* Removing the last active object in an source-address, destination-address, or service will fail the process to avoid your policy failing open
38-
* The Platform slug must match the Capirca generator name
38+
* The Platform `network_driver` must match the Capirca generator name
3939
* You can optionally provide a mapping in the settings `capirca_os_map` to map from the current platform name, to the Capirca generator name
4040
* The action of "remark" on a rule is not conidered, you can set the setting `capirca_remark_pass=False` if you want it to fail by default rather than silently skipping
4141

docs/user/external_interactions.md

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -197,53 +197,3 @@ Example GraphQL query showing how to get instances for each of the models provid
197197
}
198198
}
199199
```
200-
201-
### REST
202-
203-
Below is an example response to the REST API GET request for a Policy object at `/api/plugins/firewall/policy/<uuid>/`. The detail API view for a Policy Object accepts in `deep=True` IF you would like to see a nested representation of all nested objects, this query param is not available on the list API view. Use this feature with caution as the query time for large sets of data can be substatial along with the size of the JSON payload.
204-
205-
#### Response
206-
207-
```json
208-
{
209-
"id": "246a037f-9858-4848-90a5-7ca967a3583f",
210-
"tags": [],
211-
"display": "Policy 3",
212-
"policy_rules": [
213-
{
214-
"rule": "03182134-11a7-40a9-b433-169ab2df721b",
215-
"index": 10
216-
},
217-
{
218-
"rule": "f78c677d-feaa-41b2-90f8-a4e8c8a62791",
219-
"index": 20
220-
},
221-
{
222-
"rule": "b9aab2e9-5490-4dd7-b2b7-ca4c71247a10",
223-
"index": 30
224-
},
225-
{
226-
"rule": "3b92704a-9913-4f02-b499-f083d6a4912a",
227-
"index": 99
228-
},
229-
{
230-
"rule": "e10a4346-9d28-4b3f-b501-2ed8bd12a453",
231-
"index": 100
232-
}
233-
],
234-
"assigned_devices": [],
235-
"assigned_dynamic_groups": [
236-
{
237-
"dynamic_group": "eaa19dba-bfe0-4072-a458-b47e1e1375e6",
238-
"weight": 1000
239-
}
240-
],
241-
"created": "2022-06-09",
242-
"last_updated": "2022-06-09T01:35:14.230438Z",
243-
"_custom_field_data": {},
244-
"description": "",
245-
"name": "Policy 3",
246-
"status": "35206353-47f4-4e71-9e2c-807092b6c439",
247-
"tenant": "5fabe6c7-84a6-45af-95a0-384f9ebcbeb8"
248-
}
249-
```

0 commit comments

Comments
 (0)