From b74e8db8e342a3bbf137fe920e45b515f00b9883 Mon Sep 17 00:00:00 2001 From: ryanmerolle Date: Wed, 25 Jan 2023 20:11:08 +0000 Subject: [PATCH 1/2] update netbox config for plugin development --- .devcontainer/configuration/configuration.py | 3 +++ .devcontainer/env/netbox.env | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.devcontainer/configuration/configuration.py b/.devcontainer/configuration/configuration.py index b7a56cf..004d725 100644 --- a/.devcontainer/configuration/configuration.py +++ b/.devcontainer/configuration/configuration.py @@ -155,6 +155,9 @@ def _read_secret(secret_name, default=None): # on a production system. DEBUG = environ.get("DEBUG", "False").lower() == "true" +# Set to True to enable DEVELOPER Mode. WARNING: ONLY netbox developers or plugin developers need this access. +DEVELOPER = environ.get("DEVELOPER_MODE", "False").lower() == "true" + # Email settings EMAIL = { "SERVER": environ.get("EMAIL_SERVER", "localhost"), diff --git a/.devcontainer/env/netbox.env b/.devcontainer/env/netbox.env index ee71174..ba8a54e 100644 --- a/.devcontainer/env/netbox.env +++ b/.devcontainer/env/netbox.env @@ -5,6 +5,7 @@ DB_NAME=netbox DB_PASSWORD=J5brHrAXFLQSif0K DB_USER=netbox DEBUG=true +DEVELOPER_MODE=true ENFORCE_GLOBAL_UNIQUE=true LOGIN_REQUIRED=false GRAPHQL_ENABLED=true @@ -19,5 +20,4 @@ SUPERUSER_API_TOKEN=0123456789abcdef0123456789abcdef01234567 SUPERUSER_EMAIL=admin@example.com SUPERUSER_NAME=admin SUPERUSER_PASSWORD=admin -STARTUP_SCRIPTS=false WEBHOOKS_ENABLED=true From 9611816fe892c4ca5fac4aab1cd806407b39d483 Mon Sep 17 00:00:00 2001 From: Ryan Merolle Date: Wed, 25 Jan 2023 15:22:35 -0500 Subject: [PATCH 2/2] Address Missing Migrations for NetBox 3.4 / plugin version 1.2 (#118) * add missing netbox 3.4 migrations * bump version to 1.2.2 --- README.md | 2 +- netbox_acls/migrations/0003_netbox_acls.py | 42 ++++++++++++++++++++++ netbox_acls/version.py | 2 +- 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 netbox_acls/migrations/0003_netbox_acls.py diff --git a/README.md b/README.md index 774d0b2..6af94cf 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Each Plugin Version listed below has been tested with its corresponding NetBox V |:--------------:|:--------------:| | 3.2 | 1.0.1 | | 3.3 | 1.1.0 | -| 3.4 | 1.2.1 | +| 3.4 | 1.2.2 | ## Installing diff --git a/netbox_acls/migrations/0003_netbox_acls.py b/netbox_acls/migrations/0003_netbox_acls.py new file mode 100644 index 0000000..ccfcfbe --- /dev/null +++ b/netbox_acls/migrations/0003_netbox_acls.py @@ -0,0 +1,42 @@ +# Generated by Django 4.1.5 on 2023-01-25 20:08 + +import utilities.json +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("netbox_acls", "0002_alter_accesslist_options_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="accesslist", + name="custom_field_data", + field=models.JSONField( + blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder + ), + ), + migrations.AlterField( + model_name="aclextendedrule", + name="custom_field_data", + field=models.JSONField( + blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder + ), + ), + migrations.AlterField( + model_name="aclinterfaceassignment", + name="custom_field_data", + field=models.JSONField( + blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder + ), + ), + migrations.AlterField( + model_name="aclstandardrule", + name="custom_field_data", + field=models.JSONField( + blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder + ), + ), + ] diff --git a/netbox_acls/version.py b/netbox_acls/version.py index a955fda..bc86c94 100644 --- a/netbox_acls/version.py +++ b/netbox_acls/version.py @@ -1 +1 @@ -__version__ = "1.2.1" +__version__ = "1.2.2"