Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: #158

Closed
Dimylka opened this issue Jul 28, 2023 · 4 comments
Closed

[Bug]: #158

Dimylka opened this issue Jul 28, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@Dimylka
Copy link

Dimylka commented Jul 28, 2023

NetBox access-list plugin version

v1.3.0

NetBox version

v.3.5.2

Steps to Reproduce

Hi! (sorry for my bad english)
I've got some proplems with plugin by API
Fist of all i've created host "Webmin" by netbox web interface

Then i've created ACL "Webmin_ACL" by netbox API and attach them to host "Webmin"
curl -X POST -H "Authorization: Token ********" -H "Content-Type: application/json" -H "Accept: application/json; indent=4" https://netbox.local/api/plugins/access-lists/access-lists/ --data '{"name": "Webmin_ACL", "display": "Webmin_ACL", "assigned_object_type": "virtualization.virtualmachine", "assigned_object_id": 1, "type": "extended" }'

ACL "Webmin_ACL" was created with id "access_list": 7

Then i've tried to create ACL Extended Rule by netbox API
curl -X POST -H "Authorization: Token *******" -H "Content-Type: application/json" -H "Accept: application/json; indent=4" https://netbox.local/api/plugins/access-lists/extended-acl-rules/ --data '{"access_list": 7, "index": 1, "action": "permit", "destination_ports": [100]}'

But got error
"destination_ports": [
"Action is set to remark, Destination Ports CANNOT be set."
]

Query whithout "destination_ports": [100] will create ACL Extended Rule normally
curl -X POST -H "Authorization: Token ********" -H "Content-Type: application/json" -H "Accept: application/json; indent=4" https://netbox.local/api/plugins/access-lists/extended-acl-rules/ --data '{"access_list": 7, "index": 1, "action": "deny"}'

Please tell me what am i doing wrong?

Expected Behavior

ACL Extended Rule with "destination_ports" will created normally

Observed Behavior

"destination_ports": [
"Action is set to remark, Destination Ports CANNOT be set."
]

@Dimylka Dimylka added the bug Something isn't working label Jul 28, 2023
@github-actions
Copy link

Thanks for opening this Issue! We really appreciate the feedback & testing from users like you!

@Dimylka
Copy link
Author

Dimylka commented Jul 28, 2023

I've disabled "Remark" check at /opt/netbox/venv/lib/python3.10/site-packages/netbox_acls/api/serializers.py after that it works!

@cs-1
Copy link
Contributor

cs-1 commented Apr 12, 2024

The bug is the one found here: #190 A colleague of mine created a pull request to fix this.

@jsenecal
Copy link
Collaborator

jsenecal commented Apr 29, 2024

Closing as duplicate of #190 which has better documentation

@jsenecal jsenecal closed this as not planned Won't fix, can't repro, duplicate, stale Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants