Add cifsscan to CLI

This commit is contained in:
Wolfgang Link
2018-03-16 10:22:58 +01:00
committed by Dietmar Maurer
parent b9cfb8cac7
commit 6a26444462

View File

@ -331,6 +331,19 @@ our $cmddef = {
printf "%-${maxlen}s %s\n", $rec->{path}, $rec->{options};
}
}],
cifsscan => [ "PVE::API2::Storage::Scan", 'cifsscan', ['server'],
{ node => $nodename }, sub {
my $res = shift;
my $maxlen = 0;
foreach my $rec (@$res) {
my $len = length ($rec->{share});
$maxlen = $len if $len > $maxlen;
}
foreach my $rec (@$res) {
printf "%-${maxlen}s %s\n", $rec->{share}, $rec->{description};
}
}],
glusterfsscan => [ "PVE::API2::Storage::Scan", 'glusterfsscan', ['server'],
{ node => $nodename }, sub {
my $res = shift;