Replies: 1 comment
-
Thank you for your interest in this project! from cisco_acl import Acl
lines1 = """
ip access-list standard ACL1
permit 10.0.0.1
permit host 10.0.0.2
permit 10.0.0.3 0.0.0.0
"""
# cisco-acl==3.2.3
acl1 = Acl(lines1)
print(str(acl1))
# ip access-list standard ACL1
# permit host 10.0.0.1
# permit host 10.0.0.2
# permit host 10.0.0.3
# todo
# ip access-list standard ACL1
# permit 10.0.0.1
# permit 10.0.0.2
# permit 10.0.0.3 Currently, I don't have enough time to fix this issue fully. I will fix it when I have a project related to standard ACLs. The best thanks is to star this project. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey Vlad,
First of all your package is awesome! :) Thank you for developing this.
I have a question, maybe I'm not invoking the package correctly but if I use an ACL with just a '
permit <host>
' syntax from an IOS-XE config, I get an error.Example config:
Then attempting a simple acl.line print:
I get the error:
WARNING:root:ValueError: invalid line='permit 10.1.1.1'. line='permit 10.1.1.1' does not match ACE pattern
Is this expected? I could work around this by adding '0.0.0.0' as the mask to the end of each line, but would be great if the parser could handle this type of input.
If I add the mask to the end of each line, it does work as expected.
Edit: I've got a workaround where we add the 0.0.0.0 mask to the end of any explicit permit/deny without a mask:
Beta Was this translation helpful? Give feedback.
All reactions