added docs and new patch
This commit is contained in:
parent
04bbde74ad
commit
e8575df628
2 changed files with 183 additions and 6 deletions
29
patches/snippets_6.3-3.patch
Normal file
29
patches/snippets_6.3-3.patch
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
--- PVE/Storage.pm.old 2021-04-18 12:35:48.201033594 +0200
|
||||
+++ PVE/Storage.pm 2021-04-09 23:28:07.554075001 +0200
|
||||
@@ -420,6 +420,15 @@
|
||||
return $plugin->get_subdir($scfg, 'iso');
|
||||
}
|
||||
|
||||
+sub get_snippet_dir {
|
||||
+ my ($cfg, $storeid) = @_;
|
||||
+
|
||||
+ my $scfg = storage_config($cfg, $storeid);
|
||||
+ my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
|
||||
+
|
||||
+ return $plugin->get_subdir($scfg, 'snippets');
|
||||
+}
|
||||
+
|
||||
sub get_vztmpl_dir {
|
||||
my ($cfg, $storeid) = @_;
|
||||
|
||||
--- PVE/API2/Storage/Status.pm.old 2021-04-18 12:36:10.512862744 +0200
|
||||
+++ PVE/API2/Storage/Status.pm 2021-04-09 23:28:46.429777635 +0200
|
||||
@@ -424,6 +424,8 @@
|
||||
raise_param_exc({ filename => "missing '.tar.gz' or '.tar.xz' extension" });
|
||||
}
|
||||
$path = PVE::Storage::get_vztmpl_dir($cfg, $param->{storage});
|
||||
+ } elsif ($content eq 'snippets') {
|
||||
+ $path = PVE::Storage::get_snippet_dir($cfg, $param->{storage});
|
||||
} else {
|
||||
raise_param_exc({ content => "upload content type '$content' not allowed" });
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue