Skip to main content

Compare network device configuration files using contextual structures

Project description

ASIMTOTE

This package contains two main elements used to compare text-based configuration files (or other files in simple text in a similar format) where they are structured using indented blocks of directives/commands, typically for network devices:

  • a parser to read in configuration files and stored them in a dictionary -- the parser utilises the hierarchical nature of the configuration to understand that the same command name might mean different things in different contexts

  • a comparator that takes two configuration dictionaries (typically produced by the parser, above) - a source and a target configuration - and writes out a configuration file (or update command set) to transform the source configuration into the destination - this uses a series of 'converters' to handle the difference for each configuration element (e.g. changing the description assigned to an interface)

Each of these are written as abstract base classes that can be inherited from to crete concrete classes for each platform, but the base processing of the parsing and comparing should be consistent, requiring only the specific commands to be handled.

Currently, Cisco IOS is the only concrete platform and only a subset so far (the comparator is still being tweaked to handle this all relatively straightforwardly, before all the commands are implemented). There are currently some odd commands and edge cases which are awkward to handle without some improvements to the core process.

The scripts also support a system whereby 'excludes' can be specified, to exclude those elements of the configuration dictionary which should not be compared, if a known difference exists that cannot be resolved, either as an interim divergence, or a permanent exception.

THE NAME

This package was formerly known as net-contextdiff but has been renamed as it is expected to drop the indented configuration difference mechansim (still using context, but not via indenting).

The new name 'asimtote' is a backronym for something like 'Autonomous System Internetwork Management ...' but the rest has not yet been completed. It's similarity to 'asymptote' is deliberate as it aims to get a configuration into a desired state but will probably never ever get there.

FUTURE DEVELOPMENTS

Longer term, this script may be made unnecessary by other tools but, if it remains, will probably be parsing configurations via something like REST and JSON, rather than by reading legacy text configuration files. It would also be making changes using similar calls rather than generating legacy text conversions. The problem of making changes in the correct order and committing them may still remain, though.

It would also be desirable to separate the parser as this could be useful elsewhere. At the moment, however, it's so intertwined with the converter this would be tedious to maintain and keep in sync. It should probably be made easily usable as a separate component, however.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

asimtote-0.16.16.tar.gz (67.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

asimtote-0.16.16-py3-none-any.whl (75.1 kB view details)

Uploaded Python 3

File details

Details for the file asimtote-0.16.16.tar.gz.

File metadata

  • Download URL: asimtote-0.16.16.tar.gz
  • Upload date:
  • Size: 67.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for asimtote-0.16.16.tar.gz
Algorithm Hash digest
SHA256 3bcfd8b01c338f6b9a9e91850119fdf38514bfaa45c01b1eaf61e6b77fbce6c7
MD5 0b20a6bdf0735350fa21546485849523
BLAKE2b-256 41b46bc50af88aca945d2522abec4bd7ea6ccca10d87203366a99738a0f0f3f4

See more details on using hashes here.

File details

Details for the file asimtote-0.16.16-py3-none-any.whl.

File metadata

  • Download URL: asimtote-0.16.16-py3-none-any.whl
  • Upload date:
  • Size: 75.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for asimtote-0.16.16-py3-none-any.whl
Algorithm Hash digest
SHA256 de495b07f08097a2047d832fcbb1f40446605b4160586de2a3c31e5aa2e75123
MD5 8c060edd4b3af4c83b35cf68e7a79335
BLAKE2b-256 0bdb94783b13c64416c3e685bca6a3d8c4d838124970617eb9fda139bb2273a7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page