You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ Hierarchical Configuration has been used extensively on:
11
11
-[x] Fortinet FortiOS
12
12
-[x] HP Procurve (Aruba AOSS)
13
13
-[x] HP Comware5 / H3C
14
+
-[x] Huawei VRP
14
15
15
16
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.
Copy file name to clipboardExpand all lines: docs/drivers.md
+34-1Lines changed: 34 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,10 +34,11 @@ The following drivers are included in Hier Config:
34
34
-**CISCO_IOS**
35
35
-**CISCO_XR**
36
36
-**CISCO_NXOS**
37
-
-**GENERIC**
38
37
-**FORTINET_FORTIOS**
38
+
-**GENERIC**
39
39
-**HP_COMWARE5**
40
40
-**HP_PROCURVE**
41
+
-**HUAWEI_VRP**
41
42
-**JUNIPER_JUNOS**
42
43
-**VYOS**
43
44
@@ -244,6 +245,38 @@ for line in workflow.remediation_config.all_children_sorted():
244
245
245
246
---
246
247
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:
-**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
0 commit comments