config: add overrides for default directory locations

Allowing overrides for the default directory locations seems to
integrate rather well into the existing system. Custom locations
are specified using the "dirs" parameter as a comma-separated list
of "vtype:/location" values.

For now, the option has been enabled for the Directory, CIFS and NFS
backends.

Signed-off-by: Leo Nunner <l.nunner@proxmox.com>
This commit is contained in:
Leo Nunner
2023-01-02 17:04:37 +01:00
committed by Wolfgang Bumiller
parent 39eb268662
commit 3e7bd7dac3
5 changed files with 55 additions and 4 deletions

View File

@ -27,6 +27,13 @@ foreach my $type (keys %$vtype_subdirs) {
push @$tests, [ $scfg_with_path, $type, $path ];
}
# creates additional tests for overrides
foreach my $type (keys %$vtype_subdirs) {
my $override = "/${type}_override";
my $scfg_with_override = { path => '/some/path', dirs => { $type => $override } };
push @$tests, [ $scfg_with_override, $type, "$scfg_with_override->{path}$scfg_with_override->{dirs}->{$type}" ];
}
plan tests => scalar @$tests;
foreach my $tt (@$tests) {