-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
131 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
--- | ||
############################################################# | ||
# heir_config yml file | ||
############################################################# | ||
# Indicates the style of the configuration | ||
style: ios | ||
|
||
# if there is a delta, negate the parents and re-write the parents with children | ||
sectional_overwrite: [] | ||
|
||
# if there is a delta, overwrite these parents instead of one of their children | ||
sectional_overwrite_no_negate: [] | ||
|
||
# The default order value is 500, with a range between 1 - 999. | ||
# Commands with smaller order values float to the top in the order of execution. | ||
# Commands with larger order values float to the bottom in the order of execution. | ||
# Syntax Example: | ||
# - lineage: | ||
# - startswith: | ||
# - no route-map | ||
# order: 600 | ||
ordering: | ||
- lineage: | ||
- startswith: no vlan filter | ||
order: 700 | ||
- lineage: | ||
- startswith: interface | ||
- startswith: no shutdown | ||
order: 700 | ||
|
||
# adds +1 indent to lines following start_expression and removes the +1 indent for lines following end_expression | ||
indent_adjust: [] | ||
|
||
parent_allows_duplicate_child: [] | ||
|
||
sectional_exiting: | ||
# This rule is used in the hierarchical_configuration unit test for .add_section_exiting() | ||
- lineage: | ||
- startswith: router bgp | ||
- startswith: template peer-policy | ||
exit_text: exit-peer-policy | ||
- lineage: | ||
- startswith: router bgp | ||
- startswith: template peer-session | ||
exit_text: exit-peer-session | ||
- lineage: | ||
- startswith: router bgp | ||
- startswith: address-family | ||
exit_text: exit-address-family | ||
|
||
# substitions against the full multi-line config text | ||
full_text_sub: [] | ||
#- search: 'banner\s(exec|motd)\s(\S)\n(.*\n){1,}(\2)' | ||
# replace: '' | ||
#- search: 'banner\s(exec|motd)\s(\S.).+\n(.*\n){1,}.*(\2)' | ||
# replace: '' | ||
#- search: 'banner\s(exec|motd)\s(\S.)\n(.*\n){1,}(\2)' | ||
# replace: '' | ||
|
||
# substitions against each line of the config text | ||
per_line_sub: | ||
- search: ^Building configuration.* | ||
replace: '' | ||
- search: ^Current configuration.* | ||
replace: '' | ||
- search: ^! Last configuration change.* | ||
replace: '' | ||
- search: ^! NVRAM config last updated.* | ||
replace: '' | ||
- search: ^ntp clock-period .* | ||
replace: '' | ||
- search: ^version.* | ||
replace: '' | ||
- search: ^ logging event link-status$ | ||
replace: '' | ||
- search: ^ logging event subif-link-status$ | ||
replace: '' | ||
- search: ^\s*ipv6 unreachables disable$ | ||
replace: '' | ||
- search: ^end$ | ||
replace: '' | ||
- search: '^\s*[#!].*' | ||
replace: '' | ||
- search: ^ no ip address | ||
replace: '' | ||
- search: ^ exit-peer-policy | ||
replace: '' | ||
- search: ^ exit-peer-session | ||
replace: '' | ||
- search: ^ exit-address-family | ||
replace: '' | ||
- search: ^crypto key generate rsa general-keys.*$ | ||
replace: '' | ||
|
||
idempotent_commands_blacklist: [] | ||
|
||
# These commands do not require negation, they simply overwrite themselves | ||
# Example Syntax | ||
# - lineage: | ||
# - startswith: interface | ||
# - startswith: description | ||
idempotent_commands: | ||
- lineage: | ||
- startswith: vlan | ||
- startswith: name | ||
- lineage: | ||
- startswith: interface | ||
- startswith: description | ||
- lineage: | ||
- startswith: interface | ||
- startswith: ip address | ||
|
||
# Default when expression: list of expressions | ||
negation_default_when: [] | ||
|
||
# Negate substitutions: expression -> negate with | ||
# Example Syntax: | ||
# - lineage: | ||
# - startswith: route-map | ||
# - startswith: description | ||
# use: no description | ||
negation_negate_with: [] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters