-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IOS XR end-set should not be indented #130
Comments
By default, hier_config adds the https://github.com/netdevops/hier_config/blob/master/hier_config/child.py#L116-L117 if sectional_exiting and (exit_text := self.sectional_exit):
yield " " * self.driver.rules.indentation * self.depth() + exit_text I think we should add a depth option fo the https://github.com/netdevops/hier_config/blob/master/hier_config/models.py#L35-L37 class SectionalExitingRule(BaseModel):
match_rules: tuple[MatchRule, ...]
exit_text: str The default could be sectional_exiting=[
SectionalExitingRule(
match_rules=(MatchRule(startswith="route-policy"),),
exit_text="end-policy",
),
SectionalExitingRule(
match_rules=(MatchRule(startswith="prefix-set"),),
exit_text="end-set",
),
SectionalExitingRule(
match_rules=(MatchRule(startswith="policy-map"),),
exit_text="end-policy-map",
),
SectionalExitingRule(
match_rules=(MatchRule(startswith="class-map"),),
exit_text="end-class-map",
),
SectionalExitingRule(
match_rules=(MatchRule(startswith="community-set"),),
exit_text="end-set",
),
SectionalExitingRule(
match_rules=(MatchRule(startswith="extcommunity-set"),),
exit_text="end-set",
),
SectionalExitingRule(
match_rules=(MatchRule(startswith="template"),),
exit_text="end-template",
),
] |
As one can see here,
hier_config
IOS XR diffend-set
should not be indented... explicitly, this seems to be (slightly) wrong inhier_config
version 2.2.3...Contents of
before.txt
...Contents of
after.txt
...ciscoconfparse2 uses
hier_config
for all diffs... The diffend-set
is indented when it shouldn't be, but I think that will be cosmetic... sadly I don't have an IOS XR system to test against...The text was updated successfully, but these errors were encountered: