Releases: netdevops/hier_config
Releases · netdevops/hier_config
v2.0.2
This release introduces a very basic concept of rollback configurations. It does a reverse comparison of the running config and generated config to produce a rollback remediation.
Here is a basic example:
>>> from hier_config import Host
>>> host = Host(hostname="aggr-example.rtr", os="ios")
>>> host.load_running_config_from_file("./tests/fixtures/running_config.conf")
>>> host.load_generated_config_from_file("./tests/fixtures/generated_config.conf")
>>> host.remediation_config()
HConfig(host=Host(hostname=aggr-example.rtr))
>>> rollback = host.rollback_config()
>>> for line in rollback.all_children_sorted():
... print(line.cisco_style_text())
...
no vlan 4
no interface Vlan4
vlan 3
name switch_mgmt_10.0.4.0/24
interface Vlan2
no mtu 9000
no ip access-group TEST in
shutdown
interface Vlan3
description switch_mgmt_10.0.4.0/24
ip address 10.0.4.1 255.255.0.0
>>>
v2.0.1
#87 adds default options to hier_config. This allows a person to load a set of sain defaults, but still gives them the ability to extend the options as necessary.
Instead of doing:
>>> import yaml
>>>
>>> options = yaml.load(open('./tests/fixtures/options_ios.yml'), Loader=yaml.SafeLoader)
>>> host = Host('example.rtr', 'ios', options)
We can now do:
>>>
>>> host = Host('example.rtr', 'ios')
v2.0.0
This version is an almost complete rewrite. The library's behavior is roughly the same but there are likely to be some breaking changes depending on your use case.
Major Changes
- Python>=3.8
- Numerous performance enhancements
- Type hinting has been added and mypy passes
- All pylint and flake8 issues have been corrected
- All code is automatically formatted using black
- Testing now uses pytest with coverage analysis
- pylint, flake8, mypy, black, pytest, and coverage are now all CI/CD enforced
v1.6.1
v1.6.0
hier_config release 1.4.2
Bug Fix
#59 - Python 2 capability bug fix
hier_config release 1.4.1
Bugs
#57 - codefactor fixes
hier_config - version 1.4.0
Enhancement
#33 - Extends the Host
object, making hier_config
easier to consume.
hier_config Release 1.3.1
Bugs
#29 - Fixes host object calls in hier_config