All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
3.6.0 - 2026-03-26
-
TextStyletype alias (Literal["without_comments", "merged", "with_comments"]) for thestyleparameter onHConfigChild.cisco_style_text()andRemediationReporter.to_text(), replacing the unconstrainedstrtype (#189). -
Performance benchmarks for parsing, remediation, and iteration (#202). Skipped by default; run with
poetry run pytest -m benchmark -v -s. -
Added support for Huawei VRP with a new driver and test suite (#238).
-
DuplicateChildErrorraised when parsing IOS-XR configs with indented!section separators (e.g.,!,!). Theper_line_subregex was changed from^!\s*$to^\s*!\s*$so bare!lines at any indentation level are stripped, restoring v3.4.2 behavior (#231). -
__hash__and__eq__inconsistency inHConfigChild:__hash__includednew_in_configandorder_weightbut__eq__excluded them, and__eq__checkedtagsbut__hash__did not, violating the Python invariant thata == bimplieshash(a) == hash(b). Both methods now use the same fields:text,tags, andchildren(#185).
3.5.0 - 2026-03-19
- Unused object detection framework:
UnusedObjectRule,ReferenceLocationmodels, andunused_objects()method onHConfig. Not enabled in any driver by default — must be explicitly configured via driver extension orload_hconfig_v2_options(#15). - IOS-XR comment preservation:
!comment lines inside sections are now attached to the next sibling'scommentsset instead of being stripped. Top-level!delimiters and#comments are still removed (#30). - Negation regex substitution:
NegationSubRulemodel andnegation_substep innegate()for platform-specific negation transformations such as truncating SNMP user removal commands (#101). unused_objectsandnegation_subprocessing inload_hconfig_v2_options.post_load_callbacksnow run inget_hconfig_fast_loadfor consistency withget_hconfig.- Idempotent command tests and improved
IdempotentCommandsRuledocstring (#61). exit_text_parent_levelonSectionalExitingRulefor IOS-XRend-*exit text rendered at parent indentation level (#130).CLAUDE.mdfor Claude Code guidance.
- IOS-XR:
DuplicateChildErrorwhen parsing configs with multiplegroupblocks (#209). - IOS-XR: Three tests updated for
exit_text_parent_levelindentation change. pyproject.toml: Closed author email brackets, removed duplicate pylint extension, fixed "Coverred" typos (#190).
3.4.3 - 2026-03-19
- IOS-XR:
DuplicateChildErrorwhen parsing configs with multiplegroupblocks. AddedSectionalExitingRuleforgroup→end-groupand aPerLineSubRuleto indentend-groupso it is treated as a section terminator rather than a standalone root-level child (issue #209).
3.4.2 - 2026-03-17
- IOS-XR:
DuplicateChildErroron nestedif/endifblocks insideroute-policysections. Added aparent_allows_duplicate_childrule at depth 2 (route-policy->if) so duplicateendifchildren are permitted (issue #206). - IOS-XR:
indent_adjustrule fortemplateincorrectly triggered ontemplate timeoutleaf parameters insideflow exporter-mapblocks, corrupting indentation for all subsequent top-level sections. Narrowed the start expression with a negative lookahead ((?!\s+timeout)) to exclude leaf uses (issue #205).
3.4.1 - 2026-01-28
negation_negate_withsupport inload_hconfig_v2_optionsutility, allowing v2-style option dictionaries to express custom negation strings when migrating to v3 drivers (issue #182).
- Updated
poetry.lockto resolve dependency version pins.
3.4.0 - 2026-01-10
- Structural idempotency matching —
_future()now derives an identity key from a command's full lineage before comparing it against idempotency rules. This prevents unrelated lines that share a common prefix (e.g. distinct BGP neighbour descriptions) from being collapsed into a single entry duringfuture()predictions. - Fortinet FortiOS driver documentation.
- BGP neighbour descriptions with different peer addresses no longer merge into
one entry when
future()is called. - Resolved issue #169.
- Internal type annotations updated to PEP 604 union syntax (
X | Y).
3.3.0 - 2025-11-05
- Config view abstraction — new
HConfigViewBaseandConfigViewInterfaceBaseabstract classes providing a structured, typed API over configuration trees without modifying the underlyingHConfigobjects. - Platform-specific view implementations for Cisco IOS, Cisco NX-OS, Cisco IOS XR, Arista EOS, and HP ProCurve.
3.2.2 - 2025-01-14
- Removed
snmp-server communityfrom built-in driver idempotency rules to avoid unintended matching across platforms. - Linting and type annotation cleanup.
3.2.1 - 2024-12-19
- Corrected an incorrect parent assignment when building a delta subtree during
config_to_get_to(), which could cause child nodes to appear under the wrong parent in the remediation output.
- Updated
poetry.lock.
3.2.0 - 2024-12-18
RemediationReporter— aggregates remediation configs from multiple devices, exposing summary statistics, tag-based filtering, and JSON/CSV export (issue #34).
3.1.1 - 2024-12-11
py.typedmarker file, enabling downstream packages to perform PEP 561 type-checking against hier_config without additional configuration.
3.1.0 - 2024-12-09
fast_loadutility for high-performance bulk config loading.get_hconfig_from_dump— reconstruct anHConfigtree from a serialisedDumpobject, enabling round-trip serialisation.- HP ProCurve (Aruba AOSS) driver with post-load callbacks that normalise VLAN membership and port-access range expansion.
- HP Comware5 driver with
undonegation prefix.
3.0.0 - 2024-11-18
Hostclass removed. TheHostclass that existed in v2 has been deleted. Useget_hconfig(platform, config_text)andget_hconfig_driver(platform)instead.- Driver system introduced. OS-specific behaviour is now encoded in typed
Pydantic driver classes (
HConfigDriverBasesubclasses) rather than plain dictionaries. Each platform has a dedicated module underhier_config/platforms/. - Pydantic v2. All internal models use Pydantic v2 (
model_config,ConfigDict, etc.). Third-party code that accessed internal model fields directly may need updating. options/hconfig_optionsdictionaries removed. Use driver classes withHConfigDriverRulesinstead.
get_hconfig(platform, text)— primary constructor function.get_hconfig_driver(platform)— retrieve a standalone driver instance.hier_config.utils— migration helpers includingload_hconfig_v2_optionsto convert v2 option dicts to v3 driver rule objects.WorkflowRemediation— replaces the oldHost-level remediation API.- Fortinet FortiOS driver.
- Juniper JunOS driver (experimental, set/delete syntax).
- VyOS driver (experimental, set/delete syntax).
Platformenum for type-safe platform selection.
- All rule definitions now use immutable Pydantic models (
MatchRule,SectionalExitingRule,IdempotentCommandsRule, etc.). HConfigandHConfigChildnow use__slots__for lower memory overhead.