Unable to assign policy_rules to a policy via RestAPI
gneville-ot opened this issue · comments
gneville-ot commented
Environment
- Python version: 3.10
- Nautobot version: 1.5.18
- nautobot-plugin-firewall-model version: 1.2.1
Able to send a list of policy-rules to a policy via RestAPI so they can be attached.
API accepts call however the policy-rules aren't attached to the policy
Steps to Reproduce
- Create policy-rules
- Attempt to create or update a policy to attach policy-rules via RestAPI
A POST to http://localhost:8080/api/plugins/firewall/policy/
with this payload is accepted but policy-rules aren't attached:
{
"name": "mypolicy",
"description": "restrictive",
"status": "active",
"assigned_devices": [
{
"device": "d0562f91-37a6-413e-8b45-5756f6d784dc",
"weight": 100
}
],
"policy_rules": [
"58099d8e-badc-49b4-81d6-685db4c3186a"
]
}
A PATCH to http://localhost:8080/api/plugins/firewall/policy/859ff981-52bc-4980-a209-1243d2212ac2/)
with this payload is accepted but policy-rules aren't attached:
{
"policy_rules": [
"58099d8e-badc-49b4-81d6-685db4c3186a"
]
}