Skip to content

Commit 14e94e1

Browse files
committed
added experimental features
1 parent 32532f1 commit 14e94e1

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

docs/experimental-features.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Experimental Features
2+
3+
Experimental features are those features that work, but haven't been thoroughly tested enough to feel confident to use in production.
4+
5+
## Rollback Configuration
6+
7+
Starting in version 2.0.2, a featured called rollback configuraiton was introduced. The rollback configuration is exactly what it sounds like. It renders a rollback configuration in the event that a remediation causes a hiccup when being deployed. The rollback configuration does the inverse on a remediation. Instead of a remediation being renedered based upon the generated config, a rollback remediation is rendered from the generated config based upon the running configuration.
8+
9+
A rollback configuration can be rendered once the running and generated configurations are loaded. Below is an example.
10+
11+
```bash
12+
>>> from hier_config import Host
13+
>>> host = Host(hostname="aggr-example.rtr", os="ios")
14+
>>> host.load_running_config_from_file("./tests/fixtures/running_config.conf")
15+
>>> host.load_generated_config_from_file("./tests/fixtures/generated_config.conf")
16+
>>> rollback = host.rollback_config()
17+
>>> for line in rollback.all_children_sorted():
18+
... print(line.cisco_style_text())
19+
...
20+
no vlan 4
21+
no interface Vlan4
22+
vlan 3
23+
name switch_mgmt_10.0.4.0/24
24+
interface Vlan2
25+
no mtu 9000
26+
no ip access-group TEST in
27+
shutdown
28+
interface Vlan3
29+
description switch_mgmt_10.0.4.0/24
30+
ip address 10.0.4.1 255.255.0.0
31+
>>>
32+
```

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ nav:
99
- Install: install.md
1010
- Getting Started: getting-started.md
1111
- Advanced Topics: advanced-topics.md
12+
- Experimental Features: experimental-features.md

0 commit comments

Comments
 (0)