netbox icon indicating copy to clipboard operation
netbox copied to clipboard

Datasource GIT sync subfolder only

Open PieterL75 opened this issue 1 year ago • 1 comments

NetBox version

v3.6.5

Feature type

Change to existing functionality

Proposed functionality

Allow a DataSource to sync only a subfolder of a repositry, into the 'root' of the DataSource. example: Git repo has all files stored under config/devicenames.txt The datasource sync will store all those files including the path.

A filter/rewrite should be able to sync only the /config/* files and save them as /* excluding all other files in the git repo

I suggest this

  • a regex filter to limit the files that are retrieved
  • a regex filter that allows a rewrite of the path/filenames before they are stored.

Use case

My device configurations are stored in git under the "configs" folder. Some tools assume that the files are stored in the root of the DataStore.

Another usecase is where the scripts I use are in a folder of my (huge) git repo. I would like to sync only the scripts relevant. Those scripts are in a subfolder /netbox-tools/scripts/somefolder/*

Database changes

None

External dependencies

None

PieterL75 avatar Nov 15 '23 14:11 PieterL75

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

github-actions[bot] avatar Feb 14 '24 04:02 github-actions[bot]