Skip to content

Commit 95aaa00

Browse files
jtdubclaude
andauthored
Bump version to 3.6.0 and update docs/changelog (#243)
- Promote Unreleased items to [3.6.0] in CHANGELOG.md - Add missing __hash__/__eq__ fix entry (#185) - Fix stale footer comparison links (add 3.4.2, 3.4.3, 3.5.0, 3.5.1, 3.6.0) - Add HUAWEI_VRP to drivers.md built-in list and add driver section - Add Huawei VRP to README platform list - Add TextStyle to api-reference.md Models section - Bump pyproject.toml version to 3.6.0 Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 95f07eb commit 95aaa00

5 files changed

Lines changed: 54 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
## [Unreleased]
1111

12+
---
13+
14+
## [3.6.0] - 2026-03-26
15+
1216
### Added
1317

1418
- `TextStyle` type alias (`Literal["without_comments", "merged", "with_comments"]`) for
@@ -27,6 +31,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2731
to `^\s*!\s*$` so bare `!` lines at any indentation level are stripped, restoring
2832
v3.4.2 behavior (#231).
2933

34+
- `__hash__` and `__eq__` inconsistency in `HConfigChild`: `__hash__` included
35+
`new_in_config` and `order_weight` but `__eq__` excluded them, and `__eq__` checked
36+
`tags` but `__hash__` did not, violating the Python invariant that `a == b` implies
37+
`hash(a) == hash(b)`. Both methods now use the same fields: `text`, `tags`, and
38+
`children` (#185).
39+
3040
---
3141

3242
## [3.5.0] - 2026-03-19
@@ -226,7 +236,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
226236

227237
---
228238

229-
[Unreleased]: https://github.com/netdevops/hier_config/compare/v3.4.1...HEAD
239+
[Unreleased]: https://github.com/netdevops/hier_config/compare/v3.6.0...HEAD
240+
[3.6.0]: https://github.com/netdevops/hier_config/compare/v3.5.1...v3.6.0
241+
[3.5.1]: https://github.com/netdevops/hier_config/compare/v3.5.0...v3.5.1
242+
[3.5.0]: https://github.com/netdevops/hier_config/compare/v3.4.3...v3.5.0
243+
[3.4.3]: https://github.com/netdevops/hier_config/compare/v3.4.2...v3.4.3
244+
[3.4.2]: https://github.com/netdevops/hier_config/compare/v3.4.1...v3.4.2
230245
[3.4.1]: https://github.com/netdevops/hier_config/compare/v3.4.0...v3.4.1
231246
[3.4.0]: https://github.com/netdevops/hier_config/compare/v3.3.0...v3.4.0
232247
[3.3.0]: https://github.com/netdevops/hier_config/compare/v3.2.2...v3.3.0

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Hierarchical Configuration has been used extensively on:
1111
- [x] Fortinet FortiOS
1212
- [x] HP Procurve (Aruba AOSS)
1313
- [x] HP Comware5 / H3C
14+
- [x] Huawei VRP
1415

1516
In addition to the Cisco-style syntax, hier_config offers experimental support for Juniper-style configurations using set and delete commands. This allows users to remediate Junos configurations in native syntax. However, please note that Juniper syntax support is still in an experimental phase and has not been tested extensively. Use with caution in production environments.
1617

docs/api-reference.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ Auto-generated reference documentation for the `hier_config` public API.
4646

4747
::: hier_config.models.Platform
4848

49+
::: hier_config.models.TextStyle
50+
4951
::: hier_config.models.MatchRule
5052

5153
::: hier_config.models.TagRule

docs/drivers.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ The following drivers are included in Hier Config:
3434
- **CISCO_IOS**
3535
- **CISCO_XR**
3636
- **CISCO_NXOS**
37-
- **GENERIC**
3837
- **FORTINET_FORTIOS**
38+
- **GENERIC**
3939
- **HP_COMWARE5**
4040
- **HP_PROCURVE**
41+
- **HUAWEI_VRP**
4142
- **JUNIPER_JUNOS**
4243
- **VYOS**
4344

@@ -244,6 +245,38 @@ for line in workflow.remediation_config.all_children_sorted():
244245

245246
---
246247

248+
### Huawei VRP Driver
249+
250+
Huawei VRP (Versatile Routing Platform) uses `undo` as the negation prefix rather than `no`. The `HUAWEI_VRP` driver customises negation handling for several command families:
251+
252+
- **[Negation prefix](glossary.md#negation-prefix)**: `undo ` (replaces `no `).
253+
- **Smart negation**: `description` and `alias` commands are negated without their argument; `remark` commands strip the remark text; `snmp-agent community` commands truncate to the community name.
254+
- **Sectional exiting**: section exit text `exit` is translated to `quit` as VRP requires.
255+
- **Per-line substitutions**: strips `#` and `!` comment lines during parsing.
256+
257+
Platform enum: `Platform.HUAWEI_VRP`
258+
259+
```python
260+
from hier_config import Platform, get_hconfig_driver
261+
262+
driver = get_hconfig_driver(Platform.HUAWEI_VRP)
263+
```
264+
265+
**Remediation example:**
266+
267+
```python
268+
from hier_config import WorkflowRemediation, get_hconfig, Platform
269+
270+
running = get_hconfig(Platform.HUAWEI_VRP, running_text)
271+
intended = get_hconfig(Platform.HUAWEI_VRP, intended_text)
272+
workflow = WorkflowRemediation(running, intended)
273+
274+
for line in workflow.remediation_config.all_children_sorted():
275+
print(line.cisco_style_text())
276+
```
277+
278+
---
279+
247280
### Fortinet FortiOS Driver
248281

249282
Fortinet firewalls model their CLI around `config` and `edit` blocks that are

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "hier-config"
3-
version = "3.5.1"
3+
version = "3.6.0"
44
description = "A network configuration query and comparison library, used to build remediation configurations."
55
packages = [
66
{ include="hier_config", from="."},

0 commit comments

Comments
 (0)