Skip to main content

Compare network device configuration files using contextual structures

Project description

NET-CONTEXTDIFF

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.

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

net-contextdiff-0.13.5.tar.gz (40.3 kB view details)

Uploaded Source

Built Distribution

net_contextdiff-0.13.5-py3-none-any.whl (43.5 kB view details)

Uploaded Python 3

File details

Details for the file net-contextdiff-0.13.5.tar.gz.

File metadata

  • Download URL: net-contextdiff-0.13.5.tar.gz
  • Upload date:
  • Size: 40.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.9

File hashes

Hashes for net-contextdiff-0.13.5.tar.gz
Algorithm Hash digest
SHA256 9b23f34dddcc8bc53b77a51bcdc8e5c195e57852e1ab896a5abec6f74c59a0e2
MD5 d2ff57f29b10bce871b2e6d5ffcba97f
BLAKE2b-256 185fd993998822ef77ca62490369a3752ffd0f9e2b52d4b01c3a95a5330f4249

See more details on using hashes here.

File details

Details for the file net_contextdiff-0.13.5-py3-none-any.whl.

File metadata

  • Download URL: net_contextdiff-0.13.5-py3-none-any.whl
  • Upload date:
  • Size: 43.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.9

File hashes

Hashes for net_contextdiff-0.13.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8b5f7a827aee277836f3134aa1beeb5a7b63a32ab72154d549b50c3331412a8b
MD5 eab4d7c645991044ab411a16f5c56ca5
BLAKE2b-256 9b1311989ac1daf90245f4b47752d5a3fa8643b0ef01e16f448deac538b6a11d

See more details on using hashes here.

Supported by

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