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

Use netbox 'DataSource' as source for the existing configs #48

Open
PieterL75 opened this issue Nov 15, 2023 · 3 comments
Open

Use netbox 'DataSource' as source for the existing configs #48

PieterL75 opened this issue Nov 15, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@PieterL75
Copy link

It would be nice if we could choose between 'getting them direct from the device' or 'load from DataSource.
The login to the devices is not always just one username/password, and that makes the current implementation not flexible.

There are a dozen other tools out there that can pull the configs of devices and store them in a repo.
In my case, I have a rancid running that pulls the config (the authentication schema can be easily set per device/group) and store them in a git repo. That repo is then synced to netbox using the DataSources.

that makes the configs available for other plugins and custom scripts too

@PieterL75 PieterL75 added the enhancement New feature or request label Nov 15, 2023
@miaow2
Copy link
Owner

miaow2 commented Nov 15, 2023

Hi @PieterL75 thanks for opening the issue.
Do you speak about ConfigDiffScript or configuration requests?
in ConfigDiffScript you can define a data source for a source of configs

@PieterL75
Copy link
Author

Isn't the ConfigDiffScript ran by the plugin ? I would not run it myself.

How I see it, is that in the 'Platform Settings' you have to define the command to get the config from the device.
Would it make sense to use a datasource there in stead of an ssh to a device ?

@miaow2
Copy link
Owner

miaow2 commented Nov 15, 2023

ConfigDiffScript should be run or scheduled only by user, plugin only adds script to netbox during installation, plugin does not run script without user command.
And the user should define connect to devices or use data source, why this is added to the script, in script you control how to get devices configs

PlatformSetting is needed for storing info about ssh connection, also here you can define regexps, with this regexps you can ignore parts of actual config and compare sections you only need.

if you want to find diff between rendered config in netbox and config backups in data source:

  • define PlatfromSettings (you can define incorrect driver and show command if you will not use ssh)
  • run script with devices and data source defined (script will find config backup by device name)
  • check the results in config compliances

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

No branches or pull requests

2 participants