Skip to content

Commit d7da344

Browse files
committed
Add Fortigate docs, prepare release
1 parent 3780b08 commit d7da344

3 files changed

Lines changed: 29 additions & 1 deletion

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Hierarchical Configuration has been used extensively on:
88
- [x] Cisco IOSXR
99
- [x] Cisco NXOS
1010
- [x] Arista EOS
11+
- [x] Fortinet FortiOS
1112
- [x] HP Procurve (Aruba AOSS)
1213

1314
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.
@@ -17,7 +18,7 @@ In addition to the Cisco-style syntax, hier_config offers experimental support f
1718

1819
Hier Config is compatible with any NOS that utilizes a structured CLI syntax similar to Cisco IOS or Junos OS.
1920

20-
The code documentation can be found at: https://hier-config.readthedocs.io/en/latest/
21+
The code documentation can be found at: [Hier Config documentation](https://hier-config.readthedocs.io/en/latest/).
2122

2223
Installation
2324
============

docs/drivers.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ The following drivers are included in Hier Config:
3535
- **CISCO_XR**
3636
- **CISCO_NXOS**
3737
- **GENERIC**
38+
- **FORTINET_FORTIOS**
3839
- **HP_COMWARE5**
3940
- **HP_PROCURVE**
4041
- **JUNIPER_JUNOS**
@@ -49,6 +50,31 @@ from hier_config import get_hconfig_driver, Platform
4950
driver = get_hconfig_driver(Platform.CISCO_IOS)
5051
```
5152

53+
### Fortinet FortiOS Driver
54+
55+
Fortinet firewalls model their CLI around `config` and `edit` blocks that are
56+
terminated with `next` and `end`. The `FORTINET_FORTIOS` driver captures those
57+
patterns and makes sure remediation output keeps the indentation and closure
58+
FortiOS expects. Highlights include:
59+
60+
- Preserves the `set`/`unset` pairing by swapping declarations and negations
61+
automatically when hier_config determines a change is required.
62+
- Treats sibling `config` blocks as duplicates when appropriate so that
63+
multiple objects such as policies or firewall addresses can be compared in
64+
a stable order.
65+
- Normalizes bare `next` and `end` tokens into indented versions to match the
66+
format FortiOS emits on the device.
67+
- Overrides idempotency matching to require that the same object name exists on
68+
both sides before a command is considered already present.
69+
70+
Activate the driver with the standard helper:
71+
72+
```python
73+
from hier_config import Platform, get_hconfig_driver
74+
75+
driver = get_hconfig_driver(Platform.FORTINET_FORTIOS)
76+
```
77+
5278
### Structure of Each Section and How Rules Are Built
5379

5480
In Hier Config, the rules within a driver are organized into sections, each targeting a specific aspect of device configuration processing. These sections use Pydantic models to define the behavior and ensure consistency. Here's a breakdown of each section and its associated models:

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Hierarchical Configuration has been used extensively on:
88
- [x] Cisco IOSXR
99
- [x] Cisco NXOS
1010
- [x] Arista EOS
11+
- [x] Fortinet FortiOS
1112
- [x] HP Procurve (Aruba AOSS)
1213

1314
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.

0 commit comments

Comments
 (0)