netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/free-netbox-cloud/
http://netboxlabs.com/oss/netbox/
Apache License 2.0
16.1k stars 2.58k forks source link

Datasource GIT sync subfolder only #14272

Open PieterL75 opened 11 months ago

PieterL75 commented 11 months ago

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

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

github-actions[bot] commented 8 months ago

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] commented 2 months ago

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.