Skip to content
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

Juniper Remediation Incorrect #129

Open
jdrew82 opened this issue Apr 3, 2024 · 2 comments
Open

Juniper Remediation Incorrect #129

jdrew82 opened this issue Apr 3, 2024 · 2 comments
Assignees

Comments

@jdrew82
Copy link

jdrew82 commented Apr 3, 2024

After testing the Juniper remediation feature with the following options:

{
    "full_text_sub": [],
    "idempotent_commands": [],
    "idempotent_commands_blacklist": [],
    "indent_adjust": [],
    "negation": "delete",
    "negation_default_when": [],
    "negation_negate_with": [],
    "ordering": [],
    "parent_allows_duplicate_child": [],
    "per_line_sub": [],
    "sectional_exiting": [],
    "sectional_overwrite": [],
    "sectional_overwrite_no_negate": [],
    "style": "junos",
    "syntax_style": "juniper"
}

I found that the returned remediation simply appends the negation word to the start of the configuration lines instead of replacing the set keyword.

@aedwardstx
Copy link
Collaborator

This can be addressed this with either an idempotent_command rule e.g. https://github.com/netdevops/hier_config/blob/master/hier_config/platforms/hp_procurve/driver.py#L238 or by adding this functionality to the idempotent_for Driver method e.g. https://github.com/netdevops/hier_config/blob/master/hier_config/platforms/hp_procurve/driver.py#L115. I have a suspicion that if we were to add support for Junipers nested config syntax, this problem would be little easier to solve for.

@jtdub jtdub self-assigned this Nov 19, 2024
@jtdub
Copy link
Contributor

jtdub commented Dec 18, 2024

@jdrew82 -- Are you able to test this again? If you're still having issues, can you provide more details?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants