GithubHelp home page GithubHelp logo

cisco-acl's People

Contributors

vladimirs-git avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cisco-acl's Issues

Seems to fail parsing ACL's when object groups contain network-object's

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.