You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Job to run to completion or fail with a user-friendly explanation.
Observed Behavior
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/django/db/models/query.py", line 581, in get_or_create
return self.get(**kwargs), False
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/db/models/query.py", line 435, in get
raise self.model.DoesNotExist(
nautobot_firewall_models.models.capirca_policy.CapircaPolicy.DoesNotExist: CapircaPolicy matching query does not exist.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/celery/app/trace.py", line 477, in trace_task
R = retval = fun(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/nautobot/extras/jobs.py", line 152, in __call__
return self.run(*args, **deserialized_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/nautobot/.local/lib/python3.11/site-packages/nautobot_firewall_models/jobs.py", line 51, in run
CapircaPolicy.objects.update_or_create(device=device_obj)
File "/usr/local/lib/python3.11/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/db/models/query.py", line 608, in update_or_create
obj, created = self.select_for_update().get_or_create(defaults, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/db/models/query.py", line 588, in get_or_create
return self.create(**params), True
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/db/models/query.py", line 453, in create
obj.save(force_insert=True, using=self.db)
File "/opt/nautobot/.local/lib/python3.11/site-packages/nautobot_firewall_models/models/capirca_policy.py", line 54, in save
cap_obj.get_all_capirca_cfg()
File "/opt/nautobot/.local/lib/python3.11/site-packages/nautobot_firewall_models/utils/capirca.py", line 600, in get_all_capirca_cfg
self.validate_policy_data()
File "/opt/nautobot/.local/lib/python3.11/site-packages/nautobot_firewall_models/utils/capirca.py", line 356, in validate_policy_data
"from-zone": rule["source_zone"].name,
^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'name'
Steps to Reproduce
Create a Policy Rule with no source_zone or destination_zone value
Attach the policy rule to a device
Run Generate FW Config via Capirca job with the given device
The text was updated successfully, but these errors were encountered:
Environment
Expected Behavior
Job to run to completion or fail with a user-friendly explanation.
Observed Behavior
Steps to Reproduce
source_zone
ordestination_zone
valueThe text was updated successfully, but these errors were encountered: