All Projects → netdevops → hier_config

netdevops / hier_config

Licence: MIT license
Hierarchical Configuration

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to hier config

Pythoncode Tutorials
The Python Code Tutorials
Stars: ✭ 544 (+532.56%)
Mutual labels:  network-analysis, network-programming
arpwitch
A modern arpwatch replacement with JSON formatted outputs and easy options to exec commands when network changes are observed.
Stars: ✭ 20 (-76.74%)
Mutual labels:  network-analysis, network-programming
up
UP - Ultimate Provisioner CLI
Stars: ✭ 43 (-50%)
Mutual labels:  configuration-management
diepssect
A public repo for hacky diep stuff - networking protocol, WebAssembly, memory editing, & physics
Stars: ✭ 26 (-69.77%)
Mutual labels:  network-analysis
opensvc
The OpenSVC node agent
Stars: ✭ 27 (-68.6%)
Mutual labels:  configuration-management
uwsgiconf
Configure uWSGI from your Python code
Stars: ✭ 75 (-12.79%)
Mutual labels:  configuration-management
holo
Minimalistic configuration management
Stars: ✭ 88 (+2.33%)
Mutual labels:  configuration-management
julia
A lightweight high performance http server
Stars: ✭ 111 (+29.07%)
Mutual labels:  network-programming
ctsTraffic
ctsTraffic is a highly scalable client/server networking tool giving detailed performance and reliability analytics
Stars: ✭ 125 (+45.35%)
Mutual labels:  network-analysis
apollo.net
Apollo配置中心.Net客户端
Stars: ✭ 449 (+422.09%)
Mutual labels:  configuration-management
irsync
rsync on interval, via command line binary or docker container. Server and IOT builds for pull or push based device content management.
Stars: ✭ 19 (-77.91%)
Mutual labels:  configuration-management
bookworm
📚 social networks from novels
Stars: ✭ 72 (-16.28%)
Mutual labels:  network-analysis
packetnet
Official repository - High performance .Net assembly for dissecting and constructing network packets such as ethernet, ip, tcp, udp etc.
Stars: ✭ 343 (+298.84%)
Mutual labels:  network-analysis
agollo
🚀Go client for ctrip/apollo (https://github.com/apolloconfig/apollo)
Stars: ✭ 563 (+554.65%)
Mutual labels:  configuration-management
panther
Estimating similarity between vertices is a fundamental issue in network analysis across various domains, such as social networks and biological networks. Methods based on common neighbors and structural contexts have received much attention....
Stars: ✭ 27 (-68.6%)
Mutual labels:  network-analysis
community.network
Ansible Community Network Collection
Stars: ✭ 85 (-1.16%)
Mutual labels:  network-programming
BinaryStream
BinaryStream - a writer and reader for binary data. Best replacement for pack()/unpack().
Stars: ✭ 44 (-48.84%)
Mutual labels:  network-analysis
vigor
Main repository of the Vigor NF verification project.
Stars: ✭ 40 (-53.49%)
Mutual labels:  network-programming
bikenwgrowth
Source code for the paper "Growing urban bicycle networks", exploring algorithmically the limitations of urban bicycle network growth
Stars: ✭ 39 (-54.65%)
Mutual labels:  network-analysis
Network-Automation
Cisco ACI, Firepower, Meraki, NETCONF, and SQL Python Programs
Stars: ✭ 47 (-45.35%)
Mutual labels:  network-programming

Build Status

Hierarchical Configuration

Hierarchical Configuration is a python library that is able to take a running configuration of a network device, compare it to its intended configuration, and build the remediation steps necessary bring a device into spec with its intended configuration.

Hierarchical Configuraiton has been used extensively on:

  • Cisco IOS
  • Cisco IOSXR
  • Cisco NXOS
  • Arista EOS

However, any NOS that utilizes a CLI syntax that is structured in a similar fasion to IOS should work mostly out of the box.

The code documentation can be found at: https://netdevops.io/hier_config/

Installation

Hierarchical Configuration can be installed directly from github or with pip:

Github

  1. Install Poetry
  2. Clone the Repository: git clone [email protected]:netdevops/hier_config.git
  3. Install hier_config: cd hier_config; poetry install

Pip

  1. Install from PyPi: pip install hier-config

Basic Usage Example

In the below example, we create a hier_config host object, load a running config and a generated config into the host object, load the remediation, and print out the remediation lines to bring a device into spec.

>>> from hier_config import Host
>>> import yaml
>>>
>>> options = yaml.load(open('./tests/fixtures/options_ios.yml'), Loader=yaml.SafeLoader)
>>> host = Host('example.rtr', 'ios', options)
>>>
>>> # Build Hierarchical Configuration object for the Running Config
>>> host.load_running_config_from_file("./tests/fixtures/running_config.conf")
HConfig(host=Host(hostname=example.rtr))
>>>
>>> # Build Hierarchical Configuration object for the Generated Config
>>> host.load_generated_config_from_file("./tests/fixtures/generated_config.conf")
HConfig(host=Host(hostname=example.rtr))
>>>
>>> # Build and Print the all lines of the remediation config
>>>
>>> print(host.remediation_config_filtered_text()):
vlan 3
  name switch_mgmt_10.0.3.0/24
vlan 4
  name switch_mgmt_10.0.4.0/24
interface Vlan2
  no shutdown
  mtu 9000
  ip access-group TEST in
interface Vlan3
  description switch_mgmt_10.0.3.0/24
  ip address 10.0.3.1 255.255.0.0
interface Vlan4
  mtu 9000
  description switch_mgmt_10.0.4.0/24
  ip address 10.0.4.1 255.255.0.0
  ip access-group TEST in
  no shutdown

The files in the example can be seen in the tests/fixtures folder.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].