From 278e7ce11d68784afa425c6b9ede6574ddd82efb Mon Sep 17 00:00:00 2001 From: Jeremy White Date: Mon, 18 Dec 2023 10:11:38 -0600 Subject: [PATCH] initial renaming work --- nautobot_firewall_models/__init__.py | 8 ++++---- nautobot_firewall_models/api/__init__.py | 2 +- nautobot_firewall_models/api/urls.py | 2 +- nautobot_firewall_models/filters.py | 2 +- nautobot_firewall_models/forms.py | 2 +- nautobot_firewall_models/homepage.py | 2 +- .../management/commands/create_test_firewall_data.py | 2 +- nautobot_firewall_models/models/address.py | 2 +- nautobot_firewall_models/models/nat_policy.py | 2 +- nautobot_firewall_models/models/security_policy.py | 2 +- nautobot_firewall_models/models/service.py | 2 +- nautobot_firewall_models/models/user.py | 2 +- nautobot_firewall_models/models/zone.py | 2 +- nautobot_firewall_models/template_content.py | 11 ++++++----- nautobot_firewall_models/tests/__init__.py | 2 +- nautobot_firewall_models/urls.py | 2 +- nautobot_firewall_models/utils/__init__.py | 2 +- nautobot_firewall_models/utils/capirca.py | 2 +- nautobot_firewall_models/validators.py | 2 +- pyproject.toml | 2 +- 20 files changed, 28 insertions(+), 27 deletions(-) diff --git a/nautobot_firewall_models/__init__.py b/nautobot_firewall_models/__init__.py index 3304f3c0..2469bca5 100644 --- a/nautobot_firewall_models/__init__.py +++ b/nautobot_firewall_models/__init__.py @@ -1,14 +1,14 @@ -"""Plugin declaration for nautobot_firewall_models.""" +"""App declaration for nautobot_firewall_models.""" # Metadata is inherited from Nautobot. If not including Nautobot in the environment, this should be added from importlib import metadata __version__ = metadata.version(__name__) -from nautobot.extras.plugins import PluginConfig +from nautobot.apps import NautobotAppConfig -class NautobotFirewallModelsConfig(PluginConfig): - """Plugin configuration for the nautobot_firewall_models plugin.""" +class NautobotFirewallModelsConfig(NautobotAppConfig): + """App configuration for the nautobot_firewall_models app.""" name = "nautobot_firewall_models" verbose_name = "Firewall & Security Models" diff --git a/nautobot_firewall_models/api/__init__.py b/nautobot_firewall_models/api/__init__.py index 754f0616..93903a3c 100644 --- a/nautobot_firewall_models/api/__init__.py +++ b/nautobot_firewall_models/api/__init__.py @@ -1 +1 @@ -"""REST API module for nautobot_firewall_models plugin.""" +"""REST API module for nautobot_firewall_models app.""" diff --git a/nautobot_firewall_models/api/urls.py b/nautobot_firewall_models/api/urls.py index 043c04dc..e3eeb56e 100644 --- a/nautobot_firewall_models/api/urls.py +++ b/nautobot_firewall_models/api/urls.py @@ -1,4 +1,4 @@ -"""Django API urlpatterns declaration for firewall model plugin.""" +"""Django API urlpatterns declaration for firewall model app.""" from nautobot.apps.api import OrderedDefaultRouter diff --git a/nautobot_firewall_models/filters.py b/nautobot_firewall_models/filters.py index f0dc660b..d1f4a873 100644 --- a/nautobot_firewall_models/filters.py +++ b/nautobot_firewall_models/filters.py @@ -1,4 +1,4 @@ -"""Filtering for Firewall Model Plugin.""" +"""Filtering for Firewall Model App.""" from django.contrib.contenttypes.fields import GenericRelation from django.core.exceptions import ValidationError from django.db.models import Q diff --git a/nautobot_firewall_models/forms.py b/nautobot_firewall_models/forms.py index 13f9e555..dd4c8104 100644 --- a/nautobot_firewall_models/forms.py +++ b/nautobot_firewall_models/forms.py @@ -1,4 +1,4 @@ -"""Forms for the Firewall plugin.""" +"""Forms for the Firewall app.""" from django import forms from nautobot.dcim.models import Device, Interface diff --git a/nautobot_firewall_models/homepage.py b/nautobot_firewall_models/homepage.py index b38407a2..43fd948f 100644 --- a/nautobot_firewall_models/homepage.py +++ b/nautobot_firewall_models/homepage.py @@ -1,4 +1,4 @@ -"""Adds plugin items to homepage.""" +"""Adds App items to homepage.""" from nautobot.core.apps import HomePageItem, HomePagePanel from nautobot_firewall_models.models import Policy, PolicyRule, CapircaPolicy, NATPolicy, NATPolicyRule diff --git a/nautobot_firewall_models/management/commands/create_test_firewall_data.py b/nautobot_firewall_models/management/commands/create_test_firewall_data.py index 5a03530c..86bf0d40 100644 --- a/nautobot_firewall_models/management/commands/create_test_firewall_data.py +++ b/nautobot_firewall_models/management/commands/create_test_firewall_data.py @@ -1,4 +1,4 @@ -"""Management command to bootstrap dummy data for firewall model plugin.""" +"""Management command to bootstrap dummy data for firewall model app.""" from django.core.management.base import BaseCommand from django.db.utils import IntegrityError diff --git a/nautobot_firewall_models/models/address.py b/nautobot_firewall_models/models/address.py index 120dd55c..fe008bfc 100644 --- a/nautobot_firewall_models/models/address.py +++ b/nautobot_firewall_models/models/address.py @@ -1,4 +1,4 @@ -"""Models for the Firewall plugin.""" +"""Models for the Firewall app.""" # pylint: disable=duplicate-code, too-many-lines from django.core.exceptions import ValidationError diff --git a/nautobot_firewall_models/models/nat_policy.py b/nautobot_firewall_models/models/nat_policy.py index 0ccb4f2f..146a6d4e 100644 --- a/nautobot_firewall_models/models/nat_policy.py +++ b/nautobot_firewall_models/models/nat_policy.py @@ -1,4 +1,4 @@ -"""Models for the Firewall plugin.""" +"""Models for the Firewall app.""" # pylint: disable=duplicate-code, too-many-lines from django.db import models diff --git a/nautobot_firewall_models/models/security_policy.py b/nautobot_firewall_models/models/security_policy.py index 62583ca6..19deeeb6 100644 --- a/nautobot_firewall_models/models/security_policy.py +++ b/nautobot_firewall_models/models/security_policy.py @@ -1,4 +1,4 @@ -"""Models for the Firewall plugin.""" +"""Models for the Firewall app.""" # pylint: disable=duplicate-code, too-many-lines from django.db import models diff --git a/nautobot_firewall_models/models/service.py b/nautobot_firewall_models/models/service.py index 808c6fc6..c49a82f5 100644 --- a/nautobot_firewall_models/models/service.py +++ b/nautobot_firewall_models/models/service.py @@ -1,4 +1,4 @@ -"""Models for the Firewall plugin.""" +"""Models for the Firewall app.""" # pylint: disable=duplicate-code, too-many-lines from django.db import models diff --git a/nautobot_firewall_models/models/user.py b/nautobot_firewall_models/models/user.py index a9710e5b..7041f625 100644 --- a/nautobot_firewall_models/models/user.py +++ b/nautobot_firewall_models/models/user.py @@ -1,4 +1,4 @@ -"""Models for the Firewall plugin.""" +"""Models for the Firewall app.""" # pylint: disable=duplicate-code from django.db import models diff --git a/nautobot_firewall_models/models/zone.py b/nautobot_firewall_models/models/zone.py index 40e5b87b..0b7cf598 100644 --- a/nautobot_firewall_models/models/zone.py +++ b/nautobot_firewall_models/models/zone.py @@ -1,4 +1,4 @@ -"""Models for the Firewall plugin.""" +"""Models for the Firewall app.""" # pylint: disable=duplicate-code from django.db import models diff --git a/nautobot_firewall_models/template_content.py b/nautobot_firewall_models/template_content.py index abfe9fd4..f6dd2231 100644 --- a/nautobot_firewall_models/template_content.py +++ b/nautobot_firewall_models/template_content.py @@ -1,9 +1,10 @@ """Extensions of baseline Nautobot views.""" -from nautobot.extras.plugins import PluginTemplateExtension +from nautobot.apps.ui import TemplateExtension + from nautobot_firewall_models.models import CapircaPolicy -class DevicePolicies(PluginTemplateExtension): # pylint: disable=abstract-method +class DevicePolicies(TemplateExtension): # pylint: disable=abstract-method """Add Policy to the right side of the Device page.""" model = "dcim.device" @@ -19,7 +20,7 @@ def right_page(self): ) -class DynamicGroupDevicePolicies(PluginTemplateExtension): # pylint: disable=abstract-method +class DynamicGroupDevicePolicies(TemplateExtension): # pylint: disable=abstract-method """Add Policy to the right side of the Device page.""" model = "dcim.device" @@ -32,7 +33,7 @@ def right_page(self): ) -class DynamicGroupPolicies(PluginTemplateExtension): # pylint: disable=abstract-method +class DynamicGroupPolicies(TemplateExtension): # pylint: disable=abstract-method """Add Policy to the right side of the Device page.""" model = "extras.dynamicgroup" @@ -48,7 +49,7 @@ def right_page(self): ) -class CapircaPolicies(PluginTemplateExtension): # pylint: disable=abstract-method +class CapircaPolicies(TemplateExtension): # pylint: disable=abstract-method """Add Policy to the right side of the Device page.""" model = "dcim.device" diff --git a/nautobot_firewall_models/tests/__init__.py b/nautobot_firewall_models/tests/__init__.py index af81fa81..8e5e7d9f 100644 --- a/nautobot_firewall_models/tests/__init__.py +++ b/nautobot_firewall_models/tests/__init__.py @@ -1 +1 @@ -"""Unit tests for nautobot_firewall_models plugin.""" +"""Unit tests for nautobot_firewall_models app.""" diff --git a/nautobot_firewall_models/urls.py b/nautobot_firewall_models/urls.py index 7a9189d1..ee130937 100644 --- a/nautobot_firewall_models/urls.py +++ b/nautobot_firewall_models/urls.py @@ -1,4 +1,4 @@ -"""Django urlpatterns declaration for nautobot_firewall_models plugin.""" +"""Django urlpatterns declaration for nautobot_firewall_models app.""" from django.templatetags.static import static from django.urls import path diff --git a/nautobot_firewall_models/utils/__init__.py b/nautobot_firewall_models/utils/__init__.py index 580cc228..218a0213 100644 --- a/nautobot_firewall_models/utils/__init__.py +++ b/nautobot_firewall_models/utils/__init__.py @@ -1,4 +1,4 @@ -"""Help funcs for firewall models plugin.""" +"""Help funcs for firewall models app.""" import json from django.conf import settings from django.utils.module_loading import import_string diff --git a/nautobot_firewall_models/utils/capirca.py b/nautobot_firewall_models/utils/capirca.py index 0c5ba214..712c01b5 100644 --- a/nautobot_firewall_models/utils/capirca.py +++ b/nautobot_firewall_models/utils/capirca.py @@ -1,4 +1,4 @@ -"""Management command to bootstrap dummy data for firewall model plugin.""" +"""Management command to bootstrap dummy data for firewall model app.""" # pylint: disable=too-many-instance-attributes,too-many-locals import logging import re diff --git a/nautobot_firewall_models/validators.py b/nautobot_firewall_models/validators.py index f5033ff0..ae3890a4 100644 --- a/nautobot_firewall_models/validators.py +++ b/nautobot_firewall_models/validators.py @@ -1,4 +1,4 @@ -"""Validators for plugin.""" +"""Validators for app.""" import re from django.core.exceptions import ValidationError diff --git a/pyproject.toml b/pyproject.toml index 60851429..5491ca9e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "nautobot-firewall-models" -version = "2.0.1" +version = "2.0.2a0" description = "Nautobot plugin to model firewall objects." authors = ["Network to Code, LLC "] license = "Apache-2.0"