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 Junos Config Compliance Diff Failure #49

Closed
msmith8fti opened this issue Dec 6, 2023 · 6 comments
Closed

Juniper Junos Config Compliance Diff Failure #49

msmith8fti opened this issue Dec 6, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@msmith8fti
Copy link

Netbox Version 3.6.5

When defining platform settings for driver juniper_junos we correctly configure the command as 'show configuration | display set' which displays the current junos configuration as set commands. After running the Config Compliance job - the actual configuration is NOT show in 'display set' format but instead as hierarchical format.

To Reproduce
Steps to reproduce the behavior:

  1. Define platform settings for juniper_junos and set command as 'show configuration | display set'
  2. Run ConfigDiffScripts which is successful
  3. View Config Compliance against device - diff does not work as rendered config is in set format, collected config is not in set format

Expected behavior
Collected configuration in 'set' format

@msmith8fti msmith8fti added the bug Something isn't working label Dec 6, 2023
@msmith8fti
Copy link
Author

As an update -

  1. When I first create config compliance - it is show in 'set' format
  2. Creating a 'configuration request' against the same device shows improper diffs as the actual config is show in hierarchical format
  3. AFTER creating configuration request, config compliances for device show incorrect diffs (due to lack of SET format) but this only changed after creating configuration requests

@miaow2
Copy link
Owner

miaow2 commented Dec 8, 2023

Hi @msmith8fti
ConfigDiffScript uses command from PlatfromSetting for getting configuration from device
ConfigurationRequest uses scrapli-cfg for configuring devices and getting configuration from them and scrapli-cfg get config from junos devices in hierarchical format, thats why in ConfigCompliance object shows in that format

@miaow2
Copy link
Owner

miaow2 commented Dec 8, 2023

and @msmith8fti one more question, do you try to configure juniper devices with these plugin and configuration in set format? If yes, was it successful?

@msmith8fti
Copy link
Author

and @msmith8fti one more question, do you try to configure juniper devices with these plugin and configuration in set format? If yes, was it successful?

Yes plugin is setup with command to gather configuration in set format. Am I to understand we can't diff configuration between running configuration and template for Junos config in set format?

@miaow2
Copy link
Owner

miaow2 commented Dec 8, 2023

you can check diff for junos in set format in ConfigDiffScript script

for configuration requests I should make some tweaks

@miaow2
Copy link
Owner

miaow2 commented Apr 9, 2024

Fix this in PR #58

@miaow2 miaow2 closed this as completed Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants