Skip to content

Commit

Permalink
Merge pull request #133 from nautobot/release-1.2.0
Browse files Browse the repository at this point in the history
v1.2.0 release
  • Loading branch information
whitej6 authored Feb 8, 2023
2 parents 173b6ca + 1f17af7 commit bbf5daa
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 9 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## v1.2.0 - 2022-02-08

### Fixed

- #120 Resolved inconsistent forms.

### Changed

- #108 Changed Application & Application Group migrations to allow null values.

### Added

- #108 Application & ApplicationGroup support

## v1.2.0-alpha.2 - 2022-12-07

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions nautobot_firewall_models/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class Meta:

model = models.ApplicationObject

fields = ["id", "name", "description", "category", "subcategory", "risk", "description"]
fields = ["id", "name", "description", "category", "subcategory", "risk"]


class ApplicationObjectGroupFilterSet(BaseFilterSet, NautobotFilterSet):
Expand Down Expand Up @@ -175,7 +175,7 @@ class Meta:
"""Meta attributes for filter."""

model = models.PolicyRule
fields = ["id", "action", "log", "request_id"]
fields = ["id", "action", "log", "request_id", "description"]


# TODO: Refactor to allow for better filtering, currently very limited.
Expand Down
19 changes: 15 additions & 4 deletions nautobot_firewall_models/tests/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def create_env():
default_ip_protocol="TCP",
status=status,
risk=3,
description="some description",
)
app2 = ApplicationObject.objects.create(
name="app2",
Expand All @@ -92,6 +93,7 @@ def create_env():
default_ip_protocol="TCP",
status=status,
risk=2,
description="some description",
)
app3 = ApplicationObject.objects.create(
name="app3",
Expand All @@ -101,16 +103,23 @@ def create_env():
default_ip_protocol="TCP",
status=status,
risk=1,
description="some description",
)
app_grp1 = ApplicationObjectGroup.objects.create(name="streaming")
app_grp1 = ApplicationObjectGroup.objects.create(name="streaming", description="some description")
app_grp1.application_objects.set([app1])
app_grp2 = ApplicationObjectGroup.objects.create(name="gaming")
app_grp2 = ApplicationObjectGroup.objects.create(name="gaming", description="some description")
app_grp2.application_objects.set([app3, app2])
app_grp3 = ApplicationObjectGroup.objects.create(name="news")
app_grp3 = ApplicationObjectGroup.objects.create(name="news", description="some description")
app_grp3.application_objects.set([app1, app2, app3])

pol_rule1 = PolicyRule.objects.create(
action="deny", log=True, name="Policy Rule 1", status=status, request_id="req1", index=10
action="deny",
log=True,
name="Policy Rule 1",
status=status,
request_id="req1",
index=10,
description="some description",
)
pol_rule1.source_users.set([usr_obj1])
pol_rule1.source_user_groups.set([usr_grp1])
Expand All @@ -132,6 +141,7 @@ def create_env():
status=status,
request_id="req2",
index=20,
description="some description",
)
pol_rule2.source_users.set([usr_obj1, usr_obj2])
pol_rule2.source_user_groups.set([usr_grp1, usr_grp2])
Expand All @@ -152,6 +162,7 @@ def create_env():
status=status,
request_id="req3",
index=30,
description="some description",
)
pol_rule3.source_users.set([usr_obj1, usr_obj2, usr_obj3])
pol_rule3.source_user_groups.set([usr_grp1, usr_grp2, usr_grp3])
Expand Down
4 changes: 2 additions & 2 deletions nautobot_firewall_models/tests/test_ui_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ class ApplicationObjectUIViewTest(ViewTestCases.PrimaryObjectViewTestCase):
"""Test the ApplicationObject viewsets."""

model = ApplicationObject
bulk_edit_data = {"description": "test update description"}
bulk_edit_data = {"description": "bulk test update description"}

@classmethod
def setUpTestData(cls):
Expand Down Expand Up @@ -626,7 +626,7 @@ class PolicyRuleUIViewTest(ViewTestCases.PrimaryObjectViewTestCase):
"""Test the PolicyRule viewsets."""

model = PolicyRule
bulk_edit_data = {"description": "test update description"}
bulk_edit_data = {"description": "bulk test update description"}

@classmethod
def setUpTestData(cls):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nautobot-firewall-models"
version = "1.2.0-alpha.2"
version = "1.2.0"
description = "Nautobot plugin to model firewall objects."
authors = ["Network to Code, LLC <[email protected]>"]
license = "Apache-2.0"
Expand Down

0 comments on commit bbf5daa

Please sign in to comment.