From 0b7a8a565b345098d5bbf85fea0919127ac5008e Mon Sep 17 00:00:00 2001 From: Jeremy White Date: Mon, 8 Jan 2024 07:56:30 -0600 Subject: [PATCH 1/4] update class path for job URL --- changes/203.fixed | 1 + nautobot_firewall_models/jobs.py | 3 ++- .../templates/nautobot_firewall_models/inc/capirca_policy.html | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 changes/203.fixed diff --git a/changes/203.fixed b/changes/203.fixed new file mode 100644 index 00000000..7e8d10b7 --- /dev/null +++ b/changes/203.fixed @@ -0,0 +1 @@ +Fixed old reference to class path in URL pattern for job. \ No newline at end of file diff --git a/nautobot_firewall_models/jobs.py b/nautobot_firewall_models/jobs.py index a441d93c..354d3cc3 100644 --- a/nautobot_firewall_models/jobs.py +++ b/nautobot_firewall_models/jobs.py @@ -23,6 +23,7 @@ class Meta: name = "Generate FW Config via Capirca." description = "Generate FW Config via Capirca and update the models." commit_default = True + has_sensitive_variables = False def run(self, device): # pylint: disable=arguments-differ """Run a job to remove legacy reservations.""" @@ -48,7 +49,7 @@ def run(self, device): # pylint: disable=arguments-differ device_obj = Device.objects.get(pk=dev) logger.debug("Running against Device: `%s`", str(device_obj)) CapircaPolicy.objects.update_or_create(device=device_obj) - logger.info(obj=device_obj, message=f"{device_obj} Updated") + logger.info(f"{device_obj} Updated", extra={"object": device_obj}) jobs = [RunCapircaJob] diff --git a/nautobot_firewall_models/templates/nautobot_firewall_models/inc/capirca_policy.html b/nautobot_firewall_models/templates/nautobot_firewall_models/inc/capirca_policy.html index ee8cba5d..ba13b666 100644 --- a/nautobot_firewall_models/templates/nautobot_firewall_models/inc/capirca_policy.html +++ b/nautobot_firewall_models/templates/nautobot_firewall_models/inc/capirca_policy.html @@ -2,6 +2,6 @@
Capirca Firewall Configurations - - +
\ No newline at end of file From cb27ea5b77adf8ec5bf96504f1f9300cdee80364 Mon Sep 17 00:00:00 2001 From: Jeremy White Date: Mon, 8 Jan 2024 08:23:43 -0600 Subject: [PATCH 2/4] update ci for main to dev to skip changelog --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 009486a7..8dd29c49 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -230,7 +230,9 @@ jobs: - name: "Run Tests" run: "poetry run invoke unittest" changelog: - if: contains(fromJson('["develop","ltm-1.6"]'), github.base_ref) + if: | + contains(fromJson('["develop","ltm-1.6"]'), github.base_ref) || + (github.head_ref == "main" && github.base_ref == "develop") runs-on: "ubuntu-22.04" steps: - name: "Check out repository code" From 6a643a8b12fc678d641b0587e24874486c14de2b Mon Sep 17 00:00:00 2001 From: Jeremy White Date: Mon, 8 Jan 2024 08:26:07 -0600 Subject: [PATCH 3/4] update ci for main to dev to skip changelog --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8dd29c49..c0af99ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -232,7 +232,7 @@ jobs: changelog: if: | contains(fromJson('["develop","ltm-1.6"]'), github.base_ref) || - (github.head_ref == "main" && github.base_ref == "develop") + (github.head_ref == 'main' && github.base_ref == 'develop') runs-on: "ubuntu-22.04" steps: - name: "Check out repository code" From 0656a74face631be298d11797b5b724ad289827b Mon Sep 17 00:00:00 2001 From: Jeremy White Date: Mon, 8 Jan 2024 10:23:17 -0500 Subject: [PATCH 4/4] Update .github/workflows/ci.yml Co-authored-by: Jan Snasel --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c0af99ed..e71b609e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -231,8 +231,8 @@ jobs: run: "poetry run invoke unittest" changelog: if: | - contains(fromJson('["develop","ltm-1.6"]'), github.base_ref) || - (github.head_ref == 'main' && github.base_ref == 'develop') + contains(fromJson('["develop","ltm-1.6"]'), github.base_ref) && + (github.head_ref != 'main') runs-on: "ubuntu-22.04" steps: - name: "Check out repository code"