vladimirs-git / cisco-acl Goto Github PK
View Code? Open in Web Editor NEWPython package to parse and manage Cisco ACLs
Python package to parse and manage Cisco ACLs
Love this so far. Just wondering, does this support standard ACL's and IPv6? It seems to only pickup IPv4 extended access-lists. Thanks in advance.
My config contains the following lines:
object-group network NETWORK_1
network-object object ApplicationOut-xx.xxx.xx.xxx
network-object object XXXXX-network-27
When attempting to parse the config I receive the following error:
>>> acls = cisco_acl.acls(config=config, platform="ios")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/root/miniconda3/lib/python3.11/site-packages/cisco_acl/functions.py", line 83, in acls
_add_addgr_to_aces(acls_, parser)
File "/root/miniconda3/lib/python3.11/site-packages/cisco_acl/functions.py", line 321, in _add_addgr_to_aces
addgrs: LAddrGroup = [AddrGroup(**d) for d in parsed_addgrs]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/lib/python3.11/site-packages/cisco_acl/functions.py", line 321, in <listcomp>
addgrs: LAddrGroup = [AddrGroup(**d) for d in parsed_addgrs]
^^^^^^^^^^^^^^
File "/root/miniconda3/lib/python3.11/site-packages/cisco_acl/addr_group.py", line 70, in __init__
self.items = items
^^^^^^^^^^
File "/root/miniconda3/lib/python3.11/site-packages/cisco_acl/addr_group.py", line 153, in items
item_: OAddressAg = self._line_to_address(line)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/lib/python3.11/site-packages/cisco_acl/addr_group.py", line 389, in _line_to_address
addr_o = AddressAg(line=line, platform=self._platform, max_ncwb=self.max_ncwb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/lib/python3.11/site-packages/cisco_acl/address_ag.py", line 87, in __init__
self.line = line
^^^^^^^^^
File "/root/miniconda3/lib/python3.11/site-packages/cisco_acl/address_ag.py", line 140, in line
raise ValueError(f"invalid address {line=}")
ValueError: invalid address line='network-object object ApplicationOut-xx.xxx.xx.xxx'
It appears as though the code base doesn't have any implementation to parse network-object's when reading in the object-group lines.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.